Class AbstractOption<T extends java.io.Serializable>
- java.lang.Object
-
- org.wicketstuff.wiquery.core.options.AbstractOption<T>
-
- All Implemented Interfaces:
java.io.Serializable,org.apache.wicket.model.IDetachable,org.apache.wicket.util.io.IClusterable,IListItemOption,IModelOption<T>,ITypedOption<T>
- Direct Known Subclasses:
BooleanOption,DoubleOption,FloatOption,IntegerOption,LiteralOption,LongOption,ShortOption,StringOption
public abstract class AbstractOption<T extends java.io.Serializable> extends java.lang.Object implements org.apache.wicket.model.IDetachable, ITypedOption<T>, IModelOption<T>
Wraps a value to be generated as a JavaScript string.- Since:
- 1.2
- Author:
- Emond Papegaaij
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractOption(org.apache.wicket.model.IModel<T> value)Builds a new instance ofAbstractOption.AbstractOption(T value)Builds a new instance ofAbstractOption.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddetach()java.lang.CharSequencegetJavascriptOption()Method retrieving the javascript's representation of the optionorg.apache.wicket.model.IModel<T>getModel()TgetValue()voidsetModel(org.apache.wicket.model.IModel<T> model)abstract java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.wicketstuff.wiquery.core.options.IModelOption
wrapOnAssignment
-
-
-
-
Constructor Detail
-
AbstractOption
public AbstractOption(T value)
Builds a new instance ofAbstractOption.- Parameters:
value- the wrapped value
-
AbstractOption
public AbstractOption(org.apache.wicket.model.IModel<T> value)
Builds a new instance ofAbstractOption.- Parameters:
value- the wrapped value
-
-
Method Detail
-
getJavascriptOption
public java.lang.CharSequence getJavascriptOption()
Description copied from interface:IListItemOptionMethod retrieving the javascript's representation of the option- Specified by:
getJavascriptOptionin interfaceIListItemOption
-
toString
public abstract java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
detach
public void detach()
- Specified by:
detachin interfaceorg.apache.wicket.model.IDetachable
-
getModel
public org.apache.wicket.model.IModel<T> getModel()
- Specified by:
getModelin interfaceIModelOption<T extends java.io.Serializable>- Returns:
- Return the model
-
setModel
public void setModel(org.apache.wicket.model.IModel<T> model)
- Specified by:
setModelin interfaceIModelOption<T extends java.io.Serializable>
-
getValue
public T getValue()
- Specified by:
getValuein interfaceIModelOption<T extends java.io.Serializable>- Specified by:
getValuein interfaceITypedOption<T extends java.io.Serializable>- Returns:
- Returns the value or null if no value is set.
-
-