Class AbstractObjectAutoCompleteRenderer<O>

    • Constructor Detail

      • AbstractObjectAutoCompleteRenderer

        public AbstractObjectAutoCompleteRenderer()
    • Method Detail

      • getIdValueForObject

        protected final String getIdValueForObject​(O object)
        Get the verified id value for an object
        Parameters:
        object - for which to fetch the id
        Returns:
        the id
        Throws:
        IllegalStateException - if the id value could not be extracted
      • getIdValue

        protected String getIdValue​(O object)
        Get id of the object to render. By default this is extracted by reflection using the idProperty, but can be overwritten by a subclass
        Parameters:
        object - object from which to extract the id
        Returns:
        the id value
        Throws:
        IllegalArgumentException - if no id could be extracted
      • getTextValueForObject

        protected final String getTextValueForObject​(O object)
        Get and check proper text value
        Parameters:
        object - object for which to get the text value
        Returns:
        return the verified text value
        Throws:
        IllegalStateException - if the text value could not be extracted
      • getTextValue

        protected String getTextValue​(O pObject)
        Retrieves the text value that will be set on the textbox if this assist is selected Can be overwritten, by default it returns the object's toString()
        Parameters:
        pObject - assist choice object
        Returns:
        the text value that will be set on the textbox if this assist is selected
      • setIdProperty

        public void setIdProperty​(String pIdProperty)
        Set the property for extracting the id of an object
        Parameters:
        pIdProperty - property name of the object id
      • renderObject

        protected void renderObject​(O object,
                                    Response response,
                                    String criteria)
      • renderChoice

        protected void renderChoice​(O object,
                                    Response response,
                                    String criteria)
        Render the visual portion of the assist. Usually the html representing the assist choice object is written out to the response use
        Parameters:
        object - current assist choice
        response -
        criteria -