Hi,
I'm trying to dynamically set the validate="false" attribute on my XForms submission, but it seems I'm unable to do so. I have the code: <xforms:submission id="submit_model_Document" ref="instance('instance_model_Document')" action="{xxforms:instance('url')/serverpath}/read-xform.php?action={xxforms:instance('url')/submit/submitaction}" method="post" validate="{xxforms:instance('url')/validate}" /> with the value of instance('url')/validate equalling "false", but it appears that this doesn't work. Does the fact that this value is set automatically mean that the value of "validate" equals true...?? How can I achieve this? -- Colin Seaman Senior Developer Tradocs Ltd, Tower Point, 44 North Road, Brighton, BN1 1YR email: [hidden email] skype: colin,seaman telephone: 0870-1417031 website: http://www.tradocs.net This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please contact Tradocs. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. This content of this email is without prejudice. -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
I don't think you can do this, only certain fields allow AVTs, one solution
is to create two submissions one true one false and call Then do something like <xforms:send submission="submit_model_Document_true" if="xxforms:instance('url')/validate = 'true'"/> <xforms:send submission="submit_model_Document_false" if="xxforms:instance('url')/validate = 'false'"/> Hope this helps Ryan Ryan Puddephatt Software Engineer Teleflex Group - IT UK 1 Michaelson Square Livingston West Lothian Scotland EH54 7DP e> [hidden email] t> +44(0)1506 407 110 f> +44(0)1506 407 108 >-----Original Message----- >From: Colin Seaman [mailto:[hidden email]] >Sent: 24 January 2007 15:07 >To: [hidden email] >Subject: [ops-users] validate = false > >Hi, > >I'm trying to dynamically set the validate="false" attribute >on my XForms submission, but it seems I'm unable to do so. > >I have the code: > ><xforms:submission id="submit_model_Document" >ref="instance('instance_model_Document')" >action="{xxforms:instance('url')/serverpath}/read-xform.php?act >method="post" validate="{xxforms:instance('url')/validate}" /> > >with the value of instance('url')/validate equalling "false", >but it appears that this doesn't work. > >Does the fact that this value is set automatically mean that >the value of "validate" equals true...?? > >How can I achieve this? > >-- >Colin Seaman >Senior Developer > >Tradocs Ltd, >Tower Point, >44 North Road, >Brighton, >BN1 1YR > >email: [hidden email] >skype: colin,seaman >telephone: 0870-1417031 >website: http://www.tradocs.net > >This email and any files transmitted with it are confidential >and intended solely for the use of the individual or entity to >whom they are addressed. If you have received this email in >error please contact Tradocs. Please note that any views or >opinions presented in this email are solely those of the >author and do not necessarily represent those of the company. >Finally, the recipient should check this email and any >attachments for the presence of viruses. The company accepts >no liability for any damage caused by any virus transmitted by >this email. >This content of this email is without prejudice. > > > -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Colin Seaman
Colin,
I find the reference a little ambiguous because the text for relevant says "...evaluates to false()" but not so for validate. Do you mean the value of the node is the text "false" or the text "false()" or "true()" i.e., the Boolean functions? Perhaps you need to: validate="boolean({xxforms:instance('url')/validate})" or validate="{xxforms:instance('url')/validate}='true'" --Hank Hank Ratzesberger Institute for Crustal Studies University of California, Santa Barbara ----- Original Message ----- From: "Colin Seaman" <[hidden email]> To: <[hidden email]> Sent: Wednesday, January 24, 2007 7:06 AM Subject: [ops-users] validate = false > Hi, > > I'm trying to dynamically set the validate="false" attribute on my > XForms submission, but it seems I'm unable to do so. > > I have the code: > > <xforms:submission id="submit_model_Document" > ref="instance('instance_model_Document')" > action="{xxforms:instance('url')/serverpath}/read-xform.php?action={xxforms:instance('url')/submit/submitaction}" > method="post" validate="{xxforms:instance('url')/validate}" /> > > with the value of instance('url')/validate equalling "false", but it > appears that this doesn't work. > > Does the fact that this value is set automatically mean that the value > of "validate" equals true...?? > > How can I achieve this? > > -- > Colin Seaman > Senior Developer > > Tradocs Ltd, > Tower Point, > 44 North Road, > Brighton, > BN1 1YR > > email: [hidden email] > skype: colin,seaman > telephone: 0870-1417031 > website: http://www.tradocs.net > > This email and any files transmitted with it are confidential > and intended solely for the use of the individual or entity to > whom they are addressed. If you have received this email in > error please contact Tradocs. Please note that any views or > opinions presented in this email are solely those of the author > and do not necessarily represent those of the company. Finally, > the recipient should check this email and any attachments for > the presence of viruses. The company accepts no liability for > any damage caused by any virus transmitted by this email. > This content of this email is without prejudice. > > > -------------------------------------------------------------------------------- -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Colin Seaman
Colin,
@validate does not support AVTs at the moment, in other words it must be static, i.e. validate="false" or validate="true". I added an RFE to enhance this: http://forge.objectweb.org/tracker/index.php?func=detail&aid=306595&group_id=168&atid=350207 -Erik Colin Seaman wrote: > Hi, > > I'm trying to dynamically set the validate="false" attribute on my > XForms submission, but it seems I'm unable to do so. > > I have the code: > > <xforms:submission id="submit_model_Document" > ref="instance('instance_model_Document')" > action="{xxforms:instance('url')/serverpath}/read-xform.php?action={xxforms:instance('url')/submit/submitaction}" > method="post" validate="{xxforms:instance('url')/validate}" /> > > with the value of instance('url')/validate equalling "false", but it > appears that this doesn't work. > > Does the fact that this value is set automatically mean that the value > of "validate" equals true...?? > > How can I achieve this? Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Thanks guys.
I've gone with Ryan's solution at the moment but look forward to AVT support! :-) For other people's benefit, here's my working code: <xforms:trigger> <xforms:label ref="instance('url')/submit/submittext"></xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:send submission="submit_model_Document_false" if="xxforms:instance('url')/validate = 'false'"/> <xforms:send submission="submit_model_Document_true" if="xxforms:instance('url')/validate = 'true'"/> </xforms:action> </xforms:trigger> Colin Seaman Senior Developer Tradocs Ltd, Tower Point, 44 North Road, Brighton, BN1 1YR email: [hidden email] skype: colin,seaman telephone: 0870-1417031 website: http://www.tradocs.net This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please contact Tradocs. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. This content of this email is without prejudice. Erik Bruchez wrote: Colin, -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |