|
||||||||||
| 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,
String label)
Constructs a new LabeledPropertySelectionModel using the specified model and label, and default option and value. |
|
LabeledPropertySelectionModel(IPropertySelectionModel model,
String label,
Object option)
Constructs a new LabeledPropertySelectionModel using the specified model, label, and option; and default value. |
|
LabeledPropertySelectionModel(IPropertySelectionModel model,
String label,
Object option,
String value)
Constructs a new LabeledPropertySelectionModel using the specified model, label, option, and value. |
|
| Method Summary | |
|---|---|
String |
getLabel()
Returns the label of the initial IPropertySelectionModel option. |
String |
getLabel(int index)
Returns the label for an option. |
IPropertySelectionModel |
getModel()
Returns the underlying IPropertySelectionModel. |
Object |
getOption()
Returns the initial option. |
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. |
String |
getValue()
Returns the value of the initial IPropertySelectionModel option. |
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>. |
boolean |
isDisabled(int index)
Used to help rendering of options that should be marked with the html disabled
attribute. |
void |
setLabel(String label)
Sets the label of the initial IPropertySelectionModel option. |
void |
setModel(IPropertySelectionModel model)
Sets the underlying IPropertySelectionModel. |
void |
setOption(Object option)
Sets the initial IPropertySelectionModel option. |
void |
setValue(String value)
Sets the value of the initial IPropertySelectionModel option. |
Object |
translateValue(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,
String label)
model - the underlying model to decoratelabel - the label of the initial property
public LabeledPropertySelectionModel(IPropertySelectionModel model,
String label,
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,
String label,
Object option,
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 Object getOption(int index)
IPropertySelectionModel
getOption in interface IPropertySelectionModelIPropertySelectionModel.getOption(int)public String getLabel(int index)
IPropertySelectionModel
getLabel in interface IPropertySelectionModelIPropertySelectionModel.getLabel(int)public String getValue(int index)
IPropertySelectionModel
getValue in interface IPropertySelectionModelIPropertySelectionModel.getValue(int)public boolean isDisabled(int index)
IPropertySelectionModeldisabled
attribute.
isDisabled in interface IPropertySelectionModelindex - The option to check.
public Object translateValue(String value)
IPropertySelectionModel
translateValue in interface IPropertySelectionModelIPropertySelectionModel.translateValue(java.lang.String)public String getLabel()
public void setLabel(String label)
label - a IPropertySelectionModel option labelpublic String getValue()
public void setValue(String value)
value - a IPropertySelectionModel option valuepublic Object getOption()
public void setOption(Object option)
option - a IPropertySelectionModel option
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||