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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

JavaScript Use-API and Multivalues

ariellea4070516
Level 3
Level 3

Concerning this tutorial on creating a tabular layout dialog​, I have a question about the mechanics at work.

Specifically, I am trying to understand the following line:

if (item.hasOwnProperty("multivalues"))

I understand that `item` is using `properties` (org.apache.sling.api.resource.ValueMap) to traverse the value map and get the node by the name of `subscriptionmulti`.

However, where is the `multivalues` property coming from?

Thank you kindly for your assistance!

Arielle

1 Accepted Solution
Gaurav-Behl
Correct answer by
Community Advisor
Community Advisor

'item.hasOwnProperty("multivalues")' says that item should've a property of its own with the name 'multivalues'. The variable item is the JSON representation of 'tempProposerMap' which is essentially 'subscriptionmulti' property.

It should be available in the attached source code or when you code/configure the example end-to-end, you should be able to locate it.

View solution in original post

1 Reply
Gaurav-Behl
Correct answer by
Community Advisor
Community Advisor

'item.hasOwnProperty("multivalues")' says that item should've a property of its own with the name 'multivalues'. The variable item is the JSON representation of 'tempProposerMap' which is essentially 'subscriptionmulti' property.

It should be available in the attached source code or when you code/configure the example end-to-end, you should be able to locate it.