English 中文(简体)
XForms: set relevancy for a list
原标题:

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 " />
问题回答

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





相关问题
xform data grid

I am using orbeon to process my xforms. I am attempting to create a data grid that I can use to copy and paste rows/columns of data from my clipboard (excel). Do you have any clue how I can implement ...

Connect Chiba xForm to a restful web service (exist db)

I need to read an xml instance from an exist db. I am attempting to connect chiba to a restful web service via the following command: <xf:model> <xf:instance id="data-instance" ...

ISML PAC to XForm Conversion

Are there any tools or write-ups that can help in converting ISML PACs to XForms? Does anyone have experience in such a conversion?

XForms: how to deal with instance data that changes?

At the moment I am working on an XForms application to mutate XML data. This data comes from a local XML file. The file is exported from another application in a static way and read into the ...

Client side XForms processing tools [closed]

What would be the best client side javascript based XForms processor? I m trying to migrate plugin (activeX) based Xforms processing solution to a javascript based client side processor. But the ...

Default Values in XForms Input

I have an XForm that has certain fields that may often be left blank (optional street address). Is there is technique to set a default value for that field, preferably a space (I am running into weird ...

热门标签