This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Map backed form and validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Map backed form and validation" Watch "Map backed form and validation" New topic
Author

Map backed form and validation

Marika Engstrom
Greenhorn

Joined: May 19, 2006
Posts: 1
My problem is following:

User can select a multiple number of roles that are valid for some customer (role ids are stored in String[] selectedRoles). For each of the selected role the user can enter the expiry date. This I have solved by having a HashMap expiryDates where key is the roleId and the value is the expiry date.

I have fixed the jsp, but now I'm trying to fix the validation by using struts validation. What I need to do is to use the selectedRoles as keys for retrieving the expiryDates. I have tried following (and many other combinations) with no luck:



Has anyone solved this or similar problem?

/M
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Map backed form and validation
 
Similar Threads
Validate multiple fields base on a requiredif
Having problem with struts validator for error message
validation in tomcat 4.1
Struts validation not happening
problem using validwhen and radio button