Class JsonResourceReference<T>

java.lang.Object
org.apache.wicket.request.resource.ResourceReference
org.wicketstuff.select2.JsonResourceReference<T>
All Implemented Interfaces:
Serializable, IClusterable

public abstract class JsonResourceReference<T> extends ResourceReference
A resource that serves JSON for stateless . You have to mount at application init like. E.g.

        mountResource(CATEGORIES_JSON, new JsonResourceReference("categories") {

                        private static final long serialVersionUID = 1L;

                        protected ChoiceProvider getChoiceProvider() {
                                return CategoriesTextChoiceProvider.getInstance();
                        }
                });

 

and then on component you add

        Select2MultiChoice c = new Select2MultiChoice("categories", new PropertyModel<Collection<CategoryTranslation>>(searchBean, "translations"), CategoriesTextChoiceProvider.getInstance());
        c.getSettings().setStateless(true);
        c.getSettings().setMountPath(Application.CATEGORIES_JSON);
  

Author:
Ernesto Reinaldo Barreiro (reiern70@mail.com).
See Also:
  • Constructor Details

    • JsonResourceReference

      public JsonResourceReference(String name)
  • Method Details