com.cc.framework.ui.control
Class TextControl

java.lang.Object
  extended bycom.cc.framework.ui.control.Control
      extended bycom.cc.framework.ui.control.TextControl
All Implemented Interfaces:
AccessControlled, ActionBehavior, ClientHandler, DataModel, java.io.Serializable, StateModel, TextDataModel, TextStateModel
Direct Known Subclasses:
CalendarControl, ColorPickerControl, HiddenControl, PlainTextControl, SpinControl

public class TextControl
extends Control
implements TextStateModel, TextDataModel

TextControl

Since:
1.0
Version:
$Revision: 1.19 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  TextDesignModel designModel
          Designmodel
private static long serialVersionUID
          Serial Version UID
private  java.lang.Object value
          (Display-) Value
 
Fields inherited from class com.cc.framework.ui.control.Control
log
 
Fields inherited from interface com.cc.framework.ui.model.StateModel
PROP_CONTROL
 
Constructor Summary
TextControl()
          Constructor
TextControl(TextDesignModel designModel)
          Constructor
 
Method Summary
 boolean filter()
          Returns if the filter is activated (default=true).
 Converter getConverter()
          Returns the the Converter that should be used to convert Java Objects into their localized String representation.
 DataModel getDataModel()
          Returns the data model of the Control
 ControlDesignModel getDesignModel()
          Returns the design model of the control
 InputFieldType getInputType()
          Returns the Type
 int getMaxLength()
          returns the maximal Number of Characters, which can be inserted into the Control
 int getSize()
          Returns the Size (Number of visible Characters)
 StateModel getStateModel()
          Returns the state model of the control
 java.lang.Object getValue()
          Returns the value
 void reset()
          Resets the actual state of a control to the initial state
 void setDesignModel(TextDesignModel designModel)
          Sets the design model
 void setValue(java.lang.Object value)
          Sets the value
 void setValue(RequestContext ctx, ControlValuePath path, java.lang.String[] values)
          This method is called to set the value of the data model
 
Methods inherited from class com.cc.framework.ui.control.Control
addButton, allowAjaxRendering, execute, execute, execute, execute, execute, execute, execute, getAction, getAjaxId, getButtons, getControlName, getDesignRules, getFrameworkString, getHandler, getHandlers, getHeight, getHelp, getId, getLocaleName, getName, getPermission, getPrincipal, getProperty, getRunAt, getStyle, getStyleClass, getStyleId, getSummary, getTabIndex, getTooltip, getTransaction, getUniqueStyleId, getWidth, isAjaxEnabled, isDisabled, isFormElement, markDirty, onHelp, setAjaxAttribute, setHandler, setPrincipal, show, showButton, synchronizeState, synchronizeState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cc.framework.ui.model.StateModel
synchronizeState
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

designModel

private TextDesignModel designModel
Designmodel


value

private java.lang.Object value
(Display-) Value

Constructor Detail

TextControl

public TextControl()
Constructor


TextControl

public TextControl(TextDesignModel designModel)
Constructor

Parameters:
designModel - TextDesignModel
Method Detail

setDesignModel

public void setDesignModel(TextDesignModel designModel)
Sets the design model

Parameters:
designModel - The design model

getDataModel

public DataModel getDataModel()
Description copied from class: Control
Returns the data model of the Control

Specified by:
getDataModel in class Control
Returns:
The data model
See Also:
Control.getDataModel()

getDesignModel

public ControlDesignModel getDesignModel()
Description copied from class: Control
Returns the design model of the control

Specified by:
getDesignModel in class Control
Returns:
The ControlDesignModel
See Also:
Control.getDesignModel()

getStateModel

public StateModel getStateModel()
Description copied from class: Control
Returns the state model of the control

Specified by:
getStateModel in class Control
Returns:
The state model
See Also:
Control.getStateModel()

reset

public void reset()
Description copied from interface: StateModel
Resets the actual state of a control to the initial state

Specified by:
reset in interface StateModel
See Also:
StateModel.reset()

getSize

public int getSize()
Returns the Size (Number of visible Characters)

Returns:
integer

getMaxLength

public int getMaxLength()
returns the maximal Number of Characters, which can be inserted into the Control

Returns:
integer

getValue

public java.lang.Object getValue()
Description copied from interface: TextDataModel
Returns the value

Specified by:
getValue in interface TextDataModel
Returns:
Value
See Also:
TextDataModel.getValue()

setValue

public void setValue(RequestContext ctx,
                     ControlValuePath path,
                     java.lang.String[] values)
              throws java.lang.Exception
Description copied from class: Control
This method is called to set the value of the data model

Overrides:
setValue in class Control
Parameters:
ctx - The Action Context
path - Path Name of the input element
values - the values to set
Throws:
java.lang.Exception - a derived class can throw an exception if the value could not be set
See Also:
Control.setValue(com.cc.framework.adapter.RequestContext, com.cc.framework.ui.control.ControlValuePath, java.lang.String[])

setValue

public void setValue(java.lang.Object value)
Description copied from interface: TextDataModel
Sets the value

Specified by:
setValue in interface TextDataModel
Parameters:
value - The value
See Also:
TextDataModel.setValue(java.lang.Object)

getInputType

public InputFieldType getInputType()
Returns the Type

Returns:
InputFieldType

filter

public boolean filter()
Returns if the filter is activated (default=true). This means that all Strings which should be displayed in the HTML page are HTML encoded

Returns:
true if string will be HTML encoded; false otherwise

getConverter

public Converter getConverter()
Returns the the Converter that should be used to convert Java Objects into their localized String representation. If no converter is specified the framework will use a default Converter that matches the beans data type

Returns:
Converter or null


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.