Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Srikanth Reddy
regd:<Portlet:DefineObjects> tag in jsp
September 27, 2010 10:42 PM
Answer

Srikanth Reddy

Rank: Junior Member

Posts: 53

Join Date: June 17, 2010

Recent Posts

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
RE: regd:<Portlet:DefineObjects> tag in jsp
September 27, 2010 11:08 PM
Answer

Arun Kumar S

Rank: Regular Member

Posts: 182

Join Date: June 23, 2008

Recent Posts

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
RE: regd:<Portlet:DefineObjects> tag in jsp
September 28, 2010 12:39 AM
Answer

Srikanth Reddy

Rank: Junior Member

Posts: 53

Join Date: June 17, 2010

Recent Posts

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
Tejas Kanani
RE: regd:<Portlet:DefineObjects> tag in jsp
May 12, 2011 3:13 AM
Answer

Tejas Kanani

Rank: Liferay Master

Posts: 656

Join Date: January 6, 2009

Recent Posts

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
Ashok Kumar G
RE: regd:<Portlet:DefineObjects> tag in jsp
October 26, 2015 12:53 AM
Answer

Ashok Kumar G

Rank: Junior Member

Posts: 29

Join Date: November 16, 2011

Recent Posts

These are the taglib's you need to import to use the above:

1<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet"%>
2<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
3<%@ taglib uri="http://liferay.com/tld/theme" prefix="theme" %>
4
5<portlet:defineObjects/>
6<theme:defineObjects />