[xwiki-users] Retrieving selected items from a list property individually
Hi, When viewing a list property of object myObj included in doc, both $myObj.get($myListProperyName) and $doc.display($myListProperyName) return a string containing selected options delimited by a space. This isn't very handy for displaying them in a readable manner, since you end up with something like "my option a my option b my option c" - no way to distinguish the individual options. How can I access the selected options individually? Cheers, Robin
Ignore me, I found it: $options=$myObj.getProperty($myListProperyName).getValue() $options then holds a velocity arrayList of the selected options. On 09/01/06, Robin Fernandes <[email protected]> wrote:
Hi,
When viewing a list property of object myObj included in doc, both $myObj.get($myListProperyName) and $doc.display($myListProperyName) return a string containing selected options delimited by a space.
This isn't very handy for displaying them in a readable manner, since you end up with something like "my option a my option b my option c" - no way to distinguish the individual options.
How can I access the selected options individually?
Cheers, Robin
participants (1)
-
Robin Fernandes