Class FieldValuesModel

java.lang.Object
org.apache.wicket.model.LoadableDetachableModel<List<FieldValueModel>>
ontopoly.models.FieldValuesModel
All Implemented Interfaces:
Serializable, Comparator<FieldValueModel>, org.apache.wicket.IClusterable, org.apache.wicket.model.IDetachable, org.apache.wicket.model.IModel<List<FieldValueModel>>

public class FieldValuesModel extends org.apache.wicket.model.LoadableDetachableModel<List<FieldValueModel>> implements Comparator<FieldValueModel>
See Also:
  • Constructor Details

  • Method Details

    • 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 Collection<? extends Object> getValues(FieldInstance fieldInstance)
    • getObject

      public List<FieldValueModel> getObject()
      Specified by:
      getObject in interface org.apache.wicket.model.IModel<List<FieldValueModel>>
      Overrides:
      getObject in class org.apache.wicket.model.LoadableDetachableModel<List<FieldValueModel>>
    • load

      protected List<FieldValueModel> load()
      Specified by:
      load in class org.apache.wicket.model.LoadableDetachableModel<List<FieldValueModel>>
    • compare

      public int compare(FieldValueModel fvm1, FieldValueModel fvm2)
      Specified by:
      compare in interface Comparator<FieldValueModel>