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 :- actionRequest
- actionResponse
- eventRequest
- eventResponse
- portletConfig
- portletName
- portletPreferences
- portletPreferencesValues
- portletSession
- portletSessionScope
- renderRequest
- renderResponse
- resourceRequest
- resourceResponse
And the type of each object as follows :
liferay-theme tag lib
The above statements will give 18 default objects :- themeDisplay
- company
- account
- user
- realUser
- contact
- layout
- layouts
- plid
- layoutTypePortlet
- scopeGroupId
- permissionChecker
- locale
- timeZone
- theme
- colorScheme
- portletDisplay
- portletGroupId
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