|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.araneaframework.core.BaseComponent
org.araneaframework.core.BaseService
org.araneaframework.core.BaseWidget
org.araneaframework.core.BaseApplicationWidget
org.araneaframework.uilib.form.GenericFormElement
org.araneaframework.uilib.form.FormElement
Represents a simple "leaf" form element that holds a Control and its Data.
| Nested Class Summary | |
class |
FormElement.ViewModel
Represents a simple form element view model. |
| Nested classes inherited from class org.araneaframework.core.BaseApplicationWidget |
BaseApplicationWidget.CompositeImpl, BaseApplicationWidget.ViewableImpl |
| Nested classes inherited from class org.araneaframework.core.BaseWidget |
BaseWidget.WidgetImpl |
| Nested classes inherited from class org.araneaframework.core.BaseService |
BaseService.ServiceImpl |
| Nested classes inherited from class org.araneaframework.core.BaseComponent |
BaseComponent.ComponentImpl |
| Nested classes inherited from class org.araneaframework.core.ApplicationWidget |
ApplicationWidget.WidgetViewModel |
| Nested classes inherited from class org.araneaframework.core.ApplicationService |
ApplicationService.ServiceViewModel |
| Nested classes inherited from class org.araneaframework.core.ApplicationComponent |
ApplicationComponent.ComponentViewModel |
| Nested classes inherited from class org.araneaframework.Component |
Component.Interface |
| Nested classes inherited from class org.araneaframework.Composite |
Composite.CompositeComponent, Composite.CompositeService, Composite.CompositeWidget, Composite.Interface |
| Nested classes inherited from class org.araneaframework.Viewable |
Viewable.Interface, Viewable.ViewableComponent, Viewable.ViewableService, Viewable.ViewableWidget |
| Nested classes inherited from class org.araneaframework.Service |
Service.Interface |
| Nested classes inherited from class org.araneaframework.Widget |
Widget.Interface |
| Field Summary | |
protected Control |
control
|
protected Converter |
converter
|
protected Data |
data
|
protected boolean |
disabled
|
static String |
ERROR_RENDERER_PROPERTY_KEY
The property key for custom FormElementValidationErrorRenderer that may be set
for this FormElement. |
protected String |
label
|
protected boolean |
mandatory
|
| Fields inherited from class org.araneaframework.uilib.form.GenericFormElement |
backgroundValidation, constraint, converted, properties, SEAMLESS_VALIDATION_ACTION_ID, validated |
| Fields inherited from class org.araneaframework.core.BaseService |
currentInputData, currentOutputData |
| Fields inherited from interface org.araneaframework.core.ApplicationWidget |
EVENT_HANDLER_ID_KEY, EVENT_PARAMETER_KEY, EVENT_PATH_KEY |
| Fields inherited from interface org.araneaframework.core.ApplicationService |
ACTION_HANDLER_ID_KEY, ACTION_PARAMETER_KEY, ACTION_PATH_KEY |
| Constructor Summary | |
FormElement()
|
|
| Method Summary | |
void |
_setRendered(boolean rendered)
Only use when you really know what you are doing. |
void |
accept(String id,
FormElementVisitor visitor)
Accepts the visitor. |
protected void |
action(Path path,
InputData input,
OutputData output)
If Path.hasNext() routes to the action to child, otherwise calls the
appropriate ActionListener. |
void |
addError(String error)
|
void |
addInitEvent(Event event)
|
void |
clearErrors()
Clears element errors. |
protected void |
convertInternal()
Uses BaseConverterto convert the BaseControlvalue to the Datavalue. |
protected void |
destroy()
Destroy callback. |
protected void |
destroyControl()
|
protected void |
event(Path path,
InputData input)
If path hasNextStep() routes to the correct child, otherwise calls the appropriate listener. |
Converter |
findConverter()
Finds a BaseConvertercorresponding to current control and data item. |
Environment |
getConstraintEnvironment()
|
Control |
getControl()
Returns Control. |
Converter |
getConverter()
Returns BaseConverter. |
Data |
getData()
Returns Data. |
protected FormElementValidationActionListener |
getDefaultBackgroundValidationListener()
Returns new instance of FormElementValidationActionListener tied to
this FormElement. |
FormElementValidationErrorRenderer |
getFormElementValidationErrorRenderer()
|
String |
getLabel()
Returns control label. |
Object |
getValue()
|
Object |
getViewModel()
Returns FormElement.ViewModel. |
protected void |
handleAction(InputData input,
OutputData output)
Calls the approriate listener |
protected void |
init()
Init callback. |
boolean |
isDisabled()
Returns whether the element is disabled. |
protected boolean |
isIgnoreEvents()
When this returns true, |
boolean |
isMandatory()
|
boolean |
isRead()
Returns whether the form element was present in the last request. |
boolean |
isRendered()
Returns whether this GenericFormElement was rendered
in response. |
boolean |
isStateChanged()
Returns whether data item state has changed after it was marked. |
void |
markBaseState()
Marks the current value of the data item as the base state that will be used to determine whether its state has changed in isStateChanged(). |
void |
rendered()
Marks status of this FormElement rendered. |
void |
restoreBaseState()
Restores the value of the data item from the marked base state. |
protected void |
runInitEvents()
Called from init() to run queued events. |
void |
setBackgroundValidationListener(ActionListener actionListener)
Sets the action listener that deals with background validation of form. |
void |
setControl(Control control)
Sets Control. |
void |
setConverter(Converter converter)
Sets BaseConverter. |
void |
setData(Data data)
Sets Data. |
void |
setDisabled(boolean disabled)
Sets wether the element is disabled. |
void |
setFormElementValidationErrorRenderer(FormElementValidationErrorRenderer renderer)
|
protected void |
setIgnoreEvents(boolean ignoreEvents)
When set |
void |
setLabel(String label)
Sets control label. |
void |
setMandatory(boolean mandatory)
|
void |
setValue(Object value)
|
protected void |
update(InputData input)
|
protected boolean |
validateInternal()
Validates the element. |
| Methods inherited from class org.araneaframework.uilib.form.GenericFormElement |
addErrors, convert, convertAndValidate, getConstraint, getErrors, getMessageCtx, getMutableErrors, getProperties, getProperty, isBackgroundValidation, isEvaluated, isValid, setBackgroundValidation, setConstraint, setProperty, validate |
| Methods inherited from class org.araneaframework.core.BaseApplicationWidget |
_getComposite, _getViewable, addActionListener, addEventListener, addWidget, addWidget, clearActionListeners, clearEventlisteners, clearGlobalEventListener, disableWidget, enableWidget, getActionId, getChildEnvironment, getChildren, getChildWidgetEnvironment, getEnvironment, getEventId, getWidget, handleEvent, handleUpdate, propagate, putViewData, putViewDataOnce, removeActionListener, removeEventListener, removeViewData, removeWidget, render, setGlobalEventListener |
| Methods inherited from class org.araneaframework.core.BaseWidget |
_getWidget, getInputData, getOutputData, handleWidgetException |
| Methods inherited from class org.araneaframework.core.BaseService |
_getService, handleServiceException |
| Methods inherited from class org.araneaframework.core.BaseComponent |
_addComponent, _addComponent, _checkCall, _disableComponent, _enableComponent, _endCall, _endWaitingCall, _getChildren, _getComponent, _getDisabledChildren, _propagate, _relocateComponent, _removeComponent, _setEnvironment, _setScope, _startCall, _startWaitingCall, _strictCheckCall, _strictStartCall, _waitNoCall, disable, enable, getScope, handleException, isAlive, isDead, isInitialized |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.araneaframework.uilib.form.FormElementContext |
addErrors, getEnvironment, isValid |
| Methods inherited from interface org.araneaframework.Component |
_getComponent, getScope, isAlive |
| Methods inherited from interface org.araneaframework.Service |
_getService |
| Methods inherited from interface org.araneaframework.Widget |
_getWidget |
| Field Detail |
public static final String ERROR_RENDERER_PROPERTY_KEY
FormElementValidationErrorRenderer that may be set
for this FormElement.
protected Control control
protected Converter converter
protected Data data
protected String label
protected boolean mandatory
protected boolean disabled
| Constructor Detail |
public FormElement()
| Method Detail |
public String getLabel()
getLabel in interface FormElementContextpublic void setLabel(String label)
label - control label.public Converter getConverter()
BaseConverter.
getConverter in interface FormElementContextBaseConverter.public void setConverter(Converter converter)
BaseConverter.
converter - The BaseConverterto set.public Data getData()
Data.
Data.public void setData(Data data)
Data.
data - Data.public Control getControl()
Control.
getControl in interface FormElementContextControl.public void setControl(Control control)
Control.
control - Control.protected void destroyControl()
public Converter findConverter()
BaseConvertercorresponding to current control and data item.
ConverterNotFoundException - if converter cannot be found.public boolean isRead()
isRead in interface FormElementContextpublic void setDisabled(boolean disabled)
GenericFormElement
setDisabled in class GenericFormElementdisabled - wether the element is disabled.public boolean isDisabled()
GenericFormElement
isDisabled in interface FormElementContextisDisabled in class GenericFormElementpublic void markBaseState()
GenericFormElementGenericFormElement.isStateChanged().
markBaseState in class GenericFormElementpublic void restoreBaseState()
GenericFormElement
restoreBaseState in class GenericFormElementpublic boolean isStateChanged()
GenericFormElement
isStateChanged in class GenericFormElementpublic Object getValue()
getValue in interface FormElementContextgetValue in class GenericFormElementpublic void setValue(Object value)
public boolean isMandatory()
isMandatory in interface FormElementContextpublic void setMandatory(boolean mandatory)
public void addError(String error)
addError in interface FormElementContextaddError in class GenericFormElementpublic void clearErrors()
GenericFormElement
clearErrors in class GenericFormElementpublic void setBackgroundValidationListener(ActionListener actionListener)
FormElementValidationActionListener, only
GenericFormElement.setBackgroundValidation(boolean) needs to be called with
parameter true.
actionListener - custom listener that should handle validation of this FormElementpublic FormElementValidationErrorRenderer getFormElementValidationErrorRenderer()
FormElementValidationErrorRenderer which will take care of rendering validation error messages produced by this FormElement.public void setFormElementValidationErrorRenderer(FormElementValidationErrorRenderer renderer)
protected void update(InputData input)
throws Exception
update in class BaseApplicationWidgetException
protected void action(Path path,
InputData input,
OutputData output)
throws Exception
BaseApplicationWidgetPath.hasNext() routes to the action to child, otherwise calls the
appropriate ActionListener.
action in class BaseApplicationWidgetException
protected void event(Path path,
InputData input)
throws Exception
BaseApplicationWidget
event in class BaseApplicationWidgetException
protected void handleAction(InputData input,
OutputData output)
throws Exception
BaseApplicationWidget
handleAction in class BaseApplicationWidgetExceptionpublic Environment getConstraintEnvironment()
getConstraintEnvironment in class GenericFormElement
public Object getViewModel()
throws Exception
FormElement.ViewModel.
getViewModel in class BaseApplicationWidgetFormElement.ViewModel.
Exceptionpublic void addInitEvent(Event event)
protected void init()
throws Exception
BaseComponent
init in class GenericFormElementExceptionprotected FormElementValidationActionListener getDefaultBackgroundValidationListener()
FormElementValidationActionListener tied to
this FormElement.
protected void destroy()
throws Exception
BaseComponent
destroy in class BaseComponentException - Any runtime exception that may occur.protected void convertInternal()
BaseConverterto convert the BaseControlvalue to the Datavalue.
convertInternal in class GenericFormElement
protected boolean validateInternal()
throws Exception
GenericFormElement
validateInternal in class GenericFormElementException
public void accept(String id,
FormElementVisitor visitor)
GenericFormElement
accept in class GenericFormElementprotected void runInitEvents()
init() to run queued events.
public boolean isRendered()
GenericFormElement was rendered
in response. Only formelements that were rendered should be read from request.
isRendered in interface RenderStateAwareGenericFormElement was renderedpublic void rendered()
FormElement rendered.
Only rendered FormElements may read the data from subsequent request.
public void _setRendered(boolean rendered)
RenderStateAware
_setRendered in interface RenderStateAwarerendered - protected boolean isIgnoreEvents()
protected void setIgnoreEvents(boolean ignoreEvents)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||