This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts2JQuery plugin--  displaying error messages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2JQuery plugin--  displaying error messages" Watch "Struts2JQuery plugin--  displaying error messages" New topic

Struts2JQuery plugin-- displaying error messages

James Peter
Ranch Hand

Joined: Sep 15, 2010
Posts: 115
Hi All,

My requirement is when a text field loss focus i need to send its content to an action. Action will validate its value against a schema.
If it is a valid input then sends 1 as a replay else 0.

I want to call action through jquery. In struts by default if we submit a form with invalid data then error message will be displayed in red color text above the text field.

I want to get the same effect when i validate using jquery as i said above. When i get response 0 from action to jquery function then i need to display error message at the bottom of the text field. I am using struts2jquery plugin.

Need advice on how to do this in a proper way.

Johannes Geppert
Ranch Hand

Joined: Jan 12, 2010
Posts: 67
Have you seen the validation examples in the struts2 jquery showcase?

See Ajax Forms / Validation!

How it works is explained in the Struts2 jQuery Wiki - Validation.


My Java and Webprogramming Blog
James Peter
Ranch Hand

Joined: Sep 15, 2010
Posts: 115
hi, thanks. will check.
Have you checked out Aspose?
subject: Struts2JQuery plugin-- displaying error messages
It's not a secret anymore!