Interface DataHandler<D extends AbstractEditorData,​V>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Class<?> getAttributeType​(D data, java.lang.String attributeName)
      Extracts an attribute class from a specific editor data object.
      java.lang.Object getAttributeValue​(D data, java.lang.String attributeName)
      Extracts an attribute value from a specific editor data object.
      V getItemValue​(D data)
      Returns the value for a single item.
      java.lang.String getTypeCode()
      Returns the type code for the model.
      java.util.Collection<V> getValue​(org.zkoss.zul.ListModel<D> data)
      Returns the value.
      org.zkoss.zul.ListModel<D> loadData​(java.util.Collection<V> initialValue, SearchResultData searchResult, java.util.Map<java.lang.String,​java.lang.Object> parameters)
      Initializes the data handler with new data.
      void setAttributeValue​(D data, java.lang.String attributeName, java.lang.Object attributeValue)
      Sets an attribute value to a specific data object.
    • Method Detail

      • getTypeCode

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

        org.zkoss.zul.ListModel<D> loadData​(java.util.Collection<V> initialValue,
                                            SearchResultData searchResult,
                                            java.util.Map<java.lang.String,​java.lang.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

        java.util.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

        java.lang.Class<?> getAttributeType​(D data,
                                            java.lang.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

        java.lang.Object getAttributeValue​(D data,
                                           java.lang.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,
                               java.lang.String attributeName,
                               java.lang.Object attributeValue)
        Sets an attribute value to a specific data object.
        Parameters:
        data - - the data object.
        attributeName - - the attribute name
        attributeValue - - new attribute value