|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.portal.provider.v2.render.ManagedRenderer oracle.portal.provider.v2.render.http.BaseManagedRenderer oracle.portal.provider.v2.render.http.AbstractResourceRenderer oracle.portal.provider.v2.render.http.StrutsRenderer
public class StrutsRenderer
This class is used as an adapter to a Struts application.
There are two modes of behaviour for this renderer chosen by calling
setActionInSession
with true
or
false
.
In the default (false) mode the Struts action is passed into the renderer as a persistent parameter generated by one of the PDK specific navigation tags. This then becomes a resource path to which the request is forwarded.
The first time a portlet instance using this renderer is called there is no
Struts action in the request and the action specified in the method
setDefaultAction
is used instead.
If setActionInSession
is called with true
, as
well as the behaviour described above, the Struts action is saved as a
session attribute. This enables the state or page of a Struts portlet to be
stored when a user navigates away from a page containing a Struts portlet.
It does of course mean that the provider must be session based to use this
feature.
Field Summary | |
---|---|
static java.lang.String |
STRUTS_ACTION
The Struts action parameter name |
Constructor Summary | |
---|---|
StrutsRenderer()
This constructor is called by a RenderManager object. |
Method Summary | |
---|---|
java.lang.String |
getDefaultAction()
Returns the default Struts servlet action. |
java.lang.String |
getRequestResourcePath(PortletRenderRequest prr)
Returns a context relative path pointing to the resource to be rendered, in this case it is a Struts action path. |
void |
setActionInSession(boolean storeAction)
Sets the flag to choose whether or not to store the Struts action in the provider session. |
void |
setActionInSession(java.lang.String storeAction)
Sets the flag to choose whether or not to store the Struts action in the provider session. |
void |
setDefaultAction(java.lang.String action)
Sets the default Struts servlet action to be used if none is present in the portlet request. |
void |
validate(java.lang.String context,
ValidationError errors)
Called by the framework when the provider definition is loaded or refreshed in response to a Portal message or when the test page is called. |
Methods inherited from class oracle.portal.provider.v2.render.http.AbstractResourceRenderer |
---|
getCharSet, getContext, prepareResponse, renderBody, setCharSet |
Methods inherited from class oracle.portal.provider.v2.render.http.BaseManagedRenderer |
---|
addParameter, getContentType, getGeneratesESI, postInitialize, preInitialize, setContentType, setGeneratesESI, setGeneratesESI, setPageExpires, setPageExpires, setUseInvalidationCaching, setUseInvalidationCaching |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STRUTS_ACTION
Constructor Detail |
---|
public StrutsRenderer()
RenderManager
object. Pre-
initialisation checks are carried out by the framework in
BaseManagedRenderer.preInitialize(java.lang.Object)
.
Method Detail |
---|
public void validate(java.lang.String context, ValidationError errors)
validate
in interface Validateable
validate
in class BaseManagedRenderer
context
- The context of the calling instance.errors
- The current list of errors.public void setDefaultAction(java.lang.String action)
Most likely to be called when the provider definition is loaded.
action
- the default action name. The code uses an action name
starting with the '/' character but will add one if none is
present.public java.lang.String getDefaultAction()
public void setActionInSession(boolean storeAction)
If set to true and if a user navigates away from a Portal page that includes a Struts portlet and then back again, the Struts application state is stored as a session attribute. By default, this flag is false.
storeAction
- action stored in session if set to truepublic void setActionInSession(java.lang.String storeAction)
If set to true and if a user navigates away from a Portal page that includes a Struts portlet and then back again, the Struts application state is restored. By default, this flag is set to false.
storeAction
- action stored in session if set to "true" or "TRUE"public java.lang.String getRequestResourcePath(PortletRenderRequest prr) throws PortletException
The first time the renderer is called the default action will be returned. Subsequent calls will contain the Struts action as a parameter unless the renderer is set to store the action as a session attribute.
getRequestResourcePath
in class AbstractResourceRenderer
prr
- the portlet request
PortletException
|
Oracle Fusion Middleware Java API Reference for Oracle PDK Java 11g Release 1 (11.1.1) E10691-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |