This section includes some sample code fragments for Provider to Portlet conversion.
PortletRequestDispatcher dispatcher = pContext.getRequestDispatcher("test.jsp"); dispatcher.include(request, response); |
Help documentation for portlets follows a different scheme than in the providers. The help file name is stored as a preference and content is generated from that file the same way as any other content type.
In Provider, this method returns a helpURL which can be pointing to a static help file.
For portlets, this method has to be implemented for writing out the help content dynamically.
For ProviderAdapter, this method returns the title from the Display Profile title property.
For portlets, the title is returned by the portlet implementation.
For a provider, the editType display profile property can be specified to determine whether the provider implementation will draw the complete edit page or a subset of it.
For portlets, the editType is always EDIT_COMPLETE and the complete page including the form, the Finish, and the Cancel buttons have to be generated by the portlet. Only the banner and footer are drawn by the PortletEdit.jsp in PortalServer-DataDir/portals/portal-ID/desktop/default directory.
The
ProfileProviderAdapter.getStringProperty(key)
maps to
PortletPreferences.getValue(key, default)
The
ProfileProviderAdapter.getListProperty(key)
maps to
PortletPreferences.getValues(key, default[])