wood burning stoves 2.0*
The moose likes Struts and the fly likes Automatic validation is not working with dispatch action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Automatic validation is not working with dispatch action" Watch "Automatic validation is not working with dispatch action" New topic
Author

Automatic validation is not working with dispatch action

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hi.
I have have a dispatch action with two methods: view (to view the cart) , add (to add a book to cart).
This dispatch action have an action form associated with it, this form uses automatic validation (not javascript).
The previous form is used by add method.
Here is a snippet:

Upon sucess, bookDetails.jsp displays a message, upon fail , another message.
The problem is when /action/cart.do?operation=view is called , bookDetails.jsp displayed again.
The problem solved when input attribute and the accompanying entry in validation.xml removed.
But validation should happened, how to over come this problem ?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Automatic validation is not working with dispatch action