org.inria.ns.reflex.util.wunit
Class FillFormAction

java.lang.Object
  extended by org.inria.ns.reflex.processor.core.AbstractAction
      extended by org.inria.ns.reflex.util.wunit.SubmitAction
          extended by org.inria.ns.reflex.util.wunit.HtmlAction
              extended by org.inria.ns.reflex.util.wunit.FillFormAction
All Implemented Interfaces:
Executable, Presentable, NamespaceContextFactory

public class FillFormAction
extends HtmlAction

<wunit:fill-form> allow to fill a form in a frame.

The form can be filled with the help of <xcl:param> subelements ; the value of each parameter is usually converted to a string except for #xs:boolean that can be used for checkboxes and #io:x-file and #xs:anyURI that can be used for files to upload.

The form is submitted to the server on request only.

Author:
Philippe Poulard

Nested Class Summary
 
Nested classes/interfaces inherited from class org.inria.ns.reflex.processor.core.AbstractAction
AbstractAction.ParameterAdapter, AbstractAction.UselessAction
 
Field Summary
 
Fields inherited from class org.inria.ns.reflex.processor.core.AbstractAction
actions, parent, processorInstance
 
Constructor Summary
FillFormAction(boolean submit, Expression frame, Expression form, Node node, AbstractAction parent)
          Create a new ConversationAction.
 
Method Summary
 void runAction(DataSet dataSet)
          Fill a form.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          XML unmarshaller for FillFormAction.
 
Methods inherited from class org.inria.ns.reflex.util.wunit.HtmlAction
getDocument, getFrame
 
Methods inherited from class org.inria.ns.reflex.processor.core.AbstractAction
addAction, addFallbackAction, createContext, getCanonicalPath, getFallbackAction, getLocalFallbackAction, getLogger, getNamespaceContext, getNode, getParent, recover, recover, removeFallbackAction, reorganize, run, runActions, toPrettyString, toPrettyString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FillFormAction

public FillFormAction(boolean submit,
                      Expression frame,
                      Expression form,
                      Node node,
                      AbstractAction parent)
Create a new ConversationAction.

Parameters:
submit - true if the form have to be submitted to the server, false otherwise.
form - The form to fill, as a Node.
frame - The frame where the form is located..
node - The XML node used for unmarshalling.
parent - The parent action.
Method Detail

unmarshal

public static AbstractAction unmarshal(AbstractAction parent,
                                       Element element)
                                throws XMLException
XML unmarshaller for FillFormAction.

Parameters:
parent - The action depending from
element - The XML element to unmarshall.
Returns:
The FillFormAction created.
Throws:
UnmarshalException - When the element and its content is not those expected.
XMLException

runAction

public void runAction(DataSet dataSet)
               throws ExecutionException,
                      XPathException
Fill a form.

Overrides:
runAction in class AbstractAction
Parameters:
dataSet - The set of datas used when the action is running.
Throws:
ExecutionException - If the action can't be performed.
XPathException