Inject Tagfield and selection with multiple='true'?

Avatar

Avatar

rajeshk7403909

Avatar

rajeshk7403909

rajeshk7403909

02-02-2020

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

1. tagfiled

2. selection

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Vijayalakshmi_S

MVP

Avatar

Vijayalakshmi_S

MVP

Vijayalakshmi_S
MVP

03-02-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

@inject

private String[] tagValues;

Answers (0)