hi ted..thanks.. i tried to retrieved selectedModules as an array of String.. but it was not able to get the values.. here is my code..
String[] selectedModules =getSelectedModules(); System.out.println("selected " + selectedModules[0]); It printed the value of selected is null..when i selected values from the list. i'm really new with S2, hope you could help me with this..thanks in advance. Ted Husted wrote: > > 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-S2--Form-Select-tp14659864p14680961.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]