A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA/OCP Java SE 7 Programmer I & II Study Guide
this week in the
struts2: howto ajax-validate with annotation?
Joined: Sep 10, 2004
Mar 25, 2008 13:12:00
does anyone have an example of ajax-validation with annotation?
I'm trying to achieve the following: I have a form with:
Name/e-mail are mandatory fields. Right now, if the user clicks Update and everything goes well - a Success Message is shown in the target ID.
If the user doesn't provide the Name - An error message is shown: "Update Fail"
Problem is that in my output, in case of a failure, there is no indication of the required field (what is the problem).
So my question is this: how can I tell which of the fields is missing?
* I'm using annotation in my form
configuration: <result name="input">/pages/registration/error.jsp</result> <result name="confirm-ajax">/pages/registration/confirm.jsp</result> error.jsp <%@ 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 Update Fail! %>
It is sorta covered in the
JavaRanch Style Guide
subject: struts2: howto ajax-validate with annotation?
Caching is not working
not able to catch exceptions from jsp page
"Edit in Place" Using Simple JS
S2: caching problem,-user clicks on a link and then back w/ broweser data is lost
struts2 with ajax: howto return a value to div?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014