struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <hus...@apache.org>
Subject Re: [S2] Form Select
Date Tue, 08 Jan 2008 01:03:58 GMT
Hmmm, did you try selectedModules as an array of String?

HTH, Ted
 * <http://www.StrutsMentor.com/>


On Jan 7, 2008 1:58 AM, carmi_cd <carmi_dom@yahoo.com> wrote:
>
> i have a form select.. my problem is i dont know how can i get the selected
> values in the form select box.
>
> here is my code..
>
>    <s:select name="selectedModules" value="%{edituser.modules.{moduleId}}"
>           list="modules" listKey="moduleId" listValue="moduleName"
>             multiple="true" size="7"  />
>
> it has multiple set to true..so it should return something like a list or
> array..but if i try to
> retrieved it using this code..
>
>         List selectedModules =getSelectedModules();
>         System.out.println("selected " + selectedModules.size());
>
> i get a null pointer exception error.. how should i do it?
>
> thanks in advance..

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message