org.opencms.frontend.templateone.form
Class CmsFieldItem

java.lang.Object
  extended by org.opencms.frontend.templateone.form.CmsFieldItem

public class CmsFieldItem
extends java.lang.Object

Represents a single input field item object.

This object is needed to create checkboxes, radio buttons and selectboxes and represents an item for these types.

Since:
6.0.0

Constructor Summary
CmsFieldItem()
          Empty constructor creates an empty field item.
CmsFieldItem(java.lang.String value, java.lang.String label, boolean isSelected)
          Constructor that creates an initialized field item.
 
Method Summary
 java.lang.String getLabel()
          Returns the label text of the field item.
 java.lang.String getValue()
          Returns the value of the field item.
 boolean isSelected()
          Returns if the current item is selected or not.
protected  void setLabel(java.lang.String label)
          Sets the label text of the field item.
protected  void setSelected(boolean isSelected)
          Sets if the current item is selected or not.
protected  void setValue(java.lang.String value)
          Sets the value of the field item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsFieldItem

public CmsFieldItem()
Empty constructor creates an empty field item.


CmsFieldItem

public CmsFieldItem(java.lang.String value,
                    java.lang.String label,
                    boolean isSelected)
Constructor that creates an initialized field item.

Parameters:
value - the value of the field item
label - the label of the field item
isSelected - true if the current item is selected, otherwise false
Method Detail

getLabel

public java.lang.String getLabel()
Returns the label text of the field item.

Returns:
the label text of the field item

getValue

public java.lang.String getValue()
Returns the value of the field item.

Returns:
the value of the field item

isSelected

public boolean isSelected()
Returns if the current item is selected or not.

Returns:
true if the current item is selected, otherwise false

setLabel

protected void setLabel(java.lang.String label)
Sets the label text of the field item.

Parameters:
label - the description text of the field item

setSelected

protected void setSelected(boolean isSelected)
Sets if the current item is selected or not.

Parameters:
isSelected - true if the current item is selected, otherwise false

setValue

protected void setValue(java.lang.String value)
Sets the value of the field item.

Parameters:
value - the value of the field item