tags:

views:

26

answers:

1

I have a list element in my model instance. I am using Orbeon XForms.

<mypage>
    <list name='mylist'/>
    <status />
</mypage>

Status can be Private or Public. In xforms:binding, I want to set relevant attribute for showing/hiding the list. The list is bound to a drop-down. If status is Private I want to show the list, if status is Public I want to hide the list.

I tried the following and it does not work.

<xforms:bind nodeset="instance('myinstance')/list[@name='mylist']" relevant="instance('myinstance')/status='Private'" />
A: 

I assume that you have a custom XBL component bound to that <list> and you are saying that the custom XBL control you have bound to that element is not hidden. If that is the case, most likely it is because you don't have inside the XBL component an <xforms:group> that is bound to the node.

When you write <me:my-component ref="some-node"/>, it doesn't bind the <me:my-component> to some-node by itself. You only get a behavior which is "as if" the component was bound to the node if in the implementation if the component you properly copy the ref on an <xforms:group>.

Alessandro Vernet