|
||||||||||
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.StandaloneComponent
public abstract class StandaloneComponent
Defines the contract for complex components. Complex components are components that can contain forms and can have their own resource bundles for messages. There are no limitations for complex components and they can be full-blown applications that live inside a containing Page.
Constructor Summary | |
---|---|
|
StandaloneComponent()
|
protected |
StandaloneComponent(Component parent,
java.lang.String componentId)
|
protected |
StandaloneComponent(java.lang.String componentId)
|
Method Summary | |
---|---|
void |
_clear()
Intended for internal use. |
java.lang.String |
_generateComponentId(Component component)
Generates a componentId for the given Component. |
ComponentStore |
_getComponentStore()
Intended for internal use. |
java.lang.String |
_getSubmitTarget()
|
boolean |
_isBuilt()
|
boolean |
_isRewindingForm(Form form)
Intended for internal use. |
void |
_postBuildPage()
|
void |
_postProcessRequest()
|
void |
_render(org.xmlpull.v1.XmlSerializer serializer)
Default implementation. |
void |
_setBuilt(boolean built)
|
void |
_setPageRewinding(boolean rewinding)
Intended for internal use. |
void |
_setSubmitTarget(java.lang.String submitTarget)
Intended for internal use. |
void |
_setSubmittedForm(Form submittedForm)
Intended for internal use. |
void |
afterAdd()
A lifecycle method that is called after the component has been added to the component tree. |
void |
commit()
Calling this method causes all field marked with @Value(linkTo = ...) annotation to be written to the domain objects. |
void |
commit(java.lang.String... fields)
Calling this method causes all field marked with @Value(linkTo = ...) annotation and identified in the input varargs to be writtetn to the domain objects. |
StandaloneComponentConfiguration |
config()
|
java.lang.String |
defaultTagName()
Subclasses must implement this. |
ValidationError |
getError(java.lang.String componentId)
Returns the first error for the form element in the submitted form. |
Messages |
getMessages()
Returns the Messages-object giving access to localized messages. |
java.lang.String |
getPagePath()
Creates a string representation that, when appended to an URL, give access to this page. |
java.lang.String |
getPageUrl()
|
Form |
getSubmittedForm()
|
boolean |
isPage()
|
boolean |
isPageRewinding()
Returns true if a form submit is rewinding on this page. |
boolean |
isRewinding()
Returns true if this complex component is rewinding. |
boolean |
isValid(java.lang.String formElementName)
Returns true if the form element with the given componentId is valid. |
java.util.List<ValidationError> |
listErrors()
Lists all valiation errors for all form elements. |
void |
loadJQuery()
|
void |
postBuild()
Called after buildComponent(). |
void |
preBuild()
Called before buildComponent(). |
void |
rollback()
|
void |
rollback(java.lang.String... fields)
|
void |
setFocus(Component component)
Sets the browser focus. |
Methods inherited from class wheel.components.RenderableComponent |
---|
_classReferenceFromHints, _getRenderAfterMe, _getRenderBeforeMe, _renderActions, _renderClassReferenceFromHints, _renderTagStart, _renderXhtmlAttributes, addRenderAfter, addRenderBefore, defaultDomEvent, getTagName, renderComponent, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface wheel.components.IBuildableComponent |
---|
buildComponent |
Constructor Detail |
---|
public StandaloneComponent()
protected StandaloneComponent(java.lang.String componentId)
protected StandaloneComponent(Component parent, java.lang.String componentId)
Method Detail |
---|
public StandaloneComponentConfiguration config()
config
in class RenderableComponent
public boolean isRewinding()
public Messages getMessages()
public boolean isValid(java.lang.String formElementName)
formElementName
- The component ID of the form element.
public java.util.List<ValidationError> listErrors()
public ValidationError getError(java.lang.String componentId)
componentId
-
public java.lang.String defaultTagName()
RenderableComponent
defaultTagName
in class RenderableComponent
public void commit()
public void commit(java.lang.String... fields)
fields
- Names of the fields to commit.public void rollback()
public void rollback(java.lang.String... fields)
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 afterAdd()
Component
afterAdd
in class Component
public void _render(org.xmlpull.v1.XmlSerializer serializer) throws java.io.IOException
RenderableComponent
_render
in class RenderableComponent
java.io.IOException
public void _postProcessRequest()
public void _postBuildPage()
public java.lang.String _generateComponentId(Component component)
component
- Component to generate componentId for.
public java.lang.String getPagePath()
public boolean isPageRewinding()
public void _setPageRewinding(boolean rewinding)
rewinding
- public boolean _isRewindingForm(Form form)
form
-
public ComponentStore _getComponentStore()
public java.lang.String getPageUrl()
public void _clear()
_clear
in class RenderableComponent
public Form getSubmittedForm()
WheelException
- if no form was submitted.public void _setSubmittedForm(Form submittedForm)
submittedForm
- public java.lang.String _getSubmitTarget()
public void _setSubmitTarget(java.lang.String submitTarget)
submitTarget
- public void setFocus(Component component)
document.getElementById('componentId').focus();
public void loadJQuery()
public boolean isPage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |