Вопрос

I have a simple questio: how to get/set checkbox from checkboxes in orbeon?

Something like this: /myCheckboxes[value="itemVal"].isChecked()

Это было полезно?

Решение

That's right, the values are space-separated. To extract them, instead of contains() use this to check if value 42 is included:

tokenize(../myCheckboxGroup, '\s+') = '42'

This splits the value on spaces with the \s+ regexp and returns a string sequence.

By the way you don't need to write:

if (condition) true() else false()

You can always just write:

condition

Другие советы

i've made something like this:

to set: simply set value of checkbox group as a string compound by all items values i want to have checked separated by a space.

To check if checkbox is checked i`ve made something like this:

if(contains(../myCheckboxGroup, '2')) then true() else false()

but its not good solution for example because it's making that max items is 10 if i want to add values as a successive integers.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top