Login  Register

Submit trigger: readonly dependant on the validity of fields

Posted by Karolin Heiss on Nov 11, 2009; 4:20pm
URL: https://discuss.orbeon.com/Error-when-using-xforms-action-with-xforms-setValue-tp585594p585931.html

Hallo

I try to implement a submit trigger which is read-only dependant on the
validity of fields.
I dont get it. How do I have to define the readonly attribute of the
binding?

trigger:
<xforms:trigger ref="$control/submit-trigger">...

binding:
                <xforms:model id="control-model">
                        <xforms:instance id="control-instance">
                                <control xmlns="">
                                        <submit-trigger/>
                                        <valid>
                                                <LastName>false</LastName>
                                                <FirstName>false</FirstName>
                                        </valid>
                                </control>
                        </xforms:instance>
                        <xforms:bind
nodeset="instance('control-instance')">
                                <xforms:bind nodeset="submit-trigger"
readonly="not(valid/LastName = 'true' and valid/FirstName = 'true')"/>
                                <!--xforms:bind nodeset="submit-trigger"
readonly="true()"/-->
                        </xforms:bind>
                </xforms:model>


You can try my small test code.
Thank you very much for your answer :-)

Karolin


PS: Using the latest nightly build 3.7.1.200911110900





--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

testxforms.xhtml (4K) Download Attachment