org.apache.myfaces.orchestra.conversation.jsf.components
Class UIEndConversation

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UICommand
              extended by org.apache.myfaces.orchestra.conversation.jsf.components.AbstractConversationComponent
                  extended by org.apache.myfaces.orchestra.conversation.jsf.components.UIEndConversation
All Implemented Interfaces:
javax.faces.component.ActionSource, javax.faces.component.ActionSource2, javax.faces.component.StateHolder

public class UIEndConversation
extends AbstractConversationComponent

Can be used to end a manual-scope conversation, and optionally handles exceptions thrown by action methods.

When nested within a UICommand component (eg a commandLink or commandButton) the specified conversation will be ended after the method invoked by the parent component is executed.

 <h:commandLink action="#{backing.saveAction}">
     <orchestra:endConversation name="conversation1" onOutcome="success" />
 </h:commandLink>
 

The "name" attribute is mandatory, and specifies which conversation is to be ended. The optional attributes are:

onOutcome

This is a string or comma-separated list of strings. After invoking the action associated with the nearest ancestor UICommand component, the following rules are executed: Note in particular that when this component has no enclosing UICommand component, then the specified conversation is always terminated. This is often useful on the "confirmation" page of a wizard-style page sequence.

errorOutcome

In case of an exception being thrown by the action method, use the given outcome as the new outcome so normal navigation to a specified page can occur instead of showing the default errorPage. This value is checked against the onOutcome list to determine whether the specified conversation should be terminated when an exception occurs. If an exception occurs, but no errorOutcome is specified then the conversation is never terminated.


Field Summary
static java.lang.String COMPONENT_TYPE
           
 
Fields inherited from class org.apache.myfaces.orchestra.conversation.jsf.components.AbstractConversationComponent
COMPONENT_FAMILY
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
UIEndConversation()
           
 
Method Summary
 void encodeBegin(javax.faces.context.FacesContext context)
           
 java.lang.String getErrorOutcome()
           
 java.lang.String getOnOutcome()
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setErrorOutcome(java.lang.String errorOutcome)
           
 void setOnOutcome(java.lang.String onOutcome)
           
 
Methods inherited from class org.apache.myfaces.orchestra.conversation.jsf.components.AbstractConversationComponent
getFamily, getName, setName
 
Methods inherited from class javax.faces.component.UICommand
addActionListener, broadcast, getAction, getActionExpression, getActionListener, getActionListeners, getValue, isImmediate, queueEvent, removeActionListener, setAction, setActionExpression, setActionListener, setImmediate, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, decode, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId, getValueExpression, setValueExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values
Constructor Detail

UIEndConversation

public UIEndConversation()
Method Detail

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context)
                 throws java.io.IOException
Overrides:
encodeBegin in class javax.faces.component.UIComponentBase
Throws:
java.io.IOException

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class AbstractConversationComponent

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class AbstractConversationComponent

getOnOutcome

public java.lang.String getOnOutcome()

setOnOutcome

public void setOnOutcome(java.lang.String onOutcome)

getErrorOutcome

public java.lang.String getErrorOutcome()

setErrorOutcome

public void setErrorOutcome(java.lang.String errorOutcome)


Copyright © 2009 The Apache Software Foundation. All Rights Reserved.