Forums de discussion

regd:<Portlet:DefineObjects> tag in jsp

Srikanth Reddy, modifié il y a 13 années.

regd:<Portlet:DefineObjects> tag in jsp

Junior Member Publications: 53 Date d'inscription: 18/06/10 Publications récentes
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, modifié il y a 13 années.

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

Regular Member Publications: 182 Date d'inscription: 23/06/08 Publications récentes
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, modifié il y a 13 années.

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

Junior Member Publications: 53 Date d'inscription: 18/06/10 Publications récentes
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, modifié il y a 12 années.

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

Liferay Master Publications: 654 Date d'inscription: 06/01/09 Publications récentes
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, modifié il y a 8 années.

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

Junior Member Publications: 27 Date d'inscription: 16/11/11 Publications récentes
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 />