public abstract class JsonResourceReference<T> extends ResourceReference
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>(searchBean, "translations"), CategoriesTextChoiceProvider.getInstance());
c.getSettings().setStateless(true);
c.getSettings().setMountPath(Application.CATEGORIES_JSON);
ResourceReference.Key, ResourceReference.LambdaResourceReference, ResourceReference.UrlAttributes| Constructor and Description |
|---|
JsonResourceReference(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract ChoiceProvider<T> |
getChoiceProvider()
The choice provider.
|
IResource |
getResource() |
canBeRegistered, equals, getDependencies, getExtension, getKey, getLocale, getName, getScope, getStyle, getUrlAttributes, getVariation, hashCode, of, of, toStringpublic JsonResourceReference(String name)
public IResource getResource()
getResource in class ResourceReferenceprotected abstract ChoiceProvider<T> getChoiceProvider()
Copyright © 2020. All rights reserved.