Re: validate = false

Posted by Colin Seaman on
URL: https://discuss.orbeon.com/validate-false-tp32524p32526.html

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,

@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?


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


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