com.cc.framework.ui.control
Class FormControl

java.lang.Object
  extended bycom.cc.framework.ui.control.Control
      extended bycom.cc.framework.ui.control.FormControl
All Implemented Interfaces:
AccessControlled, ActionBehavior, ClientHandler, FormStateModel, java.io.Serializable, StateModel

public class FormControl
extends Control
implements FormStateModel

A form control

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

Field Summary
private  FormDataModel dataModel
          Data model
private  FormDesignModel designModel
          Design model
private static long serialVersionUID
          Serial Version UID
 
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
FormControl()
          Constructor
 
Method Summary
 java.lang.String getCaption()
          Returns the caption of the form
 int getColSpan()
          Returns the column span for this element
 DataModel getDataModel()
          Returns the data model of the Control
 ControlDesignModel getDesignModel()
          Returns the design model of the control
 java.lang.String getDetail()
          Returns the detail text
 FormElementContainer getFormElements()
          Returns a container with all form elements within the form
 java.lang.String getFormId()
          Returns the id of the form
 FormType getFormType()
          Returns the type of the form
 ImageModel getImage()
          Returns the image for the frames title
 ImageMap getImageMap()
          Returns the ImageMap
 InnerFrame[] getInnerFrames(java.lang.Object layoutHint)
          Retrieves a list of inner frames that are matching the given layout hint
 java.lang.String getLabelPrefix()
          Retrieves the optional label prefix in plain HTML.
 java.lang.String getLabelSuffix()
          Retrieves the optional label suffix in plain HTML.
 StateModel getStateModel()
          Returns the state model of the control
 void reset()
          Resets the state model
 void setDataModel(FormDataModel dataModel)
          Sets the data model
 void setDesignModel(FormDesignModel designModel)
          Sets the design model
 boolean showButton(ControlButton button)
          This Method is called by the Painter before rendering a Button.
 boolean showFrame()
           
 
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, setValue, show, 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

dataModel

private FormDataModel dataModel
Data model


designModel

private FormDesignModel designModel
Design model

Constructor Detail

FormControl

public FormControl()
Constructor

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

setDataModel

public void setDataModel(FormDataModel dataModel)
Sets the data model

Parameters:
dataModel - The data model of the form

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

setDesignModel

public void setDesignModel(FormDesignModel designModel)
Sets the design model

Parameters:
designModel - The design model of the form

getFormElements

public FormElementContainer getFormElements()
Returns a container with all form elements within the form

Returns:
FormElementContainer

getColSpan

public int getColSpan()
Returns the column span for this element

Returns:
column span

getFormId

public java.lang.String getFormId()
Returns the id of the form

Returns:
The id of the form

getCaption

public java.lang.String getCaption()
Returns the caption of the form

Returns:
String

getDetail

public java.lang.String getDetail()
Returns the detail text

Returns:
String

getFormType

public FormType getFormType()
Returns the type of the form

Returns:
FormType

getImageMap

public ImageMap getImageMap()
Returns the ImageMap

Returns:
ImageMap

getImage

public ImageModel getImage()
Returns the image for the frames title

Returns:
ImageModel

showFrame

public boolean showFrame()
Returns:
true if the frame should be shown

showButton

public boolean showButton(ControlButton button)
Description copied from class: Control
This Method is called by the Painter before rendering a Button. By overwriting this method a derived class can show or hide buttons.

Overrides:
showButton in class Control
Parameters:
button - ControlButton
Returns:
boolean
See Also:
Control.showButton(com.cc.framework.ui.control.ControlButton)

getInnerFrames

public InnerFrame[] getInnerFrames(java.lang.Object layoutHint)
Retrieves a list of inner frames that are matching the given layout hint

Parameters:
layoutHint - The layout hint that specifies what frames should be selected: AlignmentType.TOP - header frames AlignmentType.BOTTOM - footer frames
Returns:
Frame list

getLabelPrefix

public java.lang.String getLabelPrefix()
Retrieves the optional label prefix in plain HTML. This attribute can be overwritten at form element level.

Returns:
Prefix (plain HTML) or null

getLabelSuffix

public java.lang.String getLabelSuffix()
Retrieves the optional label suffix in plain HTML. This attribute can be overwritten at form element level.

Returns:
Suffix (plain HTML) or null

reset

public void reset()
Resets the state model

Specified by:
reset in interface StateModel


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