xPages repeat control with scoped variable as data source

后端 未结 2 1402
无人共我
无人共我 2020-12-21 08:53

I need to build repeat control or (view or data table) that uses scoped variable as data source. And the scoped variable should be an array.. Or even just javaScript array..

2条回答
  •  别那么骄傲
    2020-12-21 09:14

    It's worth looking at java.util.ArrayList or java.util.HashMap. The first gives a one dimensional object, the second a two-dimensional. You'll probably get better typeahead support. HashMap may seem scary, but it's actually very familiar to you - scoped variables are HashMaps. myMap.keySet() is what to use as the "value" for your repeat, then assuming var="key" you can use myMap.get(key) to get the value.

    If you want to use JavaScript objects, look at the video I did for TLCC's webinar last year of my 2013 IBM Connect session with Mike McGarel "It's Not Herculean...". I do exactly that.

提交回复
热议问题