UIX 2.2.16

oracle.cabo.ui.action
Class FireAction

java.lang.Object
  |
  +--oracle.cabo.ui.action.ClientAction
        |
        +--oracle.cabo.ui.action.FireAction
Direct Known Subclasses:
FirePartialAction

public class FireAction
extends ClientAction

ClientAction implementation which fires or submits an event which can be used to re-render dependent components. When the FireAction is triggered, an "update" event is sent to the application. The event may specify the following event parameters:

The event will be sent either with a form submit or a page redraw. The submit action is provided as a substitute for the JavaScript submitForm() API to allow clients to trigger form submission without having to write JavaScript code. A submitted FormAction always submits the form which contains the UINode that triggers the action. Clients may optionally specifiy whether the form should be submitted without validation, as well as additional parameters to submit with the form.


Field Summary
protected static java.lang.String FULL_END_SCRIPT
           
protected static java.lang.String FULL_START_SCRIPT
           
 
Constructor Summary
FireAction()
          Creates a FireAction which will fire an update event by submiting the enclosing form.
FireAction(java.lang.String event)
          Creates a FireAction which will submit the enclosing form with the specified event name.
FireAction(java.lang.String event, boolean submit)
          Creates a FireAction with the specified event name.
 
Method Summary
protected static void appendClientParameters(RenderingContext context, java.lang.StringBuffer buffer, Parameter[] parameters)
           
protected static void appendJSParameter(java.lang.StringBuffer buffer, java.lang.String value)
           
protected static void appendURLParameter(java.lang.StringBuffer buffer, java.lang.String name, java.lang.String value)
           
protected static int getBufferSize(RenderingContext context, java.lang.String startScript, java.lang.String endScript, java.lang.String destination, java.lang.String formName, java.lang.String event, java.lang.String source, java.lang.String partialTargets, java.lang.String eventKey, java.lang.String sourceKey, java.lang.String partialTargetsKey, java.lang.String returnScript, Parameter[] parameters)
           
protected  java.lang.String getChangeScript(RenderingContext context, UINode node, java.lang.String returnScript)
           
protected  java.lang.String getChangeScript(RenderingContext context, UINode node, java.lang.String returnScript, java.lang.String startScript, java.lang.String endScript, java.lang.String extraKey, java.lang.String extraValue)
           
protected static int getClientParametersSize(RenderingContext context, Parameter[] parameters)
          Computes the buffer size for client-defined parameters
protected static java.lang.String getDestination(RenderingContext context, UINode node)
           
 java.lang.String getEvent()
          Returns the name of the event that is sent when this ClientAction is activated.
protected  java.lang.String getEventValue(RenderingContext context)
           
protected  java.lang.String getFormName(RenderingContext context, UINode node)
           
 Parameter[] getParameters()
          Returns the parameters that are submitted when the action is invoked.
 Parameter[] getParameters(RenderingContext context, UINode node)
          Returns an array of all parameters to this ClientAction.
 java.lang.String getScript(RenderingContext context, UINode node, java.lang.Boolean returnVal)
          Implementation of ClientAction.getScript().
 java.lang.String getSource()
          Returns the name of the source that is sent when this ClientAction is activated.
protected  java.lang.String getSource(RenderingContext context, UINode node)
           
protected static java.lang.String getSourceKey(URLEncoder encoder, java.lang.String source)
           
protected  java.lang.String getSubmitScript(RenderingContext context, UINode node, java.lang.String returnScript)
           
 boolean isFormSubmitted()
          Tests whether or not this event will be delivered via a form submit.
 boolean isUnvalidated()
          Tests whether or not validation is performed when the action is executed.
protected  boolean isUnvalidated(RenderingContext context)
           
 boolean renderAsEvent(RenderingContext context, UINode node)
          Override of ClientAction.renderAsEvent().
 void setEvent(java.lang.String event)
          Sets the event name.
 void setEventBinding(BoundValue eventBinding)
          Sets a BoundValue that will dynamically evaluate the event name.
 void setFormName(java.lang.String formName)
          Sets the source of this action.
 void setFormNameBinding(BoundValue formNameBinding)
          Sets a BoundValue that will dynamically evaluate the source
 void setFormSubmitted(boolean submitted)
          Sets whether or not the event is sent with a form submit or a GET.
 void setformSubmittedBinding(BoundValue submittedBinding)
          Deprecated. use setFormSubmittedBinding instead
 void setFormSubmittedBinding(BoundValue submittedBinding)
          Sets the formSubmitted parameter from a { @link BoundValue }.
 void setParameters(Parameter[] parameters)
          Sets parameters to submit with the form when the action is invoked.
 void setSource(java.lang.String source)
          Sets the source of this action.
 void setSourceBinding(BoundValue sourceBinding)
          Sets a BoundValue that will dynamically evaluate the source
 void setUnvalidated(boolean unvalidated)
          Sets whether or not validation is performed when the action is executed.
 void setUnvalidatedBinding(BoundValue unvalidatedBinding)
          Sets a { @link BoundValue } that will dynamically evaluate the unvalidated value.
 void writeDependencies(RenderingContext context, UINode node)
          Override of ClientAction.writeDependencies().
 
Methods inherited from class oracle.cabo.ui.action.ClientAction
isTriggerRequired, renderTrigger, renderTrigger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FULL_START_SCRIPT

protected static final java.lang.String FULL_START_SCRIPT

FULL_END_SCRIPT

protected static final java.lang.String FULL_END_SCRIPT
Constructor Detail

FireAction

public FireAction()
Creates a FireAction which will fire an update event by submiting the enclosing form.

FireAction

public FireAction(java.lang.String event)
Creates a FireAction which will submit the enclosing form with the specified event name.
Parameters:
event - The name of the event that should be sent when the FireAction is activated. If null, the event name defaults to "update".

FireAction

public FireAction(java.lang.String event,
                  boolean submit)
Creates a FireAction with the specified event name.
Parameters:
event - The name of the event that should be sent when the FireAction is activated. If null, the event name defaults to "update".
submit - Whether or not a form submit will be used to fire the event
Method Detail

getScript

public java.lang.String getScript(RenderingContext context,
                                  UINode node,
                                  java.lang.Boolean returnVal)
Implementation of ClientAction.getScript().
Overrides:
getScript in class ClientAction
Following copied from class: oracle.cabo.ui.action.ClientAction
Parameters:
context - The current RenderingContext.
node - The target UINode.
returnVal - Determines whether the final script will return. true or false.

writeDependencies

public void writeDependencies(RenderingContext context,
                              UINode node)
                       throws java.io.IOException
Override of ClientAction.writeDependencies().
Overrides:
writeDependencies in class ClientAction
Following copied from class: oracle.cabo.ui.action.ClientAction
Parameters:
context - The current RenderingContext.
node - The target UINode.

getSubmitScript

protected java.lang.String getSubmitScript(RenderingContext context,
                                           UINode node,
                                           java.lang.String returnScript)

getChangeScript

protected java.lang.String getChangeScript(RenderingContext context,
                                           UINode node,
                                           java.lang.String returnScript)

getChangeScript

protected java.lang.String getChangeScript(RenderingContext context,
                                           UINode node,
                                           java.lang.String returnScript,
                                           java.lang.String startScript,
                                           java.lang.String endScript,
                                           java.lang.String extraKey,
                                           java.lang.String extraValue)

getParameters

public final Parameter[] getParameters()
Returns the parameters that are submitted when the action is invoked.

getParameters

public Parameter[] getParameters(RenderingContext context,
                                 UINode node)
Description copied from class: ClientAction
Returns an array of all parameters to this ClientAction. This array will include any parameters generated by this ClientAction itself (e.g. event, source), and all parameters provided by the client.
Overrides:
getParameters in class ClientAction
Following copied from class: oracle.cabo.ui.action.ClientAction
Parameters:
context - The current RenderingContext.
node - The target UINode.

getSource

public final java.lang.String getSource()
Returns the name of the source that is sent when this ClientAction is activated.

getEvent

public final java.lang.String getEvent()
Returns the name of the event that is sent when this ClientAction is activated.

isFormSubmitted

public final boolean isFormSubmitted()
Tests whether or not this event will be delivered via a form submit.

Returns:
Returns true to indicate that the action will cause a form submit.

isUnvalidated

public final boolean isUnvalidated()
Tests whether or not validation is performed when the action is executed.

Returns:
Returns true to indicate that the action will be invoked without performing validation. Returns false to indicate that validation will be performed.

renderAsEvent

public boolean renderAsEvent(RenderingContext context,
                             UINode node)
Override of ClientAction.renderAsEvent().
Overrides:
renderAsEvent in class ClientAction
Following copied from class: oracle.cabo.ui.action.ClientAction
Parameters:
context - The current RenderingContext.
node - The target UINode.
See Also:
getParameters()

setFormName

public void setFormName(java.lang.String formName)
Sets the source of this action.

setFormNameBinding

public void setFormNameBinding(BoundValue formNameBinding)
Sets a BoundValue that will dynamically evaluate the source

setEvent

public void setEvent(java.lang.String event)
Sets the event name.

setEventBinding

public void setEventBinding(BoundValue eventBinding)
Sets a BoundValue that will dynamically evaluate the event name.

setSource

public void setSource(java.lang.String source)
Sets the source of this action.

setSourceBinding

public void setSourceBinding(BoundValue sourceBinding)
Sets a BoundValue that will dynamically evaluate the source

setParameters

public void setParameters(Parameter[] parameters)
Sets parameters to submit with the form when the action is invoked.

setFormSubmitted

public void setFormSubmitted(boolean submitted)
Sets whether or not the event is sent with a form submit or a GET.

Parameters:
submitted - Boolean value indicating whether or not this event should be passed via a form submit.

setformSubmittedBinding

public void setformSubmittedBinding(BoundValue submittedBinding)
Deprecated. use setFormSubmittedBinding instead

Sets the formSubmitted parameter from a { @link BoundValue }.

setFormSubmittedBinding

public void setFormSubmittedBinding(BoundValue submittedBinding)
Sets the formSubmitted parameter from a { @link BoundValue }.

setUnvalidated

public void setUnvalidated(boolean unvalidated)
Sets whether or not validation is performed when the action is executed.

Parameters:
unvalidated - Boolean value indicating whether or not validation should be performed when invoking the action. If true, no validation is performed. By default, unvalidated is false, in which case validation is performed.

setUnvalidatedBinding

public void setUnvalidatedBinding(BoundValue unvalidatedBinding)
Sets a { @link BoundValue } that will dynamically evaluate the unvalidated value.

getEventValue

protected java.lang.String getEventValue(RenderingContext context)

isUnvalidated

protected boolean isUnvalidated(RenderingContext context)

appendJSParameter

protected static void appendJSParameter(java.lang.StringBuffer buffer,
                                        java.lang.String value)

appendURLParameter

protected static void appendURLParameter(java.lang.StringBuffer buffer,
                                         java.lang.String name,
                                         java.lang.String value)

appendClientParameters

protected static void appendClientParameters(RenderingContext context,
                                             java.lang.StringBuffer buffer,
                                             Parameter[] parameters)

getClientParametersSize

protected static int getClientParametersSize(RenderingContext context,
                                             Parameter[] parameters)
Computes the buffer size for client-defined parameters

getBufferSize

protected static int getBufferSize(RenderingContext context,
                                   java.lang.String startScript,
                                   java.lang.String endScript,
                                   java.lang.String destination,
                                   java.lang.String formName,
                                   java.lang.String event,
                                   java.lang.String source,
                                   java.lang.String partialTargets,
                                   java.lang.String eventKey,
                                   java.lang.String sourceKey,
                                   java.lang.String partialTargetsKey,
                                   java.lang.String returnScript,
                                   Parameter[] parameters)

getDestination

protected static java.lang.String getDestination(RenderingContext context,
                                                 UINode node)

getSourceKey

protected static java.lang.String getSourceKey(URLEncoder encoder,
                                               java.lang.String source)

getSource

protected java.lang.String getSource(RenderingContext context,
                                     UINode node)

getFormName

protected java.lang.String getFormName(RenderingContext context,
                                       UINode node)

UIX 2.2.16