ontopoly.models
Class FieldValuesModel
java.lang.Object
org.apache.wicket.model.LoadableDetachableModel<java.util.List<FieldValueModel>>
ontopoly.models.FieldValuesModel
- All Implemented Interfaces:
- java.io.Serializable, java.util.Comparator<FieldValueModel>, org.apache.wicket.IClusterable, org.apache.wicket.model.IDetachable, org.apache.wicket.model.IModel<java.util.List<FieldValueModel>>
public class FieldValuesModel
- extends org.apache.wicket.model.LoadableDetachableModel<java.util.List<FieldValueModel>>
- implements java.util.Comparator<FieldValueModel>
- See Also:
- Serialized Form
Methods inherited from class org.apache.wicket.model.LoadableDetachableModel |
detach, isAttached, onAttach, onDetach, setObject, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
FieldValuesModel
public FieldValuesModel(FieldInstanceModel fieldInstanceModel)
FieldValuesModel
public FieldValuesModel(FieldInstanceModel fieldInstanceModel,
java.util.Comparator<java.lang.Object> comparator)
getAutoExtraField
public boolean getAutoExtraField()
setAutoExtraField
public void setAutoExtraField(boolean autoExtraField)
getFieldInstanceModel
public FieldInstanceModel getFieldInstanceModel()
getShowExtraField
public boolean getShowExtraField()
getShowExtraFieldUserTriggered
public boolean getShowExtraFieldUserTriggered()
setShowExtraField
public void setShowExtraField(boolean showExtraField,
boolean userTriggered)
size
public int size()
- Returns the number of values in the model. Note that the first
one might not represent an actual value. Use getNumberOfValues()
to get the real number of actual values in the model.
- Returns:
- the size of the model.
getNumberOfValues
public int getNumberOfValues()
- Get the number of actual existing values. Number is either the same
as size() or one less if the showExtraField is enabled.
- Returns:
- the number of actual values
containsExisting
public boolean containsExisting()
getValues
protected java.util.Collection<? extends java.lang.Object> getValues(FieldInstance fieldInstance)
getObject
public java.util.List<FieldValueModel> getObject()
- Specified by:
getObject
in interface org.apache.wicket.model.IModel<java.util.List<FieldValueModel>>
- Overrides:
getObject
in class org.apache.wicket.model.LoadableDetachableModel<java.util.List<FieldValueModel>>
load
protected java.util.List<FieldValueModel> load()
- Specified by:
load
in class org.apache.wicket.model.LoadableDetachableModel<java.util.List<FieldValueModel>>
compare
public int compare(FieldValueModel fvm1,
FieldValueModel fvm2)
- Specified by:
compare
in interface java.util.Comparator<FieldValueModel>
Copyright © 2000-2012 Ontopia.