|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wheel.components.Component wheel.components.RenderableComponent wheel.components.Form
public class Form
Represents an HTML form. Only complex components (instances of StandaloneComponent) can contain Forms.
Nested Class Summary | |
---|---|
static class |
Form.Method
|
Method Summary | |
---|---|
void |
_clear()
Inteded for internal use. |
boolean |
_isBuilt()
|
void |
_render(org.xmlpull.v1.XmlSerializer serializer)
Default implementation. |
void |
_renderActions(org.xmlpull.v1.XmlSerializer serializer)
|
void |
_setBuilt(boolean built)
|
Form |
addFormValidationError(java.lang.String message)
|
Form |
addFormValidationRule(java.lang.String elExpression,
java.lang.String message)
Adds a validation rule for the whole form. |
void |
buildComponent()
Builds the component preparing it for rendering. |
protected java.lang.String |
defaultDomEvent()
|
java.lang.String |
defaultTagName()
Subclasses must implement this. |
FormElement |
field(java.lang.String fieldName)
Finds a FormElement from this Form with the given name. |
ActionExpression |
getAction()
|
java.util.Set<FormElement> |
getFormElements()
Returns all FormElements that this Form contains. |
java.util.List<FormElement> |
getInvalidFields()
Returns a list of fields in this form that are invalid. |
java.util.List<ValidationError> |
getValidationErrors()
Lists all validation errors that were caused by erroneous evaluations of formValidationRules, added with addFormValidationRule(). |
Form |
id(java.lang.String componentId)
Changes the componentId. |
boolean |
isFormValid()
Returns true if the form is valid. |
boolean |
isValid(java.lang.String componentId)
Returns false if the form containing complex component is rewinding and a form element with the given componentId is found and the form element is not valid. |
void |
postBuild()
Called after buildComponent(). |
void |
preBuild()
Called before buildComponent(). |
Form |
renderHint(java.lang.CharSequence renderHint)
Adds a rendering hint to this component. |
void |
setMethod(Form.Method method)
Sets the HTTP METHOD the form should use when submitted. |
Methods inherited from class wheel.components.RenderableComponent |
---|
_classReferenceFromHints, _getRenderAfterMe, _getRenderBeforeMe, _renderClassReferenceFromHints, _renderTagStart, _renderXhtmlAttributes, addRenderAfter, addRenderBefore, config, getTagName, renderComponent, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void buildComponent()
IBuildableComponent
buildComponent
in interface IBuildableComponent
public void preBuild()
IBuildableComponent
preBuild
in interface IBuildableComponent
public void postBuild()
IBuildableComponent
postBuild
in interface IBuildableComponent
public boolean _isBuilt()
_isBuilt
in interface IBuildableComponent
public void _setBuilt(boolean built)
_setBuilt
in interface IBuildableComponent
public void setMethod(Form.Method method)
method
- public java.lang.String defaultTagName()
RenderableComponent
defaultTagName
in class RenderableComponent
public ActionExpression getAction()
public java.util.List<FormElement> getInvalidFields()
public boolean isValid(java.lang.String componentId)
componentId
-
public boolean isFormValid()
public java.util.List<ValidationError> getValidationErrors()
public void _clear()
Component
_clear
in class RenderableComponent
public FormElement field(java.lang.String fieldName)
fieldName
-
WheelException
- if no component was found with the given componentId.public java.util.Set<FormElement> getFormElements()
public Form id(java.lang.String componentId)
Component
id
in class Component
componentId
- New component id.
public Form renderHint(java.lang.CharSequence renderHint)
Component
renderHint
in class Component
public Form addFormValidationRule(java.lang.String elExpression, java.lang.String message)
elExpression
- message
-
public Form addFormValidationError(java.lang.String message)
public void _render(org.xmlpull.v1.XmlSerializer serializer) throws java.io.IOException
RenderableComponent
_render
in class RenderableComponent
java.io.IOException
public void _renderActions(org.xmlpull.v1.XmlSerializer serializer) throws java.io.IOException
_renderActions
in class RenderableComponent
java.io.IOException
protected java.lang.String defaultDomEvent()
defaultDomEvent
in class RenderableComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |