|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry.form.LabeledPropertySelectionModel
public class LabeledPropertySelectionModel
Decorates an underlying IPropertySelectionModeladding an initial property. The label,
option, and value of the initial property are configurable.
| Constructor Summary | |
|---|---|
LabeledPropertySelectionModel()
Constructs a new LabeledPropertySelectionModel using an empty model and default label, option, and value. |
|
LabeledPropertySelectionModel(IPropertySelectionModel model)
Constructs a new LabeledPropertySelectionModel using the specified model and default label, option, and value. |
|
LabeledPropertySelectionModel(IPropertySelectionModel model,
java.lang.String label)
Constructs a new LabeledPropertySelectionModel using the specified model and label, and default option and value. |
|
LabeledPropertySelectionModel(IPropertySelectionModel model,
java.lang.String label,
java.lang.Object option)
Constructs a new LabeledPropertySelectionModel using the specified model, label, and option; and default value. |
|
LabeledPropertySelectionModel(IPropertySelectionModel model,
java.lang.String label,
java.lang.Object option,
java.lang.String value)
Constructs a new LabeledPropertySelectionModel using the specified model, label, option, and value. |
|
| Method Summary | |
|---|---|
java.lang.String |
getLabel()
Returns the label of the initial IPropertySelectionModel option |
java.lang.String |
getLabel(int index)
Returns the label for an option. |
IPropertySelectionModel |
getModel()
Returns the underlying IPropertySelectionModel |
java.lang.Object |
getOption()
Returns the initial option |
java.lang.Object |
getOption(int index)
Returns one possible option that will be assigned to the server-side property. |
int |
getOptionCount()
Returns the number of possible options. |
java.lang.String |
getValue()
Returns the value of the initial IPropertySelectionModel option |
java.lang.String |
getValue(int index)
Returns a String used to represent the option in the HTML (as the value of an <option> or <input type=radio>. |
void |
setLabel(java.lang.String label)
Sets the label of the initial IPropertySelectionModel option |
void |
setModel(IPropertySelectionModel model)
Sets the underlying IPropertySelectionModel |
void |
setOption(java.lang.Object option)
Sets the initial IPropertySelectionModel option |
void |
setValue(java.lang.String value)
Sets the value of the initial IPropertySelectionModel option |
java.lang.Object |
translateValue(java.lang.String value)
Returns the option corresponding to a value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LabeledPropertySelectionModel()
public LabeledPropertySelectionModel(IPropertySelectionModel model)
model - the underlying model to decorate
public LabeledPropertySelectionModel(IPropertySelectionModel model,
java.lang.String label)
model - the underlying model to decoratelabel - the label of the initial property
public LabeledPropertySelectionModel(IPropertySelectionModel model,
java.lang.String label,
java.lang.Object option)
model - the underlying model to decoratelabel - the label of the initial propertyoption - the option value of the initial property
public LabeledPropertySelectionModel(IPropertySelectionModel model,
java.lang.String label,
java.lang.Object option,
java.lang.String value)
model - the underlying model to decoratelabel - the label of the initial propertyoption - the option value of the initial propertyvalue - the value of the initial property| Method Detail |
|---|
public IPropertySelectionModel getModel()
public void setModel(IPropertySelectionModel model)
model - the IPropertySelectionModel to setpublic int getOptionCount()
IPropertySelectionModel
getOptionCount in interface IPropertySelectionModelIPropertySelectionModel.getOptionCount()public java.lang.Object getOption(int index)
IPropertySelectionModel
getOption in interface IPropertySelectionModelIPropertySelectionModel.getOption(int)public java.lang.String getLabel(int index)
IPropertySelectionModel
getLabel in interface IPropertySelectionModelIPropertySelectionModel.getLabel(int)public java.lang.String getValue(int index)
IPropertySelectionModel
getValue in interface IPropertySelectionModelIPropertySelectionModel.getValue(int)public java.lang.Object translateValue(java.lang.String value)
IPropertySelectionModel
translateValue in interface IPropertySelectionModelIPropertySelectionModel.translateValue(java.lang.String)public java.lang.String getLabel()
public void setLabel(java.lang.String label)
label - a IPropertySelectionModel option labelpublic java.lang.String getValue()
public void setValue(java.lang.String value)
value - a IPropertySelectionModel option valuepublic java.lang.Object getOption()
public void setOption(java.lang.Object option)
option - a IPropertySelectionModel option
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||