com.cc.framework.ui.control
Class ComboBoxControl

java.lang.Object
  extended bycom.cc.framework.ui.control.Control
      extended bycom.cc.framework.ui.control.ComboBoxControl
All Implemented Interfaces:
AccessControlled, ActionBehavior, ClientHandler, ComboBoxDataModel, ComboBoxStateModel, DataModel, java.io.Serializable, StateModel

public class ComboBoxControl
extends Control
implements ComboBoxStateModel, ComboBoxDataModel

ComboBox Control. A ComboBox is much like a normal Edit control with a additional drop down list box.

Version:
$Revision$
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  ComboBoxDesignModel designModel
          The design model
private  java.lang.Object optionElements
          The Option elements
private  OptionListDesignModel options
          The design model for the option elements - not for the control!
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
ComboBoxControl()
          Constructor
ComboBoxControl(ComboBoxDesignModel designModel)
          Constructor
 
Method Summary
 boolean filter()
          Returns if the filter is activated (default=true).
 DataModel getDataModel()
          Returns the data model of the Control
 ControlDesignModel getDesignModel()
          Returns the design model of the control
 int getMaxLength()
          Returns the maximal number of input characters which can be inserted into the text field.
 java.lang.Object getOptionElements()
          Returns the Option elements
 OptionListDesignModel getOptions()
          Returns the option list.
 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(ComboBoxDesignModel designModel)
          Sets the DesignModel
 void setOptions(OptionListDesignModel options, java.lang.Object elements)
          Sets a option list.
 void setValue(java.lang.Object value)
          Sets the selected 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 ComboBoxDesignModel designModel
The design model


value

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


options

private OptionListDesignModel options
The design model for the option elements - not for the control!


optionElements

private java.lang.Object optionElements
The Option elements

Constructor Detail

ComboBoxControl

public ComboBoxControl()
Constructor


ComboBoxControl

public ComboBoxControl(ComboBoxDesignModel designModel)
Constructor

Parameters:
designModel - ComboBoxDesignModel
Method Detail

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()

setDesignModel

public void setDesignModel(ComboBoxDesignModel designModel)
Sets the DesignModel

Parameters:
designModel - ComboBoxDesignModel

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()

getValue

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

Specified by:
getValue in interface ComboBoxDataModel
Returns:
String
See Also:
ComboBoxDataModel.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: ComboBoxDataModel
Sets the selected value

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

getOptions

public OptionListDesignModel getOptions()
Returns the option list.

Returns:
OptionListDesignModel

setOptions

public void setOptions(OptionListDesignModel options,
                       java.lang.Object elements)
Sets a option list.

Parameters:
options - The options to set
elements - The Option elements

getOptionElements

public java.lang.Object getOptionElements()
Returns the Option elements

Returns:
Elements

getSize

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

Returns:
integer

getMaxLength

public int getMaxLength()
Returns the maximal number of input characters which can be inserted into the text field.

Returns:
Maximum number of input characters to accept

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


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