1
votes

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'" />
1
Can you post full example? The code so far seems correct. - Tambet
Pumi, which XForms processor are you using? - Phil Booth
Do you want to hide the entire selection control, or just some items from the itemset? - ebruchez
@Phil - Orbeon @ebruchez - I want to hide the entire control. When I try it with a dropdown control, this relevancy works. But the actual issue is, we are trying to use a custom component and we want to show/hide the entire component. The relevancy attribute seems to work for built-in controls and not for custom components. - Purni

1 Answers

0
votes

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>.