Thank you Alex. It made my day.

Thanks and Regards,
Rahul Agarwal

----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.
----------------------------------------------------------------------------------------



Alessandro Vernet <avernet
@orbeon.com>

Sent by: orbeon-user-admin

12/14/2004 06:11 AM
Please respond to orbeon-user

       
        To:        [EMAIL PROTECTED]
        cc:        
        Subject:        Re: [orbeon-user] How to know which bind _expression_ made element invalid?



Rahul Agarwal wrote:
> I know that when an element is validated (because there is a type,
> constraint, or required attribute on a bind _expression_ pointing to that
> element in the XForms model), the XForms engine adds an
> xxforms:valid="true|false" attribute to the element. I can access this
> attribute anywhere I have access to the XForms instance.
> My question is - Is there any way to know which particular
> validation/bind _expression_ (constraint, required or anything else) made
> the element invalid? My intention is to display appropriate
> <xforms:alert> message which makes user understand exactly what went
> wrong. User is not convinced to see all <xforms:alert> messages
> associated with an element while only one of the many possible
> constraints is failed.

Rahul,

Make sure you have an "id" attribute on your "bind" elements, for instance:

<xforms:bind id="a" nodeset="/instance" constraint="false()"/>

Then when validation fails, an "xxforms:invalid-bind-ids" attribute is
added in addition to the "xxforms:valid" attribute. The value of this
element is the id of the "bind" that failed. For instance:

<instance xxforms:invalid-bind-ids="a" xxforms:valid="false"/>

Alex


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]

https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to