Class JcrMultiPropertyValueModel<T extends Serializable>

java.lang.Object
org.hippoecm.frontend.model.properties.JcrMultiPropertyValueModel<T>
All Implemented Interfaces:
Serializable, org.apache.wicket.model.IDetachable, org.apache.wicket.model.IModel<List<T>>, org.apache.wicket.util.io.IClusterable

public class JcrMultiPropertyValueModel<T extends Serializable> extends Object implements org.apache.wicket.model.IModel<List<T>>
Model of a multiple property with a Collection as object. Can be used for Wicket components that edit multiple property values directy, i.e. without a surrounding repeater, for instance a multiselect list.

The contents of the list must be saved explicitly; i.e. modifying a returned list is not sufficient, the client must also invoke setObject(List).

See Also:
  • Constructor Details

    • JcrMultiPropertyValueModel

      public JcrMultiPropertyValueModel(JcrItemModel<Property> itemModel)
    • JcrMultiPropertyValueModel

      public JcrMultiPropertyValueModel(JcrPropertyModel<T> propertyModel)
  • Method Details

    • getProperty

      public Property getProperty()
    • getItemModel

      public JcrItemModel<Property> getItemModel()
    • getObject

      public List<T> getObject()
      Specified by:
      getObject in interface org.apache.wicket.model.IModel<T extends Serializable>
    • detach

      public void detach()
      Specified by:
      detach in interface org.apache.wicket.model.IDetachable
      Specified by:
      detach in interface org.apache.wicket.model.IModel<T extends Serializable>
    • setObject

      public void setObject(List<T> objects)
      Specified by:
      setObject in interface org.apache.wicket.model.IModel<T extends Serializable>
    • load

      protected List<T> load()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object