my dog learned polymorphism*
The moose likes Struts and the fly likes How to validate referenced bean property Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to validate referenced bean property" Watch "How to validate referenced bean property" New topic
Author

How to validate referenced bean property

Hermann Maurer
Greenhorn

Joined: Oct 19, 2009
Posts: 4
Hello,

referring to Struts 2. Tricky question.

Basically I know how to validate with annotations properties in the action class.
However I don't know how to validate properties of a bean which is referenced in the action class.

Hoping someone can let me know ...

Form.jsp and MyBean class are informational only, the question is how to put Validation into the ActionClass below for a referenced bean.


Form.jsp:


MyBean class:



ActionClass:





Many thanks,
Hermann
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please UseCodeTags when posting code or configuration. Unformatted code and configuration is very difficult to read. You can edit your post to include them by using the button.
 
 
subject: How to validate referenced bean property
 
Similar Threads
struts2---Update problem:can not get Value from jsp,it shows:nullpointException(in the action)
Setting the value in <s:textfield from request scope
Getting the name of the requesting page
Pass bean from one action to another in strust2
Iterator and multibox