JSF-Spring

de.mindmatters.faces.component.html
Class HtmlForm

java.lang.Object
  extended by javax.faces.component.html.HtmlForm
      extended by de.mindmatters.faces.component.html.HtmlForm
All Implemented Interfaces:
ActionSource

public class HtmlForm
extends HtmlForm
implements ActionSource

Represents an HTML form element. HtmlForm implements ActionSource - therefore it is possible to define an action and an action listener attribute. Methodbindings declared as action listener will be invoked on every form submit before action listeners of any nested UICommand will be executed. Futhermore this form supports stateless action listeners as direct children and the immediate attribute.

HtmlForm supports the "method" attribute. Supported methods are 'POST' (default method) and 'GET'. 'GET' is only supported if an appropriate ViewBuilder is configured as ViewHandler.

By default, the rendererType property must be set to "de.mindmatters.faces.Form". This value can be changed by calling the setRendererType() method.

Author:
Andreas Kuhrwahl

Field Summary
static java.lang.String COMPONENT_FAMILY
          The standard component type for this component.
static java.lang.String COMPONENT_TYPE
          The standard component type for this component.
static java.lang.String RENDERER_TYPE
          The standard renderer type for this component.
 
Constructor Summary
HtmlForm()
          The standard constructor.
 
Method Summary
 void addActionListener(ActionListener listener)
          

Add a new ActionListener to the set of listeners interested in being notified when ActionEvents occur.

 void broadcast(FacesEvent event)
          
 MethodBinding getAction()
          

Return the MethodBindingpointing at the application action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property.

 MethodBinding getActionListener()
          

Return the MethodBinding pointing at an action listener method to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending upon the value of the immediate property.

 ActionListener[] getActionListeners()
          

Return the set of registered ActionListeners for this ActionSource instance.

 java.lang.String getMethod()
          Returns the method of this form - supports 'POST' or 'GET'.
 boolean isImmediate()
          

Return a flag indicating that the default ActionListener provided by the JavaServer Faces implementation should be executed immediately (that is, during Apply Request Values phase of the request processing lifecycle), rather than waiting until the Invoke Application phase.

 boolean isTransient()
          
 void queueEvent(FacesEvent e)
          
 void removeActionListener(ActionListener listener)
          

Remove an existing ActionListener (if any) from the set of listeners interested in being notified when ActionEvents occur.

 void restoreState(FacesContext context, java.lang.Object state)
          
 java.lang.Object saveState(FacesContext context)
          
 void setAction(MethodBinding action)
          

Set the MethodBinding pointing at the appication action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property.

 void setActionListener(MethodBinding actionListener)
          

Set the MethodBinding pointing at an action listener method to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending upon the value of the immmediate property.

 void setId(java.lang.String id)
          
 void setImmediate(boolean immediate)
          

Set the "immediate execution" flag for this UIComponent.

 void setMethod(java.lang.String method)
          Sets the method of this form - supports 'POST' or 'GET'.
 void setTransient(boolean transientFlag)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RENDERER_TYPE

public static final java.lang.String RENDERER_TYPE
The standard renderer type for this component.

See Also:
Constant Field Values

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
The standard component type for this component.

See Also:
Constant Field Values

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
The standard component type for this component.

See Also:
Constant Field Values
Constructor Detail

HtmlForm

public HtmlForm()
The standard constructor.

Method Detail

getAction

public MethodBinding getAction()

Return the MethodBindingpointing at the application action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property.

Specified by:
getAction in interface ActionSource

setAction

public void setAction(MethodBinding action)

Set the MethodBinding pointing at the appication action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property.

Any method referenced by such an expression must be public, with a return type of String, and accept no parameters.

Specified by:
setAction in interface ActionSource
Parameters:
action - The new MethodBinding expression

getActionListener

public MethodBinding getActionListener()

Return the MethodBinding pointing at an action listener method to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending upon the value of the immediate property.

Specified by:
getActionListener in interface ActionSource

setActionListener

public void setActionListener(MethodBinding actionListener)

Set the MethodBinding pointing at an action listener method to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending upon the value of the immmediate property.

Any method referenced by such an expression must be public, with a return type of void, and accept a single parameter of type ActionEvent.

Specified by:
setActionListener in interface ActionSource
Parameters:
actionListener - The new method binding expression

addActionListener

public void addActionListener(ActionListener listener)

Add a new ActionListener to the set of listeners interested in being notified when ActionEvents occur.

Specified by:
addActionListener in interface ActionSource
Parameters:
listener - The ActionListener to be added

getActionListeners

public ActionListener[] getActionListeners()

Return the set of registered ActionListeners for this ActionSource instance. If there are no registered listeners, a zero-length array is returned.

Specified by:
getActionListeners in interface ActionSource

removeActionListener

public void removeActionListener(ActionListener listener)

Remove an existing ActionListener (if any) from the set of listeners interested in being notified when ActionEvents occur.

Specified by:
removeActionListener in interface ActionSource
Parameters:
listener - The ActionListener to be removed

setImmediate

public void setImmediate(boolean immediate)

Set the "immediate execution" flag for this UIComponent.

Specified by:
setImmediate in interface ActionSource
Parameters:
immediate - The new immediate execution flag

isImmediate

public boolean isImmediate()

Return a flag indicating that the default ActionListener provided by the JavaServer Faces implementation should be executed immediately (that is, during Apply Request Values phase of the request processing lifecycle), rather than waiting until the Invoke Application phase. The default value for this property must be false.

Specified by:
isImmediate in interface ActionSource

getMethod

public java.lang.String getMethod()
Returns the method of this form - supports 'POST' or 'GET'.

Returns:
The method of this form or null if not set

setMethod

public void setMethod(java.lang.String method)
Sets the method of this form - supports 'POST' or 'GET'.

Parameters:
method - The method 'POST' or 'GET'

saveState

public java.lang.Object saveState(FacesContext context)


restoreState

public void restoreState(FacesContext context,
                         java.lang.Object state)


queueEvent

public void queueEvent(FacesEvent e)


broadcast

public void broadcast(FacesEvent event)


setId

public final void setId(java.lang.String id)


isTransient

public final boolean isTransient()


setTransient

public final void setTransient(boolean transientFlag)


JSF-Spring

Copyright © 2006 mindmatters GmbH & Co. KG