org.trails.component
Class AbstractPropertySelectionModel

java.lang.Object
  extended by org.trails.component.AbstractPropertySelectionModel
All Implemented Interfaces:
org.apache.tapestry.form.IPropertySelectionModel
Direct Known Subclasses:
EnumPropertySelectionModel, IdentifierSelectionModel

public abstract class AbstractPropertySelectionModel
extends java.lang.Object
implements org.apache.tapestry.form.IPropertySelectionModel


Field Summary
protected  boolean allowNone
           
static java.lang.String DEFAULT_NONE_LABEL
           
static java.lang.String DEFAULT_NONE_VALUE
           
protected  java.util.List instances
           
protected  java.lang.String labelProperty
           
protected  java.lang.String noneLabel
           
 
Constructor Summary
AbstractPropertySelectionModel(java.util.List instances)
           
AbstractPropertySelectionModel(java.util.List instances, boolean allowNone)
           
 
Method Summary
 java.lang.String getLabel(int index)
          (non-Javadoc)
 java.lang.String getLabelProperty()
           
 java.lang.String getNoneLabel()
           
 java.lang.Object getOption(int index)
          (non-Javadoc)
 int getOptionCount()
          (non-Javadoc)
 boolean isDisabled(int i)
           
 void setLabelProperty(java.lang.String labelProperty)
           
 void setNoneLabel(java.lang.String noneLabel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.form.IPropertySelectionModel
getValue, translateValue
 

Field Detail

instances

protected java.util.List instances

allowNone

protected boolean allowNone

labelProperty

protected java.lang.String labelProperty

DEFAULT_NONE_LABEL

public static final java.lang.String DEFAULT_NONE_LABEL
See Also:
Constant Field Values

DEFAULT_NONE_VALUE

public static final java.lang.String DEFAULT_NONE_VALUE
See Also:
Constant Field Values

noneLabel

protected java.lang.String noneLabel
Constructor Detail

AbstractPropertySelectionModel

public AbstractPropertySelectionModel(java.util.List instances)

AbstractPropertySelectionModel

public AbstractPropertySelectionModel(java.util.List instances,
                                      boolean allowNone)
Method Detail

getNoneLabel

public java.lang.String getNoneLabel()

setNoneLabel

public void setNoneLabel(java.lang.String noneLabel)

getLabelProperty

public java.lang.String getLabelProperty()

setLabelProperty

public void setLabelProperty(java.lang.String labelProperty)

getOptionCount

public int getOptionCount()
(non-Javadoc)

Specified by:
getOptionCount in interface org.apache.tapestry.form.IPropertySelectionModel
See Also:
IPropertySelectionModel.getOptionCount()

getOption

public java.lang.Object getOption(int index)
(non-Javadoc)

Specified by:
getOption in interface org.apache.tapestry.form.IPropertySelectionModel
See Also:
IPropertySelectionModel.getOption(int)

getLabel

public java.lang.String getLabel(int index)
(non-Javadoc)

Specified by:
getLabel in interface org.apache.tapestry.form.IPropertySelectionModel
See Also:
IPropertySelectionModel.getLabel(int)

isDisabled

public boolean isDisabled(int i)
Specified by:
isDisabled in interface org.apache.tapestry.form.IPropertySelectionModel


Copyright © 2004-2007. All Rights Reserved.