Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Inject Tagfield and selection with multiple='true'?

rajeshk7403909
Level 2
Level 2

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

1. tagfiled

2. selection

1 Accepted Solution
Vijayalakshmi_S
Correct answer by
Community Advisor
Community Advisor

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;

View solution in original post

1 Reply
Vijayalakshmi_S
Correct answer by
Community Advisor
Community Advisor

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;

View solution in original post