com.ibm.xsp.actions.client
Class ExecuteScriptClientAction

java.lang.Object
  extended by javax.faces.el.MethodBinding
      extended by com.ibm.xsp.binding.MethodBindingEx
          extended by com.ibm.xsp.actions.client.AbstractClientSimpleAction
              extended by com.ibm.xsp.actions.client.ExecuteScriptClientAction
All Implemented Interfaces:
ClientSimpleAction, ComponentBindingObject, ValueBindingObject, javax.faces.component.StateHolder

public class ExecuteScriptClientAction
extends AbstractClientSimpleAction

Simple client side action that executes a piece of Script, the "xp:executeClientScript" tag used in the XPage source.


Field Summary
 
Fields inherited from class com.ibm.xsp.binding.MethodBindingEx
ENABLE_SOURCEID
 
Constructor Summary
ExecuteScriptClientAction()
           
 
Method Summary
 java.lang.String getExpressionString()
          Returns the empty string by default, as expression returned for the Simple Action may require a runtime context for generating the actual JavaScript.
 java.lang.String getScript()
           
 java.lang.Class getType(javax.faces.context.FacesContext context)
          Return the type of the script.
 java.lang.Object invoke(javax.faces.context.FacesContext context, java.lang.Object[] params)
          Return the script code to be added to the page
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object value)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setScript(java.lang.String script)
           
 
Methods inherited from class com.ibm.xsp.binding.MethodBindingEx
getComponent, getFacesContext, getParamNames, getParent, getSourceReferenceId, getValueBinding, isTransient, normalizePageName, setComponent, setParamNames, setParent, setSourceReferenceId, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecuteScriptClientAction

public ExecuteScriptClientAction()
Method Detail

getScript

public java.lang.String getScript()
Returns:
Returns the value of the script property.

setScript

public void setScript(java.lang.String script)
Parameters:
script - Set the value of the script property.

saveState

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

restoreState

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

getExpressionString

public java.lang.String getExpressionString()
Description copied from class: AbstractClientSimpleAction
Returns the empty string by default, as expression returned for the Simple Action may require a runtime context for generating the actual JavaScript.

Overrides:
getExpressionString in class AbstractClientSimpleAction

getType

public java.lang.Class getType(javax.faces.context.FacesContext context)
                        throws javax.faces.el.MethodNotFoundException
Return the type of the script. Always returns String.

Overrides:
getType in class AbstractClientSimpleAction
Throws:
javax.faces.el.MethodNotFoundException

invoke

public java.lang.Object invoke(javax.faces.context.FacesContext context,
                               java.lang.Object[] params)
                        throws javax.faces.el.EvaluationException,
                               javax.faces.el.MethodNotFoundException
Return the script code to be added to the page

Specified by:
invoke in class javax.faces.el.MethodBinding
Throws:
javax.faces.el.EvaluationException
javax.faces.el.MethodNotFoundException