aspose file tools*
The moose likes Struts and the fly likes Struts2 - Dynamic values in expression while doing validations using annotations? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 - Dynamic values in expression while doing validations using annotations?" Watch "Struts2 - Dynamic values in expression while doing validations using annotations?" New topic
Author

Struts2 - Dynamic values in expression while doing validations using annotations?

Krishan Babbar
Greenhorn

Joined: Aug 30, 2010
Posts: 6
Hi,

I am using Struts2. I am doing validations using annotations in action class.
I have many forms having same type of fields say zip code.

I am adding validations like below in each action class having zip code field



Now, in case if I need to change the expression for zip code validations, then I need to modify the same in each action class.
I would like to know if there is any way to use java variable or property for expression so that i only need to change at one place (value of variable) and all actions get modified.


I want something like below



Thanks
Krishan Babbar
Krishan Babbar
Greenhorn

Joined: Aug 30, 2010
Posts: 6
http://forums.oracle.com/forums/message.jspa?messageID=7430244#7430244
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2 - Dynamic values in expression while doing validations using annotations?