java.lang.Object
org.apache.wicket.request.resource.ResourceReference
org.wicketstuff.select2.JsonResourceReference<T>
- All Implemented Interfaces:
Serializable,IClusterable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.wicket.request.resource.ResourceReference
ResourceReference.Key, ResourceReference.LambdaResourceReference, ResourceReference.UrlAttributes -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.wicket.request.resource.ResourceReference
canBeRegistered, equals, getDependencies, getExtension, getKey, getLocale, getName, getScope, getStyle, getUrlAttributes, getVariation, hashCode, of, of, toString
-
Constructor Details
-
JsonResourceReference
-
-
Method Details
-
getResource
- Specified by:
getResourcein classResourceReference
-
getChoiceProvider
The choice provider.- Returns:
- The ChoiceProvider
-