Class AbstractListModelConverter<C extends Component>

    • Constructor Detail

      • AbstractListModelConverter

        public AbstractListModelConverter()
    • Method Detail

      • getComponentModel

        protected abstract ListModel<?> getComponentModel​(C comp)
        Parameters:
        comp - the component that has listmodel
        Returns:
        null if no list model for the component
      • handleWrappedModel

        protected ListModel<?> handleWrappedModel​(BindContext ctx,
                                                  C comp,
                                                  ListModel<?> model)
        post processing the wrapped model. default return original one
        Parameters:
        ctx - the context
        comp - the component of the converter
        model - the wrapped model
        Returns:
        the list model
      • coerceToUi

        public java.lang.Object coerceToUi​(java.lang.Object val,
                                           C comp,
                                           BindContext ctx)
        Convert a Set, Map, List, Object[], Enum, or other kind of ListModel to associated ListModel.
        Specified by:
        coerceToUi in interface Converter<java.lang.Object,​java.lang.Object,​C extends Component>
        Parameters:
        val - must be instanceof Set, Map, List, Object[], Enum Class, or other kind of ListModel implementation.
        comp - associated component
        ctx - bind context
        Returns:
        the value to load to a component
      • coerceToBean

        public java.lang.Object coerceToBean​(java.lang.Object val,
                                             C comp,
                                             BindContext ctx)
        Convert a ListModel to Set, Map, List, or ListModel (itself).
        Specified by:
        coerceToBean in interface Converter<java.lang.Object,​java.lang.Object,​C extends Component>
        Parameters:
        val - must be ListModelSet, ListModelList, ListModelMap, or other kind of ListModel
        comp - associated component
        ctx - bind context
        Returns:
        the value to save to a bean