Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Struts
After validate ajax form not redirect to success or error result
Josep M Serrainat
Greenhorn
Posts: 16
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi, I have a form with validations, server side,
<s:form id="cmxform" action="signin" namespace="/" method="post" cssClass="yform" > ...form fields <div class="type-button"> <sj:submit targets="result" button="true" validate="true" validateFunction="customeValidation" onBeforeTopics="removeErrors" onSuccessTopics="removeErrors" value="submit" indicator="indicator" /> <img id="indicator" src="images/indicator.gif" alt="Loading..." style="display:none"/> </div> </s:form>
The action sigin is
@InterceptorRef("jsonValidationWorkflowStack") @Validations( emails = { @EmailValidator(type = ValidatorType.SIMPLE, fieldName = "email", message = "Invalid e-mail address.") }, requiredStrings = { @RequiredStringValidator(fieldName = "email", type = ValidatorType.FIELD, message = "Email is required"), @RequiredStringValidator(fieldName = "firstName", type = ValidatorType.FIELD, message = "First name is required"), @RequiredStringValidator(fieldName = "lastName", type = ValidatorType.FIELD, message = "Last name is required"), @RequiredStringValidator(fieldName = "password", type = ValidatorType.FIELD, message = "Password is required"), @RequiredStringValidator(fieldName = "confirmPassword", type = ValidatorType.FIELD, message = "Confirm password is required") }, stringLengthFields = { @StringLengthFieldValidator(fieldName = "password", type = ValidatorType.SIMPLE, trim = true, minLength = "8" , message = "password must be equal or greater to eight characters") }, expressions = { @ExpressionValidator( expression = "password == confirmPassword", message = "Passwords are not equals") } ) public class SigninAction extends BaseAction { @Action(value = "signin", results = { @Result(name = "success", location = "inici.jsp"), @Result(name = "error", location = "activationFailed.jsp") }) public String execute(){ ..... sign in user in db return SUCCESSS if go fine return ERROR if something goes wrong }
My problem is, when form is accepted the action not go to success or error results, displays the filled form
Thank for help me,..
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Struts2 validation using annotaions for Model Driven
validation by annotations
Struts 2 execute method after validation error
separate validation for each method in action class
Handling error messages (Struts2 jquery )
More...