W3C home > Mailing lists > Public > www-forms@w3.org > February 2005

RE: How to disable a trigger

From: Catherine Poinsignon <catherine.poinsignon@lombard.lu>
Date: Wed, 02 Feb 2005 16:04:14 +0100
Message-Id: <s200fa47.046@lombard.lu>
To: <roland_merrick@uk.ibm.com>, <www-forms@w3.org>, <mark.birbeck@x-port.net>
I still have some problem to disable some triggers.
What I think is that it works fine when there is only one record. But,
I have several records on my form, followed by 3 triggers (view, edit,
delete). My xform looks like this:
Project1      View      Edit      Delete
Project2      View      Edit      Delete
Project3      View      Edit      Delete
...
And I want to disable some triggers in some cases.
Here is what I try to do, but it does not work:
            <xforms:instance id="data_wsrp_rewrite_">
                <data xmlns="">
                    <record>
                        <projectname>samplevalue</projectname>
                        <projectmanager>samplevalue</projectmanager>
                        </record>
                 </data>
            </xforms:instance>
            <xforms:instance id="user_wsrp_rewrite_">
                <user xmlns="">
                       <name>scopedpath?User/lname/scopedpath</name>
                </user>
            </xforms:instance>
            <xforms:bind id="ed_wsrp_rewrite_"
                nodeset="instance('user_wsrp_rewrite_')/name"
               
relevant="contains(instance('data_wsrp_rewrite_')/record/projectmanager,
.)" type="xsd:string"/>
...
...
        <xforms:repeat id="record_wsrp_rewrite_"
nodeset="instance('data_wsrp_rewrite_')/record">
               <xforms:output ref="projectname"/>
                <xforms:trigger>
                    <xforms:label>View</xforms:label>...
                </xforms:trigger>
                <xforms:trigger bind="ed_wsrp_rewrite_">
                    <xforms:label>Edit</xforms:label> ...
                </xforms:trigger>
....
        </xforms:repeat>
When the relevant condition in the bind is true for the first record,
the triggers are enabled for all. When the relevant condition is false
for the first record, the triggers are disable for all.
How can I define my relevant condition so that it should be evaluated
for each record ?
Note: when I try to display the test result for each records, it's ok:
                <xforms:output
value="contains(projectmanager,instance('user_wsrp_rewrite_')/name)">
                </xforms:output>
Thank's in advance for your help.
Regards,
 
Catherine
 





Received on Wednesday, 2 February 2005 15:06:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:59 GMT