You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by xianwinwin <xi...@gmail.com> on 2008/03/26 17:47:27 UTC
how to show error fields ONLY in validation?
Hi guys,
when a user clicks Submit in my form, a message is returned to an ID with
the following errors:
you have an error in your date entry!
Invalid field value for field "age". 336r
IL
3/15/07
the JSP page looks like this:
<%@ 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
server
%>
you have an error!<BR>
<s:label name="age" /><BR>
<s:label name="state" /><BR>
<s:label name="registrationDate" /><BR>
My question is this:
how can output only the fields that has error in it ???
in the example above the only error is in the age field; the state and
registrationDate are OK
thanks
--
View this message in context: http://www.nabble.com/how-to-show-error-fields-ONLY-in-validation--tp16305524p16305524.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org