com.cc.framework.ui.control
Class CheckboxGroupControl

java.lang.Object
  extended bycom.cc.framework.ui.control.Control
      extended bycom.cc.framework.ui.control.CheckboxGroupControl
All Implemented Interfaces:
AccessControlled, ActionBehavior, CheckboxGroupDataModel, CheckBoxGroupStateModel, ClientHandler, DataModel, java.io.Serializable, StateModel
Direct Known Subclasses:
RadioGroupControl

public class CheckboxGroupControl
extends Control
implements CheckBoxGroupStateModel, CheckboxGroupDataModel

The checkbox group control

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

Field Summary
private  java.lang.String body
          Additional HTML Body
private  CheckboxGroupDesignModel 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[] 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
CheckboxGroupControl()
          Constructor
CheckboxGroupControl(CheckboxGroupDesignModel designModel)
          Constructor
 
Method Summary
 java.lang.String getBody()
          Returns the optional HTML Body of the control
 int getColumns()
          Returns the number of checkbox columns
 DataModel getDataModel()
          Returns the data model of the Control
 ControlDesignModel getDesignModel()
          Returns the design model of the control
 java.lang.String getDisableProperty()
           
 java.lang.String getGroupingProperty()
           
 java.lang.Object getOptionElements()
          Returns the Option elements
 OptionListDesignModel getOptions()
          Returns the option list.
 StateModel getStateModel()
          Returns the state model of the control
 java.lang.Object[] getValues()
          Returns the keys for the selected Item
 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(CheckboxGroupDesignModel 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 CheckboxGroupDesignModel designModel
The design model


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

CheckboxGroupControl

public CheckboxGroupControl()
Constructor


CheckboxGroupControl

public CheckboxGroupControl(CheckboxGroupDesignModel 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(CheckboxGroupDesignModel 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: CheckboxGroupDataModel
Returns the keys for the selected Item

Specified by:
getValues in interface CheckboxGroupDataModel
Returns:
String
See Also:
CheckboxGroupDataModel.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: CheckboxGroupDataModel
Sets the key for the selected Item

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

getColumns

public int getColumns()
Returns the number of checkbox columns

Returns:
integer

getGroupingProperty

public java.lang.String getGroupingProperty()
Returns:
returns the name of the property that is used to group checkbox items

getDisableProperty

public java.lang.String getDisableProperty()
Returns:
returns the name of the property that is used to disable checkbox items

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.