Interface SuggestTagDeclaration

  • All Superinterfaces:
    HasBinding, HasId, HasIdBindingAndRendered, IsRendered

    public interface SuggestTagDeclaration
    extends HasIdBindingAndRendered
    Renders a list of suggested texts for a given input field. Basic features:
    • provide a list directly while rendering (not AJAX needed) [todo]
    • update by typing (AJAX)
    • minimum number of typed characters (to avoid useless requests)
    • update delay (useful for optimization)
    • filter on client side (useful for optimization) [todo]
    Since:
    2.0.0
    • Method Detail

      • setSuggestMethod

        @Deprecated
        void setSuggestMethod​(String suggestMethod)
        Deprecated.
        since 3.0.0. Please use an <tc:selectItems> tag or a list of <tc:selectItem> tags.
        MethodExpression which generates a list of suggested input values based on the currently entered text, which could be retrieved via getSubmittedValue() on the UIIn. The expression has to evaluate to a public method which has a javax.faces.component.UIInput parameter and returns a List<String>, a List<org.apache.myfaces.tobago.model.AutoSuggestItem> or a org.apache.myfaces.tobago.model.AutoSuggestItems.
      • setMinimumCharacters

        void setMinimumCharacters​(String minimumCharacters)
        Minimum number of characters to type before the list will be requested. If the value is 0, there will be send an initial list to the client. So, if you set
        update="false"
        this value should be 0.
      • setDelay

        void setDelay​(String delay)
        Time in milli seconds before the list will be requested (by AJAX).
      • setMaximumItems

        void setMaximumItems​(String maximumItems)
        The maximum number of item to display in the drop down list.
      • setTotalCount

        void setTotalCount​(String totalCount)
        The real size of the result list. Typically the result list will be cropped (in the backend) to save memory. This value can be set, to show the user there are more results for the given string. If the value is -1, no hint will be displayed.
      • setFilter

        void setFilter​(String filter)
        TODO: not implemented yet

        Additional client side filtering of the result list. This is useful when sending the full list initially to the client and setting update=false.

        Possible values are:

        all
        no filtering
        prefix
        checks if the suggested string starts with the typed text
        contains
        checks if the typed text is inside of the suggested string

        The filter will only applied on the client side and only if server updated (by AJAX) are turned off (update=false);

      • setUpdate

        void setUpdate​(String update)
        TODO: not implemented yet

        Should the list be updated while typing (via AJAX). This is the default behaviour. If you set this value to false, please set the minimumCharacters="0".

      • setQuery

        void setQuery​(String query)
        The query is the string typed by the user.