Inject Tagfield and selection with multiple='true'? | Community
Skip to main content
Level 2
February 2, 2020
Solved

Inject Tagfield and selection with multiple='true'?

  • February 2, 2020
  • 1 reply
  • 1782 views

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.
Best answer by Vijayalakshmi_S

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
February 3, 2020

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;