org.apache.beehive.netui.pageflow.faces.internal
Class BackingClassMethodBinding

Object
  extended by MethodBinding
      extended by BackingClassMethodBinding
All Implemented Interfaces:
StateHolder

public class BackingClassMethodBinding
extends MethodBinding
implements StateHolder

Internal class used in JSF/Page Flow integration. This exists to cause form beans to be submitted to Page Flow actions raised from JSF command event handlers.

See Also:
PageFlowApplicationFactory

Constructor Summary
BackingClassMethodBinding()
           
BackingClassMethodBinding(String methodName, Class[] params, MethodBinding delegate)
           
 
Method Summary
 String getExpressionString()
           
 Class getType(FacesContext context)
           
 Object invoke(FacesContext context, Object[] params)
          Before returning the result from the base MethodBinding, see if the bound method is annotated with Jpf.CommandHandler.
 boolean isTransient()
           
 void restoreState(FacesContext context, Object state)
           
 Object saveState(FacesContext context)
           
 void setTransient(boolean newTransientValue)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackingClassMethodBinding

public BackingClassMethodBinding()

BackingClassMethodBinding

public BackingClassMethodBinding(String methodName,
                                 Class[] params,
                                 MethodBinding delegate)
Method Detail

getType

public Class getType(FacesContext context)
              throws MethodNotFoundException
Specified by:
getType in class MethodBinding
Throws:
MethodNotFoundException

getExpressionString

public String getExpressionString()
Overrides:
getExpressionString in class MethodBinding

invoke

public Object invoke(FacesContext context,
                     Object[] params)
              throws EvaluationException,
                     MethodNotFoundException
Before returning the result from the base MethodBinding, see if the bound method is annotated with Jpf.CommandHandler. If it is, look through the "raiseActions" annotation array for a form bean member variable associated with the action being raised. If one is found, set it in the request so it gets passed to the action.

Specified by:
invoke in class MethodBinding
Throws:
EvaluationException
MethodNotFoundException

saveState

public Object saveState(FacesContext context)
Specified by:
saveState in interface StateHolder

restoreState

public void restoreState(FacesContext context,
                         Object state)
Specified by:
restoreState in interface StateHolder

isTransient

public boolean isTransient()
Specified by:
isTransient in interface StateHolder

setTransient

public void setTransient(boolean newTransientValue)
Specified by:
setTransient in interface StateHolder