|
JSF-Spring | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.component.html.HtmlForm de.mindmatters.faces.component.html.HtmlForm
public class HtmlForm
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.
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 |
void |
broadcast(FacesEvent event)
|
MethodBinding |
getAction()
Return the |
MethodBinding |
getActionListener()
Return the |
ActionListener[] |
getActionListeners()
Return the set of registered |
java.lang.String |
getMethod()
Returns the method of this form - supports 'POST' or 'GET'. |
boolean |
isImmediate()
Return a flag indicating that the default |
boolean |
isTransient()
|
void |
queueEvent(FacesEvent e)
|
void |
removeActionListener(ActionListener listener)
Remove an existing |
void |
restoreState(FacesContext context,
java.lang.Object state)
|
java.lang.Object |
saveState(FacesContext context)
|
void |
setAction(MethodBinding action)
Set the |
void |
setActionListener(MethodBinding actionListener)
Set the |
void |
setId(java.lang.String id)
|
void |
setImmediate(boolean immediate)
Set the "immediate execution" flag for this |
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 |
---|
public static final java.lang.String RENDERER_TYPE
public static final java.lang.String COMPONENT_TYPE
public static final java.lang.String COMPONENT_FAMILY
Constructor Detail |
---|
public HtmlForm()
Method Detail |
---|
public MethodBinding getAction()
Return the MethodBinding
pointing 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.
getAction
in interface ActionSource
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.
setAction
in interface ActionSource
action
- The new MethodBinding expressionpublic 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.
getActionListener
in interface ActionSource
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
.
setActionListener
in interface ActionSource
actionListener
- The new method binding expressionpublic void addActionListener(ActionListener listener)
Add a new ActionListener
to the set of listeners interested
in being notified when ActionEvent
s occur.
addActionListener
in interface ActionSource
listener
- The ActionListener
to be addedpublic ActionListener[] getActionListeners()
Return the set of registered ActionListener
s for this
ActionSource
instance. If there are no registered listeners,
a zero-length array is returned.
getActionListeners
in interface ActionSource
public void removeActionListener(ActionListener listener)
Remove an existing ActionListener
(if any) from the set of
listeners interested in being notified when ActionEvent
s
occur.
removeActionListener
in interface ActionSource
listener
- The ActionListener
to be removedpublic void setImmediate(boolean immediate)
Set the "immediate execution" flag for this UIComponent
.
setImmediate
in interface ActionSource
immediate
- The new immediate execution flagpublic 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
.
isImmediate
in interface ActionSource
public java.lang.String getMethod()
null
if not setpublic void setMethod(java.lang.String method)
method
- The method 'POST' or 'GET'public java.lang.Object saveState(FacesContext context)
public void restoreState(FacesContext context, java.lang.Object state)
public void queueEvent(FacesEvent e)
public void broadcast(FacesEvent event)
public final void setId(java.lang.String id)
public final boolean isTransient()
public final void setTransient(boolean transientFlag)
|
JSF-Spring | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |