|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--oracle.portal.provider.v1.http.PortletPageLocator
|
+--oracle.portal.provider.v1.RenderManager
RenderManager implements a model whereby users can plug
in individual renderers which handle a request for a specific render
mode in a specific content type. Any class that implements the ManagedRenderer interface can be used with RenderManager.
Consult the JPDK documentation for information about the various renderers
supplied with the JPDK.
The individual ManagedRenderers controlled by a
RenderManager are registered by calling the
set<ModeName>Page(Object) methods (e.g. PortletPageLocator.setShowPage(Object)), which associate a renderer with a
specific render mode. If you are using DefaultProvider, these calls
are made automatically when you include the appropriate tags in your
provider XML registry file. For example:
Multiple
<showPage class="oracle.portal.provider.v1.http.JspRenderer">
<contentType>text/html</contentType>
<name>hello.jsp</name>
<appPath>/helloworld</appPath>
<appRoot>/htdocs/helloworld</appRoot>
</showPage>
ManagedRenderers can be registered for a single render
mode, provided they all handle different content types (i.e. their ManagedRenderer.getContentType() methods return different values). When
locating the appropriate ManagedRenderer to service a
particular render request, RenderManager will look for the
first ManagedRenderer registered for the requested render mode
whose content type matches the 'preferred content type' of the request. This
allows a RenderManager to be configured so that it supports
'standard' browsers (e.g. with a "text/html" content type) as
well as mobile devices (e.g. with a "text/vnd.oracle.mobilexml" content
type).
RenderManager also supports registration of default
renderers, controlled by PortletPageLocator.setDefaultPage(Object) or the
<defaultPage> tag. If unable to locate a
ManagedRenderer for the requested render mode and content type
and a default renderer has been registered with the appropriate content
type, RenderManager will pass the request on to that
renderer.
For those ManagedRenderers subclassed from the Page
abstract class (i.e. JspRenderer and FileRenderer,
RenderManager supports a set of defaults for the individual
properties of these renderers. This allows a RenderManager's
Pagess to be configured by specifying only the properties of
each which differ from the defaults defined at RenderManager
level. These 'defaultable properties' include:
appPath
appRoot
pageName
charSet
pageParameterNamePage javadoc for more information.
If all of a Page's defaultable properties conform to the
defaults set on the RenderManager, then a special 'shorthand'
style of XML declaration can be used to configure an instance, where a page
name is included directly inside a 'page' tag, e.g.
<showPage>my.jsp</showPage>. Support for these
'shorthand' declarations are provided by the
set<ModeName>Page(String) methods (e.g. PortletPageLocator.setShowPage(String)). If the page name is suffixed by
".jsp" or ".sqljsp", then it is assumed that the JspRenderer is
to be used; otherwise, it is assumed that the FileRenderer
should be used. Consult the supplied documentation for more detailed
instructions and examples.
By default, RenderManager will automatically render portlet
containers for you. To disable the automatic rendering of the container call
setRenderContainer(false). Alternatively, you can set this in
the provider XML registry:
<renderContainer>false</renderContainer>
When renderering a Portlet's container, RenderManager will
render the user's customized title (label) if the Portlet supports
personalization and if the personalization data class implements PersonalizationObject or is subclassed from BaseCustomization.
| Constructor Summary | |
RenderManager()
Null Constructor |
|
| Method Summary | |
java.lang.String |
getEditFormParameter()
Gets the String to be used as the hidden action parameter on customize forms |
boolean |
getRenderContainer()
Gets the boolean flag used by RenderManager to decide
whether or not it renders the portlet's container. |
boolean |
getRenderCustomize()
Gets the boolean flag used by RenderManager to decide
whether or not it renders the portlet's customize container. |
void |
postInitialize()
Performs the extra steps required to initialize and validate a RenderManager once its properties have been set with the
appropriate accessor methods. |
void |
preInitialize(java.lang.Object o)
Performs the steps required to initialize this RenderManager after it has been constructed. |
void |
render(PortletRenderRequest pr)
Renders the requested mode in the requested content type with an appropriate renderer. |
void |
setEditFormParameter(java.lang.String param)
Sets the hidden parameter used on customize forms to hold the form's action. |
void |
setRenderContainer(boolean value)
Controls whether RenderManager renders the portlet's
container. |
void |
setRenderContainer(java.lang.String value)
Controls whether RenderManager renders the portlet's
container. |
void |
setRenderCustomize(boolean value)
Controls whether RenderManager renders the portlet's
customize container. |
void |
setRenderCustomize(java.lang.String value)
Controls whether RenderManager renders the portlet's
customize container. |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public RenderManager()
| Method Detail |
public void render(PortletRenderRequest pr)
throws PortletException,
PortletNotFoundException,
AccessControlException
pr - a PortletRenderRequestpublic void setEditFormParameter(java.lang.String param)
param - the parameter name.public java.lang.String getEditFormParameter()
public void setRenderContainer(boolean value)
RenderManager renders the portlet's
container.value - Boolean flag to tell RenderManager to either
render the portlet's container (true) or not
(false). true by default.public void setRenderContainer(java.lang.String value)
RenderManager renders the portlet's
container.value - String representation of boolean value, indicating whether
RenderManager should render the portlet's container
("true") or not ("false"). "true"
by default.public boolean getRenderContainer()
RenderManager to decide
whether or not it renders the portlet's container.public void setRenderCustomize(boolean value)
RenderManager renders the portlet's
customize container.value - Boolean flag to tell RenderManager to either
render the portlet's customize container (true) or not
(false). true by default.public void setRenderCustomize(java.lang.String value)
RenderManager renders the portlet's
customize container.value - String representation of boolean value, indicating whether
RenderManager should render the portlet's customize
container ("true") or not ("false").
"true" by default.public boolean getRenderCustomize()
RenderManager to decide
whether or not it renders the portlet's customize container.
public void preInitialize(java.lang.Object o)
throws NodeHandlerException
RenderManager after it has been constructed. Currently,
this method sets the default edit form action parameter. This will be
overridden if the user calls setEditFormParameter() on
RenderManager, e.g. by including an information tag
<editFormParameter> in the provider registry.o - the object that will become this object's parent
public void postInitialize()
throws NodeHandlerException
RenderManager once its properties have been set with the
appropriate accessor methods.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||