Type Parameters:
D - - the type of the item data
V - - the type of the item value
All Known Implementing Classes:
AbstractDataHandler, AsBoostRulesDataHandler, AsExcludedFacetsDataHandler, AsExcludedItemsDataHandler, AsExcludedSortsDataHandler, AsFacetsDataHandler, AsPromotedFacetsDataHandler, AsPromotedItemsDataHandler, AsPromotedSortsDataHandler, AsSortsDataHandler

public interface DataHandler<D extends AbstractEditorData,V>
Data handler for the generic configurable reference editor.
  • Method Details

    • getTypeCode

      String getTypeCode()
      Returns the type code for the model.
      Returns:
      the type code
    • loadData

      org.zkoss.zul.ListModel<D> loadData(Collection<V> initialValue, SearchResultData searchResult, Map<String,Object> parameters)
      Initializes the data handler with new data.
      Parameters:
      initialValue - - the initial value
      searchResult - - the search result
      parameters - - the data handler parameters
      Returns:
      the data
    • getValue

      Collection<V> getValue(org.zkoss.zul.ListModel<D> data)
      Returns the value.
      Parameters:
      data - - the data object
      Returns:
      the current value
      Since:
      6.7
    • getItemValue

      V getItemValue(D data)
      Returns the value for a single item.
      Parameters:
      data - - the data object
      Returns:
      the current value
      Since:
      6.7
    • getAttributeType

      Class<?> getAttributeType(D data, String attributeName)
      Extracts an attribute class from a specific editor data object.
      Parameters:
      data - - the data object
      attributeName - - the attribute name
      Returns:
      the attribute class
    • getAttributeValue

      Object getAttributeValue(D data, String attributeName)
      Extracts an attribute value from a specific editor data object.
      Parameters:
      data - - the data object
      attributeName - - the attribute name
      Returns:
      the attribute value
    • setAttributeValue

      void setAttributeValue(D data, String attributeName, Object attributeValue)
      Sets an attribute value to a specific data object.
      Parameters:
      data - - the data object.
      attributeName - - the attribute name
      attributeValue - - new attribute value