Inject Tagfield and selection with multiple='true'? | Community
Skip to main content
Level 2
Feb 2, 2020 5:55 PM UTC
Solved

Inject Tagfield and selection with multiple='true'?

How to retrieve value from below field with multiple='true' i.e can select ,multiple values  via sling model ?

1. tagfiled

2. selection

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
Level 10
Feb 3, 2020 4:26 PM UTC

Hi,

 

Map the respective tagfield/select resource in Sling model using the same "name" attribute value with data type as String[]. 

Further processing of the values can be done either in init method or in respective getters

 

Eg: tagfield resource "name" property value is tagValues

@586265

private String[] tagValues;

1 reply

Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
Level 10
Feb 3, 2020 4:26 PM UTC

Hi,

 

Map the respective tagfield/select resource in Sling model using the same "name" attribute value with data type as String[]. 

Further processing of the values can be done either in init method or in respective getters

 

Eg: tagfield resource "name" property value is tagValues

@586265

private String[] tagValues;

Translate