FlowController
Base class for user-defined state and controller logic associated with a particular web application directory. The source code for this class lives in the directory with a ".jpf" extension, and is automatically recompiled by the server whenever necessary. When a request arrives for any ".jpf", ".jsp", or ".do" in the directory, an instance of the PageFlowController class is set as the current page flow, and remains in the session until a different one becomes active.
The user's PageFlowController class handles actions that are most commonly raised by user interaction with JSP files. The actions are handled by action methods that perform arbitrary logic and determine the next URI to be displayed.
Actions that are not handled by the current PageFlowController "bubble" up to the current
GlobalApp
instance.
Data in the current PageFlowController instance can be accessed by databinding tags using the
pageFlow
scope.
Related Topics
Object
Action
FlowController
PageFlowController
EventListener
, HttpSessionBindingListener
, PageFlowConstants
, Serializable
Field Summary |
Fields from org.apache.struts.action. |
ACTION_SERVLET_KEY, APPLICATION_KEY, DATA_SOURCE_KEY, defaultLocale, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGE_KEY, MESSAGES_KEY, MULTIPART_KEY, PLUG_INS_KEY, REQUEST_PROCESSOR_KEY, servlet, SERVLET_KEY, TRANSACTION_TOKEN_KEY |
Constructor Summary |
|
Method Summary |
public void |
|
protected |
|
public final |
|
public | |
public |
|
public final |
|
protected |
|
protected |
|
protected |
|
public final |
|
protected |
|
public |
|
protected boolean |
|
public boolean |
|
public void |
|
Methods from com.bea.wlw.netui.pageflow. |
|
Methods from org.apache.struts.action. |
execute, execute, generateToken, getDataSource, getDataSource, getLocale, getResources, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, perform, perform, resetToken, saveErrors, saveMessages, saveToken, setLocale, setServlet, toHex |
Methods from class java.lang. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods from interface javax.servlet.http. |
valueBound, valueUnbound |
Constructor Detail |
public PageFlowController()
Method Detail |
public void ensureFailover(HttpServletRequest
request)
Ensures that any changes to this FlowController will be replicated in a cluster (for failover),
even if the replication scheme uses a change-detection algorithm that relies on
HttpSession.setAttribute to be aware of changes.
FlowController.ensureFailover(HttpServletRequest)
protected String
getCurrentForwardPath()
Get the webapp-relative URI for the most recent page (in this page flow) shown to the user.
Note: if the current page flow does not use a @jpf:forward
with a
return-to="previousPage"
or return-to="currentPage"
attribute, then this method will always return null
by default. To enable
it in this situation, add the following method to the page flow:
protected boolean alwaysTrackPreviousPage()
{
return true;
}
Related Topics
PageFlowController.getPreviousPageInfo()
PageFlowController.getCurrentPageInfo()
PageFlowController.getPreviousActionInfo()
PageFlowController.getPreviousActionURI()
PageFlowController.getPreviousForm()
PageFlowController.getPreviousForwardPath()
public final PreviousPageInfo
getCurrentPageInfo()
Get information about the most recent page (in this page flow) shown to the user.
Note: if the current page flow does not use a @jpf:forward
with a
return-to="previousPage"
or return-to="currentPage"
attribute, then this method will always return null
by default. To enable
it in this situation, add the following method to the page flow:
protected boolean alwaysTrackPreviousPage()
{
return true;
}
Related Topics
PageFlowController.getPreviousPageInfo()
PageFlowController.getPreviousActionInfo()
PageFlowController.getPreviousActionURI()
PageFlowController.getPreviousForm()
PageFlowController.getPreviousForwardPath()
PageFlowController.getCurrentForwardPath()
public String
getDisplayName()
FlowController.getDisplayName()
public String
getModulePath()
Get the Struts module path for this page flow.
FlowController.getModulePath()
public final PreviousActionInfo
getPreviousActionInfo()
Get information about the most recent action run in this page flow.
Note: if the current page flow does not use a @jpf:forward
with a
return-to="previousAction"
attribute, then this method will always return
null
by default. To enable it in this situation, add the following method
to the page flow:
protected boolean alwaysTrackPreviousAction()
{
return true;
}
Related Topics
PageFlowController.getPreviousPageInfo()
PageFlowController.getCurrentPageInfo()
PageFlowController.getPreviousActionURI()
PageFlowController.getPreviousForm()
PageFlowController.getPreviousForwardPath()
PageFlowController.getCurrentForwardPath()
protected String
getPreviousActionURI()
Get the URI for the most recent action in this PageFlowController.
Note: if the current page flow does not use a @jpf:forward
with a
return-to="previousAction"
attribute, then this method will always return
null
by default. To enable it in this situation, add the following method
to the page flow:
protected boolean alwaysTrackPreviousAction()
{
return true;
}
Related Topics
PageFlowController.getPreviousPageInfo()
PageFlowController.getCurrentPageInfo()
PageFlowController.getPreviousActionInfo()
PageFlowController.getPreviousForm()
PageFlowController.getPreviousForwardPath()
PageFlowController.getCurrentForwardPath()
protected ActionForm
getPreviousForm()
Get the form instance from the most recent action execution in this PageFlowController.
Note: if the current page flow does not use a @jpf:forward
with a
return-to="previousAction"
attribute, then this method will always return
null
by default. To enable it in this situation, add the following method
to the page flow:
protected boolean alwaysTrackPreviousAction()
{
return true;
}
null
if there was no ActionForm instance. Related Topics
PageFlowController.getPreviousPageInfo()
PageFlowController.getCurrentPageInfo()
PageFlowController.getPreviousActionInfo()
PageFlowController.getPreviousActionURI()
PageFlowController.getPreviousForwardPath()
PageFlowController.getCurrentForwardPath()
protected String
getPreviousForwardPath()
Get the webapp-relative URI for the previous page (in this page flow) shown to the user.
The previous page is the one shown before the most recent page.
Note: if the current page flow does not use a @jpf:forward
with a
return-to="previousPage"
or return-to="currentPage"
attribute, then this method will always return null
by default. To enable
it in this situation, add the following method to the page flow:
protected boolean alwaysTrackPreviousPage()
{
return true;
}
Related Topics
PageFlowController.getPreviousPageInfo()
PageFlowController.getCurrentPageInfo()
PageFlowController.getPreviousActionInfo()
PageFlowController.getPreviousActionURI()
PageFlowController.getPreviousForm()
PageFlowController.getCurrentForwardPath()
public final PreviousPageInfo
getPreviousPageInfo()
Get information about the previous page (in this page flow) shown to the user. The previous
page is the one shown before the most recent page.
Note: if the current page flow does not use a @jpf:forward
with a
return-to="previousPage"
or return-to="currentPage"
attribute, then this method will always return null
by default. To enable
it in this situation, add the following method to the page flow:
protected boolean alwaysTrackPreviousPage()
{
return true;
}
Related Topics
PageFlowController.getCurrentPageInfo()
PageFlowController.getPreviousActionInfo()
PageFlowController.getPreviousActionURI()
PageFlowController.getPreviousForm()
PageFlowController.getPreviousForwardPath()
PageFlowController.getCurrentForwardPath()
protected String
getTaxonomy()
Get the "resource taxonomy": a period-separated list that starts with the current
web application name, continues through all of this PageFlowController's parent directories,
and ends with this PageFlowController's class name.
public String
getURI()
Get the URI for addressing this PageFlowController.
protected boolean isNestable()Tell whether this PageFlowController can be "nested", i.e., if it can be invoked from another page flow with the intention of returning to the original one. Page flows are declared to be nested using the
@jpf:controller nested="true"
annotation.
FlowController.isNestable()
true
if this PageFlowController can be nested. public boolean isPageFlow()Tell whether this is a PageFlowController.
FlowController.isPageFlow()
true
.
public void valueUnbound(HttpSessionBindingEvent
event)
Callback when this page flow is removed from the user session. Causes PageFlowController.onDestroy()
to be called.
FlowController.valueUnbound(HttpSessionBindingEvent)