Pages

Thursday, April 25, 2013

Default Objects in jsp page [ Liferay ]

Link src :

There are some default objects in jsp page we are using in liferay apart from the actual default objects of liferay. But unfortunately we don't know how many default objects providing by liferay.
After little investigation I came to know all the default objects which are providing by liferay.
There are two taglibs which we are including every time when we create portlet.

Portlet tag lib

The above statements will give 14 default objects :
  1. actionRequest
  2. actionResponse
  3. eventRequest
  4. eventResponse
  5. portletConfig
  6. portletName
  7. portletPreferences
  8. portletPreferencesValues
  9. portletSession
  10. portletSessionScope
  11. renderRequest
  12. renderResponse
  13. resourceRequest
  14. resourceResponse
And the type of each object as follows :

liferay-theme tag lib

The above statements will give 18 default objects :
  1. themeDisplay
  2. company
  3. account
  4. user
  5. realUser
  6. contact
  7. layout
  8. layouts
  9. plid
  10. layoutTypePortlet
  11. scopeGroupId
  12. permissionChecker
  13. locale
  14. timeZone
  15. theme
  16. colorScheme
  17. portletDisplay
  18. portletGroupId
and the type of each object as follows :
We can get these defaults objects using pageContext object which is default of the plain jsp. Below statement is the example for getting default objects.
ActionRequest actionRequest = (ActionRequest) pageContext.findAttribute(“actionRequest”);

No comments:

Post a Comment