com.cc.framework.ui.control
Class SelectControl

java.lang.Object
  extended bycom.cc.framework.ui.control.Control
      extended bycom.cc.framework.ui.control.SelectControl
All Implemented Interfaces:
AccessControlled, ActionBehavior, ClientHandler, DataModel, SelectDataModel, SelectStateModel, java.io.Serializable, StateModel
Direct Known Subclasses:
MultiLevelSelectControl

public class SelectControl
extends Control
implements SelectStateModel, SelectDataModel

The SelectControl

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

Field Summary
private  java.lang.String body
          Additional HTML Body
private  SelectDesignModel designModel
          The design modell
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[] values
          Text 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
SelectControl()
          Constructor
SelectControl(SelectDesignModel designModel)
          Constructor
 
Method Summary
 java.lang.String getBody()
          Returns the optional HTML Body of the control
 DataModel getDataModel()
          Returns the data model of the Control
 ControlDesignModel getDesignModel()
          Returns the design model of the control
 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[] getValues()
          Returns the keys for the selected Item
 boolean isMultiple()
          Indicates that multiple selections is allowed.
 void reset()
          Resets the actual state of a control to the initial state
 void setBody(java.lang.String string)
          Sets the optional HTML Body of the control.
 void setDesignModel(SelectDesignModel designModel)
          Sets the DesignModel
 void setOptions(OptionListDesignModel options, java.lang.Object elements)
          Sets a option list.
 void setValue(RequestContext ctx, ControlValuePath path, java.lang.String[] values)
          This method is called to set the value of the data model
 void setValues(java.lang.Object[] values)
          Sets the key for the selected Item
 
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 SelectDesignModel designModel
The design modell


values

private java.lang.Object[] values
Text 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


body

private java.lang.String body
Additional HTML Body

Constructor Detail

SelectControl

public SelectControl()
Constructor


SelectControl

public SelectControl(SelectDesignModel designModel)
Constructor

Parameters:
designModel - SelectDesignModel
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(SelectDesignModel designModel)
Sets the DesignModel

Parameters:
designModel - SwapSelectDesignModel

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

getValues

public java.lang.Object[] getValues()
Description copied from interface: SelectDataModel
Returns the keys for the selected Item

Specified by:
getValues in interface SelectDataModel
Returns:
String
See Also:
SelectDataModel.getValues()

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[])

setValues

public void setValues(java.lang.Object[] values)
Description copied from interface: SelectDataModel
Sets the key for the selected Item

Specified by:
setValues in interface SelectDataModel
Parameters:
values - Values (item to be selected)
See Also:
SelectDataModel.setValues(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

isMultiple

public boolean isMultiple()
Indicates that multiple selections is allowed.

Returns:
returns true for a multiple selection control

getBody

public java.lang.String getBody()
Returns the optional HTML Body of the control

Returns:
HTML string

setBody

public void setBody(java.lang.String string)
Sets the optional HTML Body of the control.

Parameters:
string - HTML String


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