org.jaffa.presentation.portlet.widgets.model
Class DropDownModel

java.lang.Object
  extended byorg.jaffa.presentation.portlet.widgets.model.WidgetModel
      extended byorg.jaffa.presentation.portlet.widgets.model.DropDownModel

public class DropDownModel
extends WidgetModel

Model for the DropDown widget.


Nested Class Summary
 class DropDownModel.Option
          An instance of this class is created for each option added to the DropDownModel.
 
Constructor Summary
DropDownModel(String dropdownValue)
          Creates a model initialized to the input value.
DropDownModel(String dropdownValue, FieldMetaData metaObject)
           
 
Method Summary
 void addOption(String label, String value)
          Adds an Option to the DropDownModel.
 List getOptions()
          Returns a List of DropDownModel.Option objects, for each of the option added to this model.
 String getValue()
          Getter for property value.
 boolean isMandatory()
          Getter for property mandatory.
 boolean isModelChanged()
          See if model has changed, in the process reset the changed flag.
 void setMandatory(boolean mandatory)
          Setter for property mandatory.
 void setValue(String value)
          Setter for property value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DropDownModel

public DropDownModel(String dropdownValue)
Creates a model initialized to the input value.

Parameters:
dropdownValue - The initial value.

DropDownModel

public DropDownModel(String dropdownValue,
                     FieldMetaData metaObject)
Method Detail

getValue

public String getValue()
Getter for property value.

Returns:
Value of property value.

setValue

public void setValue(String value)
Setter for property value.

Parameters:
value - New value of property value.

addOption

public void addOption(String label,
                      String value)
Adds an Option to the DropDownModel.

Parameters:
label - The label of the option.
value - The value of the option.

getOptions

public List getOptions()
Returns a List of DropDownModel.Option objects, for each of the option added to this model.

Returns:
a List of DropDownModel.Option objects, for each of the option added to this model.

isModelChanged

public boolean isModelChanged()
See if model has changed, in the process reset the changed flag.

Returns:
true if the model was changed.

isMandatory

public boolean isMandatory()
Getter for property mandatory.

Returns:
Value of property mandatory.

setMandatory

public void setMandatory(boolean mandatory)
Setter for property mandatory.



Copyright © 2002-2004 JAFFA Project.