• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LookupDispatchAction & Validation

 
vijay saraf
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
is there any standard way like validate method or validate.xml for LookupDispatchAction(other than validate itself in action methods)? i am bit confused because a LookupDispatchAction have more than one methods(like add,edit,delete) and each method required different parameters so it is obvious that on each action i have to look for different parameters.
If any one have any idea please reply me.

Thanks,
Vijay Saraf.
 
vijay saraf
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i don't think there is any standard way to validate only selected fields (that will be decided according to action tanken by form).no J Ranchi replied yet.
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I looked into DispatchAction a few years ago, I had similar questions. I just did a quick Google search on "validation DispatchAction" (you already tried this, right) and I came up with this page:

http://raibledesigns.com/wiki/Wiki.jsp?page=SecuringDispatchAction

His very first sample seems like a viable solution (using multiple action mapping definitions). I would not be real concerned about the "problem" that Matt describes, especially if you also perform validation in your business tier.

Here is another option:
http://www.mail-archive.com/user@struts.apache.org/msg52602.html

- Brent
 
vijay saraf
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Brent,
the 2nd one is the last solution,the first one seems logical and standard.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic