XForms:设置列表的相关性
我的模型实例中有一个列表元素。我正在使用 Orbeon XForms。
<mypage>
<list name='mylist'/>
<status />
</mypage>
状态可以是私有或公共。在 xforms:binding 中,我想设置用于显示/隐藏列表的相关属性。该列表绑定到一个下拉列表。如果状态为“私人”,我想显示该列表,如果状态为“公开”,我想隐藏该列表。
我尝试了以下方法,但它不起作用。
<xforms:bind nodeset="instance('myinstance')/list[@name='mylist']" relevant="instance('myinstance')/status='Private'" />
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'" />
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您有一个绑定到该
的自定义 XBL 组件,并且您是说绑定到该元素的自定义 XBL 控件未隐藏。如果是这种情况,很可能是因为 XBL 组件内部没有绑定到节点的
。当您编写
时,它不会将
绑定到some-node
本身。如果在实现中,如果组件正确复制
上的ref
,您只会获得“就好像”组件绑定到节点的行为。代码>.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>
tosome-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 theref
on an<xforms:group>
.