掲示板

regd:<Portlet:DefineObjects> tag in jsp

13年前 に Srikanth Reddy によって更新されました。

regd:<Portlet:DefineObjects> tag in jsp

Junior Member 投稿: 53 参加年月日: 10/06/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
13年前 に Arun Kumar S によって更新されました。

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

Regular Member 投稿: 182 参加年月日: 08/06/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
13年前 に Srikanth Reddy によって更新されました。

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

Junior Member 投稿: 53 参加年月日: 10/06/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
12年前 に Tejas Kanani によって更新されました。

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

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
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
8年前 に Ashok Kumar G によって更新されました。

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 />