Class ChoiceFilter<T>

    • Constructor Detail

      • ChoiceFilter

        public ChoiceFilter​(String id,
                            IModel<T> model,
                            FilterForm<?> form,
                            IModel<? extends List<? extends T>> choices,
                            boolean autoSubmit)
        Constructor.
        Parameters:
        id - component id
        model - model for the drop down choice component
        form - filter form this component will be attached to
        choices - list of choices, see DropDownChoice
        autoSubmit - if true this filter will submit the form on selection change
      • ChoiceFilter

        public ChoiceFilter​(String id,
                            IModel<T> model,
                            FilterForm<?> form,
                            List<? extends T> choices,
                            boolean autoSubmit)
        Constructor
        Parameters:
        id - component id
        model - model for the drop down choice component
        form - filter form this component will be attached to
        choices - list of choices, see DropDownChoice
        autoSubmit - if true this filter will submit the form on selection change
      • ChoiceFilter

        public ChoiceFilter​(String id,
                            IModel<T> model,
                            FilterForm<?> form,
                            List<? extends T> choices,
                            IChoiceRenderer<? super T> renderer,
                            boolean autoSubmit)
        Constructor
        Parameters:
        id - component id
        model - model for the drop down choice component
        form - filter form this component will be attached to
        choices - list of choices, see DropDownChoice
        renderer - choice renderer, see DropDownChoice
        autoSubmit - if true this filter will submit the form on selection change
    • Method Detail

      • newDropDownChoice

        protected DropDownChoice<TnewDropDownChoice​(String id,
                                                      IModel<T> model,
                                                      IModel<? extends List<? extends T>> choices,
                                                      IChoiceRenderer<? super T> renderer)
        Factory method for the drop down choice component
        Parameters:
        id - component id
        model - component model
        choices - choices model
        renderer - choice renderer
        Returns:
        created drop down component
      • getChoice

        public final DropDownChoice<TgetChoice()
        Returns:
        the DropDownChoice form component created to represent this filter