What you want to acheive is not impossible.

In your action form you just need to handle this in your validate method.
It's pretty simple :

if(!password.equals(username))  {
   //Add whatever action error here,
   //and it will be returned to the input page.
}



There's no need for you to write special taglibs to do this, as there is already a <html:error> tag that does this.



James JKE95 Kerridge wrote:

Basically I want to be able to raise a single ActionError for 2 properties.

e.g.

a password field and a confirm password field exist

if they don't match then I want to display one message saying "Password and confirmation password don't match"

I also want to highlight both fields.

To highlight both fields I would ideally raise a single error for each property.

Sadly the model doesn't seem to support multiple properties for a single error.

It seems that my choices will be to create a dodgy convention when raising messages and have a special tag lib for displaying them.

Has anyone found a nice way of doing this. It must a problem everyone has faced because surely most web apps have cross field validation and want to have a single error message that relates to the fields involved in the cross validation. e.g. field B cannot be foo when field A is bar.

Cheers

James

*******************Confidentiality and Privilege Notice*******************

This email is intended only to be read or used by the addressee. It is confidential and may contain legally privileged information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone, and you should destroy this message and kindly notify the sender by reply email. Confidentiality and legal privilege are not waived or lost by
reason of mistaken delivery to you.


Qantas Airways Limited
ABN 16 009 661 901

Visit Qantas online at http://www.qantas.com.au






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to