org.apache.myfaces.trinidadinternal.ui.action
Class FirePartialAction

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.ui.action.ClientAction
      extended by org.apache.myfaces.trinidadinternal.ui.action.FireAction
          extended by org.apache.myfaces.trinidadinternal.ui.action.FirePartialAction

public class FirePartialAction
extends FireAction

An implementation of FireAction which supports Partial Page Rendering.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/ui/action/FirePartialAction.java#0 $) $Date: 10-nov-2005.18:57:43 $
Author:
The Oracle ADF Faces Team

Field Summary
 
Fields inherited from class org.apache.myfaces.trinidadinternal.ui.action.FireAction
_BLOCK_SCRIPT, _SUBMIT_START, FULL_END_SCRIPT, FULL_START_SCRIPT
 
Constructor Summary
FirePartialAction()
          Creates a FirePartialAction with the no partial targets which will fire an update event by submiting the enclosing form.
FirePartialAction(java.lang.String event)
          Creates a FirePartialAction with the specified partial targets which will submit the enclosing form.
FirePartialAction(java.lang.String[] targets)
          Creates a FirePartialAction with the specified partial targets which will submit the enclosing form.
FirePartialAction(java.lang.String event, boolean submit)
          Creates a FirePartialAction with the specified partial targets and event name which will submit the enclosing form.
FirePartialAction(java.lang.String event, boolean submit, java.lang.String[] targets)
          Creates a FirePartialAction with the specified partial targets and event name.
FirePartialAction(java.lang.String event, boolean submit, java.lang.String[] targets, java.lang.String triggerText)
          Creates a FirePartialAction with the specified partial targets and event name.
 
Method Summary
protected  java.lang.String getChangeScript(UIXRenderingContext context, UINode node, java.lang.String returnScript)
           
 Parameter[] getParameters(UIXRenderingContext context, UINode node)
          Returns an array of all parameters to this ClientAction.
protected  java.lang.String getSubmitScript(UIXRenderingContext context, UINode node, java.lang.String returnScript)
          Implementation of FireAction.getSubmitScript().
 java.lang.String[] getTargets()
          Returns the set of partial targets that are updated when this ClientAction is activated.
 java.lang.String getTriggerText()
          Returns the set of partial targets that are updated when this ClientAction is activated.
 boolean isTriggerRequired(UIXRenderingContext context, UINode node)
          Override of ClientAction.isTriggerRequired()
 boolean renderAsEvent(UIXRenderingContext context, UINode node)
          Override of FireAction.renderAsEvent().
 void renderTrigger(UIXRenderingContext context, UINode node)
          Override of ClientAction.renderTrigger().
 void renderTrigger(UIXRenderingContext context, UINode node, java.lang.Object text, java.lang.Object accessKey)
          Override of ClientAction.renderTrigger().
 void setTargets(java.lang.String[] partialTargets)
          Sets the partial targets to update.
 void setTargetsBinding(BoundValue partialTargetsBinding)
          Sets a BoundValue that will dynamically evaluate the partial targets.
 void setTriggerText(java.lang.String triggerText)
          Sets the text that will be rendered on the ClientAction button or link if the target browser does not support partial page rendering, and a button or link has to be rendered to trigger the action.
 void writeDependencies(UIXRenderingContext context, UINode node)
          Override of ClientAction.writeDependencies().
 
Methods inherited from class org.apache.myfaces.trinidadinternal.ui.action.FireAction
appendClientParameters, appendJSParameter, appendURLParameter, getBufferSize, getChangeScript, getClientParametersSize, getDestination, getEvent, getEventValue, getFormName, getParameters, getScript, getSource, getSource, getSourceKey, isFormSubmitted, isUnvalidated, isUnvalidated, setBlocking, setEvent, setEventBinding, setFormName, setFormNameBinding, setFormSubmitted, setParameters, setSource, setSourceBinding, setUnvalidated, setUnvalidatedBinding
 
Methods inherited from class org.apache.myfaces.trinidadinternal.ui.action.ClientAction
renderTrigger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FirePartialAction

public FirePartialAction()
Creates a FirePartialAction with the no partial targets which will fire an update event by submiting the enclosing form.


FirePartialAction

public FirePartialAction(java.lang.String event)
Creates a FirePartialAction with the specified partial targets which will submit the enclosing form.

Parameters:
event - The name of the event that should be sent when the FirePartialAction is activated. If null, the event name defaults to "update".

FirePartialAction

public FirePartialAction(java.lang.String[] targets)
Creates a FirePartialAction with the specified partial targets which will submit the enclosing form. This constructor will use the default event and submit parameters ("Update" and true).

Parameters:
targets - The IDs of the partial target nodes to update in response to the event generated by this action.

FirePartialAction

public FirePartialAction(java.lang.String event,
                         boolean submit)
Creates a FirePartialAction with the specified partial targets and event name which will submit the enclosing form.

Parameters:
event - The name of the event that should be sent when the FirePartialAction is activated. If null, the event name defaults to "update".
submit - Whether or not a form submit will be used to fire the event

FirePartialAction

public FirePartialAction(java.lang.String event,
                         boolean submit,
                         java.lang.String[] targets)
Creates a FirePartialAction with the specified partial targets and event name.

Parameters:
event - The name of the event that should be sent when the FirePartialAction is activated. If null, the event name defaults to "update".
submit - Whether or not a form submit will be used to fire the event
targets - The IDs of the partial target nodes to update in response to the event generated by this action.

FirePartialAction

public FirePartialAction(java.lang.String event,
                         boolean submit,
                         java.lang.String[] targets,
                         java.lang.String triggerText)
Creates a FirePartialAction with the specified partial targets and event name.

Parameters:
event - The name of the event that should be sent when the FirePartialAction is activated. If null, the event name defaults to "update".
submit - Whether or not a form submit will be used to fire the event
targets - The IDs of the partial target nodes to update in response to the event generated by this action.
triggerText - The text that will be rendered on the ClientAction button or link if the target browser does not support partial page rendering, and a button or link has to be rendered to trigger the action.
Method Detail

getSubmitScript

protected java.lang.String getSubmitScript(UIXRenderingContext context,
                                           UINode node,
                                           java.lang.String returnScript)
Implementation of FireAction.getSubmitScript().

Overrides:
getSubmitScript in class FireAction

getChangeScript

protected java.lang.String getChangeScript(UIXRenderingContext context,
                                           UINode node,
                                           java.lang.String returnScript)
Overrides:
getChangeScript in class FireAction

getTargets

public final java.lang.String[] getTargets()
Returns the set of partial targets that are updated when this ClientAction is activated.


getTriggerText

public final java.lang.String getTriggerText()
Returns the set of partial targets that are updated when this ClientAction is activated.


renderAsEvent

public boolean renderAsEvent(UIXRenderingContext context,
                             UINode node)
Override of FireAction.renderAsEvent().

Overrides:
renderAsEvent in class FireAction
Parameters:
context - The current RenderingContext.
node - The target UINode.
See Also:
getParameters()

setTargets

public final void setTargets(java.lang.String[] partialTargets)
Sets the partial targets to update.


setTargetsBinding

public void setTargetsBinding(BoundValue partialTargetsBinding)
Sets a BoundValue that will dynamically evaluate the partial targets.


setTriggerText

public final void setTriggerText(java.lang.String triggerText)
Sets the text that will be rendered on the ClientAction button or link if the target browser does not support partial page rendering, and a button or link has to be rendered to trigger the action.


writeDependencies

public void writeDependencies(UIXRenderingContext context,
                              UINode node)
                       throws java.io.IOException
Override of ClientAction.writeDependencies().

Overrides:
writeDependencies in class FireAction
Parameters:
context - The current RenderingContext.
node - The target UINode.
Throws:
java.io.IOException

isTriggerRequired

public boolean isTriggerRequired(UIXRenderingContext context,
                                 UINode node)
Override of ClientAction.isTriggerRequired()

Overrides:
isTriggerRequired in class ClientAction
Parameters:
context - The current RenderingContext.
node - The target UINode.
See Also:
renderTrigger()

renderTrigger

public void renderTrigger(UIXRenderingContext context,
                          UINode node)
                   throws java.io.IOException
Override of ClientAction.renderTrigger().

Overrides:
renderTrigger in class ClientAction
Parameters:
context - The current RenderingContext.
node - The target UINode.
Throws:
java.io.IOException
See Also:
isTriggerRequired()

renderTrigger

public void renderTrigger(UIXRenderingContext context,
                          UINode node,
                          java.lang.Object text,
                          java.lang.Object accessKey)
                   throws java.io.IOException
Override of ClientAction.renderTrigger().

Throws:
java.io.IOException

getParameters

public Parameter[] getParameters(UIXRenderingContext 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 FireAction
Parameters:
context - The current RenderingContext.
node - The target UINode.


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.