org.araneaframework.uilib.form
Interface Control

All Superinterfaces:
Component, FormElementAware, Serializable, Service, Viewable, Widget
All Known Subinterfaces:
FilteredInputControl
All Known Implementing Classes:
BaseControl, FloatControl, NumberControl, TextControl, TimestampControl

public interface Control
extends Widget, Viewable, FormElementAware

Control is the widget that does the actual parsing and reading of the request parameters. It corresponds to the controls found in HTML forms, like textbox, textarea, selectbox, button … Control is meant to be used inside FormElement that provides type safety and additional Constraints to request data.

Author:
Jevgeni Kabanov (ekabanov at araneaframework dot org)

Nested Class Summary
static interface Control.ViewModel
           
 
Nested classes inherited from class org.araneaframework.Widget
Widget.Interface
 
Nested classes inherited from class org.araneaframework.Viewable
Viewable.Interface, Viewable.ViewableComponent, Viewable.ViewableService, Viewable.ViewableWidget
 
Method Summary
 void convert()
          Converts the data submitted by the user.
 Object getRawValue()
          Returns the value of the control (value read from the request).
 String getRawValueType()
          This method should be overriden by the control, returning the type of the value of this control.
 boolean isDisabled()
           
 boolean isRead()
          Returns whether the control data was present in the HTTP request.
 void setRawValue(Object value)
          Sets the control value.
 void validate()
          Validates the data submitted by the user.
 
Methods inherited from interface org.araneaframework.Widget
_getWidget
 
Methods inherited from interface org.araneaframework.Service
_getService
 
Methods inherited from interface org.araneaframework.Component
_getComponent, getEnvironment, getScope, isAlive
 
Methods inherited from interface org.araneaframework.Viewable
_getViewable
 
Methods inherited from interface org.araneaframework.uilib.form.FormElementAware
setFormElementCtx
 

Method Detail

isRead

public boolean isRead()
Returns whether the control data was present in the HTTP request.

Returns:
whether the control data was present in the HTTP request.

getRawValueType

public String getRawValueType()
This method should be overriden by the control, returning the type of the value of this control. It is later used in ConverterFactoryto determine the BaseConverterused to transfer the values from Datato control and back.

Returns:
the type of the value of this control

getRawValue

public Object getRawValue()
Returns the value of the control (value read from the request). Type of value depends on the type of control.

Returns:
Returns the value of the control (value read from the request).

setRawValue

public void setRawValue(Object value)
Sets the control value. It is usually set by Converter when value of FormElement (this is stored in Data) that owns this BaseControl changes.

Parameters:
value - control value.
See Also:
getRawValue()

convert

public void convert()
Converts the data submitted by the user.


validate

public void validate()
Validates the data submitted by the user.


isDisabled

public boolean isDisabled()
Since:
1.1