| JavaServer Faces application factory that enables Page Flow integration. It is activated like this in
faces-config.xml:
<factory>
<application-factory>org.apache.beehive.netui.pageflow.faces.PageFlowApplicationFactory</application-factory>
</factory>
JSF/Page Flow integration has the following features:
-
A JSF component like CommandLink or CommandButton can raise a Page Flow action simply by specifying the
action name in its
action attribute, like this:
<h:commandLink action="someAction" value="raise a Page Flow action"/>
The component can send a form bean to the action by adding a "submitFormBean" attribute with a binding
expression that will determine the bean instance:
<h:commandLink action="someAction" value="submit a form bean to a Page Flow action">
<f:attribute name="submitFormBean" value="backing.theForm"/>
</h:commandLink>
In the example above, the value returned from the backing bean's getTheForm method will be
sent to the "someAction" action in the page flow.
-
A
org.apache.beehive.netui.pageflow.FacesBackingBean instance will be created whenever a
corresponding JSF path is requested (e.g., an instance of FacesBackingBean-derived foo.MyPage will be created
for the webapp-relative path "/foo/MyPage.faces"). The instance will be released (removed from the user
session) when a non-matching path is requested. A faces backing bean can hold component references and
event/command handlers, and it can raise actions with normal JSF command event handlers that are annotated
with
org.apache.beehive.netui.pageflow.annotations.Jpf.CommandHandler @Jpf.CommandHandler .
The bean instance can be bound to with a JSF-style expression like
#{backing.myComponent} .
-
When a Page Flow action goes back to a JSF page through the
currentPage or
previousPage values for
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward.navigateTo navigateTo on
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward , the page's backing
bean and component tree are restored.
|