Simplest way to implement Multifield in Sling Models
Hi all,
I want to write a sling models for multifield for touch ui component. If any one having idea to write the sling model for multifield with minimal code please suggest some examples.
Thanks
Hi all,
I want to write a sling models for multifield for touch ui component. If any one having idea to write the sling model for multifield with minimal code please suggest some examples.
Thanks
In Sling Model annotate your multifiled with @ChildResource with reference List<T>
Write a Sling Model for Multi Field item. Ex: MultiFieldItem is model for multifield item which will have all properties of each item.
@ChildResource
private List<MultiFieldItem> myMultiField;
Now you can iterate the myMultiField list it HTL or in Sling Model to get data.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.