Can you share us the solution which you have found for reading the multiple values for a select tag.
I also need it. On Thu, Dec 11, 2008 at 6:10 AM, Richa Pandharikar < [email protected]> wrote: > I also found out the solution for reading the multiple values for a select > tag. > > -----Original Message----- > From: Richa Pandharikar [mailto:[email protected]] > Sent: Wednesday, December 10, 2008 3:43 PM > To: 'Struts Users Mailing List'; [email protected] > Subject: RE: Help with S:Select > > I have resolved the issue with validating a drop down box created with - > > <s:select name = "user.department" key = "user.department" > headerKey="-1" headerValue="-- Please Select --" > list="allDepartments" required="true" > requiredposition="left" /> > > <field name="user.department"> > <field-validator type="fieldexpression"> > <param > name="expression">!(user.department).equals("-1")</param> > <message>Please select a department.</message> > </field-validator> > > > Alternatively, a plain validator can also be used - > <validator type="expression"> > <param name="expression">!(user.department).equals("-1")</param> > <message>Department is required.</message> > </validator> > > -----Original Message----- > From: Richa Pandharikar [mailto:[email protected]] > Sent: Wednesday, December 10, 2008 12:40 PM > To: 'Struts Users Mailing List' > Subject: RE: Help with S:Select > > I tried to follow the information on one of the post on how to do this but > till it is not very clear to me. > > Can anyone point me to the documentation where the usage are explained in > detail? > > I am also facing the problem in validating the s:select field as a required > field. > > I tried using this but it has not effect - > > <validator type="expression"> > <param name="expression">(user.department)== "-1"</param> > <message>Department is required.</message> > </validator> > > Your help is much appreciated. > > Thnaks, > Richa > > -----Original Message----- > From: Richu [mailto:[email protected]] > Sent: Wednesday, December 10, 2008 11:26 AM > To: [email protected] > Subject: Help with S:Select > > > I have a select tag defined as - > <s:select name = "user.projects" > key = "user.projects" multiple="true" size="10" cssStyle="width : > 250 > list="allProjects" > listKey="id" > listValue="name" /> > > Does anyone has a working example of how to read the multiple values of an > object type (here Project) selected from the select box in the action > method? > > Also, do I need to use a converter as the collection being passed to > populate the list items contains the object of type "Project"? > > Please help..! > > Thanks, > Richa > -- > View this message in context: > http://www.nabble.com/Help-with-S%3ASelect-tp20939927p20939927.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Best Regards, Faraz Ali

