Register / Login
Win a copy of
Penetration Testing Basics
this week in the
struts2: howto ajax-validate with annotation?
posted 8 years ago
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! %>
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?