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

How to disable a trigger

From: Catherine Poinsignon <catherine.poinsignon@lombard.lu>
Date: Fri, 21 Jan 2005 15:30:29 +0100
Message-Id: <s1f1207a.056@lombard.lu>
To: <www-forms@w3.org>
Hello,
 
I want to disable a trigger for some user. I have a list of items,
following by 3 triggers : view, edit, delete. Everybody should view the
details but only some user should update or delete. So I would like to
diable these triggers, i.e. make them not relevant.
I think I have to use the relevant property from a bind element, but I
did not know how.
Could you please help me ?
 
Here is my suff :
 
<xforms:model id="model_wsrp_rewrite_"
schema="resource/schema/schemadt.xsd">
            <xforms:instance id="data_wsrp_rewrite_"
                nweb:pageflow-replace-data="always"
nweb:primary-input-data="true">
                <data xmlns="">
                    <record>
                        <projectname>samplevalue</projectname>
                        <id>samplevalue</id>
                        <projectmanager>sample</projectmanager>
                    </record>
            </xforms:instance>
             <xforms:submission action="?verb=view"
                id="sView_wsrp_rewrite_" method="post"
                model="model_wsrp_rewrite_"
ref="instance('submit_wsrp_rewrite_')"/>
            <xforms:submission action="?verb=edit"
                id="sEdit_wsrp_rewrite_" method="post"
                model="model_wsrp_rewrite_"
ref="instance('submit_wsrp_rewrite_')"/>
              <xforms:submission action="?verb=delete"
                id="sDelete_wsrp_rewrite_" method="post"
                model="model_wsrp_rewrite_"
ref="instance('submit_wsrp_rewrite_')"/>
        </xforms:model>
....
....
                <xforms:trigger class="nvi-link-style
nvP11_wsrp_rewrite_">
                    <xforms:label>View</xforms:label>
                    <xforms:action ev:event="DOMActivate">
                        <xforms:setvalue
                           
ref="instance('submit_wsrp_rewrite_')/query/id"
value="instance('data_wsrp_rewrite_')/record[index('record_wsrp_rewrite_')]/id/@key"/>
                        <xforms:send
submission="sView_wsrp_rewrite_"/>
                    </xforms:action>
                </xforms:trigger>
                <xforms:trigger class="nvi-link-style
nvP12_wsrp_rewrite_">
                    <xforms:label>Edit</xforms:label>
                    <xforms:action ev:event="DOMActivate">
                        <xforms:setvalue
                           
ref="instance('submit_wsrp_rewrite_')/query/id"
value="instance('data_wsrp_rewrite_')/record[index('record_wsrp_rewrite_')]/id/@key"/>
                        <xforms:send
submission="sEdit_wsrp_rewrite_"/>
                    </xforms:action>
                </xforms:trigger>
                <xforms:trigger class="nvi-link-style
nvP13_wsrp_rewrite_">
                    <xforms:label>Delete</xforms:label>
                    <xforms:action ev:event="DOMActivate">
                        <xforms:setvalue
                           
ref="instance('submit_wsrp_rewrite_')/query/id"
value="instance('data_wsrp_rewrite_')/record[index('record_wsrp_rewrite_')]/id/@key"/>
                        <xforms:send
submission="sDelete_wsrp_rewrite_"/>
                    </xforms:action>
                </xforms:trigger>






Received on Friday, 21 January 2005 16:34:48 GMT

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