留言板

regd:<Portlet:DefineObjects> tag in jsp

Srikanth Reddy,修改在13 年前。

regd:<Portlet:DefineObjects> tag in jsp

Junior Member 帖子: 53 加入日期: 10-6-18 最近的帖子
Hi every one
can any one let me know ,what are the Objects that are available in an Jsp ,
if we include the following snippet
<portlet:defineObjects/>
I know very few of them like themeDisplay,renderRequest
Or can any one have any link where we can find out..

Thanks in advance
Srikanth
Arun Kumar S,修改在13 年前。

RE: regd:<Portlet:DefineObjects> tag in jsp

Regular Member 帖子: 182 加入日期: 08-6-23 最近的帖子
Hi Srikanth,

JSR 168 (Portlet 1.0)

In JSR 168 only three variables are defined:

* RenderRequest renderRequest
* RenderResponse renderResponse
* PortletConfig portletConfig


JSR 268 (Portlet 2.0)

In JSR 286 following variables are defined:

* RenderRequest renderRequest and RenderResponse renderResponse (if the JSP is included from render method)
* ResourceRequest resourceRequest and ResourceResponse resourceResponse (if the JSP is included from serveResource method)
* ActionRequest actionRequest and ActionResponse actionResponse (if the JSP is included from processAction method)
* EventRequest eventRequest and EventResponse eventResponse (if the JSP is included from processEvent method)
* PortletConfig portletConfig
* PortletSession portletSession (returns an existing session or null if no session exists)
* Map<String, Object> portletSessionScope (provides access to the portletSession attributes)
* PortletPreferences portletPreferences (provides access to the portlet preferences)
* Map<String, String[]> portletPreferencesValues (provides access to the portlet preferences as a Map)

HTH,
Arun
Srikanth Reddy,修改在13 年前。

RE: regd:<Portlet:DefineObjects> tag in jsp

Junior Member 帖子: 53 加入日期: 10-6-18 最近的帖子
Thank you ,i think i should dig into it once.
But your reply helped me a lot ,cause i was in some confusion about it .
If you any link in mind please post it ,so that i can dig into it .

anyway Thanks once again
thumbnail
Tejas Kanani,修改在12 年前。

RE: regd:<Portlet:DefineObjects> tag in jsp

Liferay Master 帖子: 654 加入日期: 09-1-6 最近的帖子
On top of that if you include <liferay-theme:defineObjects /> it will put a whole bunch of context sensitive objects into our JSP page context. Below is the list for the same.

  • ThemeDisplay themeDisplay
  • Company company
  • Account account
  • User user
  • User realUser
  • Contact contact
  • Layout layout
  • List<Layout> layouts
  • long plid
  • LayoutTypePortlet layoutTypePortlet
  • long scopeGroupId
  • PermissionChecker permissionChecker
  • Locale locale
  • TimeZone timeZone
  • Theme theme
  • ColorScheme colorScheme
  • PortletDisplay portletDisplay
  • long portletGroupId

For more details on that refer below link.
http://www.liferay.com/web/raymond.auge/blog/-/blogs/809893
thumbnail
Ashok Kumar G,修改在8 年前。

RE: regd:<Portlet:DefineObjects> tag in jsp

Junior Member 帖子: 27 加入日期: 11-11-16 最近的帖子
These are the taglib's you need to import to use the above:

&lt;%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet"%&gt;
&lt;%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%&gt;
&lt;%@ taglib uri="http://liferay.com/tld/theme" prefix="theme" %&gt;

<portlet:defineobjects />
<theme:defineobjects />