org.odlabs.wiquery.core.options
Class AbstractOption<T extends Serializable>
java.lang.Object
org.odlabs.wiquery.core.options.AbstractOption<T>
- All Implemented Interfaces:
- Serializable, org.apache.wicket.IClusterable, org.apache.wicket.model.IDetachable, IListItemOption, IModelOption<T>, ITypedOption<T>
- Direct Known Subclasses:
- BooleanOption, DoubleOption, FloatOption, IntegerOption, LiteralOption, LongOption, ShortOption, StringOption
public abstract class AbstractOption<T extends Serializable>
- extends 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
AbstractOption
public AbstractOption(T value)
- Builds a new instance of
AbstractOption
.
- Parameters:
literal
- the wrapped value
AbstractOption
public AbstractOption(org.apache.wicket.model.IModel<T> value)
- Builds a new instance of
AbstractOption
.
- Parameters:
literal
- the wrapped value
getJavascriptOption
public CharSequence getJavascriptOption()
- Description copied from interface:
IListItemOption
- Method retrieving the javascript's representation of the option
- Specified by:
getJavascriptOption
in interface IListItemOption
- Returns:
toString
public abstract String toString()
- Overrides:
toString
in class Object
detach
public void detach()
- Specified by:
detach
in interface org.apache.wicket.model.IDetachable
getModel
public org.apache.wicket.model.IModel<T> getModel()
- Specified by:
getModel
in interface IModelOption<T extends Serializable>
- Returns:
- Return the model
setModel
public void setModel(org.apache.wicket.model.IModel<T> model)
- Specified by:
setModel
in interface IModelOption<T extends Serializable>
getValue
public T getValue()
- Specified by:
getValue
in interface IModelOption<T extends Serializable>
- Specified by:
getValue
in interface ITypedOption<T extends Serializable>
- Returns:
- Returns the value or null if no value is set.
Copyright © 2012. All Rights Reserved.