struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xianwinwin <>
Subject ajax validation - how to tell the user where is the problem?
Date Mon, 24 Mar 2008 22:15:46 GMT


I'm using the ajax theme and I wonder if anyone can assist in the validation
When the user clicks 'Update' and everything goes well, a message- "Update
successfully" is shown next to the update button.

when the user enter an invalid data - the validation interceptor kicks in
and a message- "ou have an error in the date entry!" is placed next to the
update button.

My question is this: how can I inform the user where is the problem? 
say my form has:

1. name
2. dob

and the problem is in the dob format - how can I tell where the user was
wrong and advise him/her accordingly?

Thank you!!

<result name="input">/pages/registration/error.jsp</result>
<result name="confirm-ajax">/pages/registration/confirm.jsp</result>	

<%@ taglib prefix="s" uri="/struts-tags" %>

    request.setAttribute("decorator", "none");
    response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
    response.setHeader("Pragma","no-cache"); //HTTP 1.0
    response.setDateHeader ("Expires", 0); //prevents caching at the proxy

you have an error in the date entry!

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message