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 <
richa.pandhari...@tdktech.com> wrote:

> I also found out the solution for reading the multiple values for a select
> tag.
>
> -----Original Message-----
> From: Richa Pandharikar [mailto:richa.pandhari...@tdktech.com]
>  Sent: Wednesday, December 10, 2008 3:43 PM
> To: 'Struts Users Mailing List'; richa.pandhari...@tdktech.com
> 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:richa.pandhari...@tdktech.com]
> 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:rich...@gmail.com]
> Sent: Wednesday, December 10, 2008 11:26 AM
> To: user@struts.apache.org
> 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: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
Best Regards,
Faraz Ali

Reply via email to