• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Krishan Babbar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic