Hi Lukasz, 

Thanks a lot for your reply. I use Struts 2 Jquery Plugin. Here is formatted 
code. 

 html:
<select name="echo" multiple="multiple" id="pattern0" 
class="multiselect">
        <option value="-1">Select 
keywords</option>     <option></option>
        <option value="1 Cool">1 Cool</option>
        <option value="1 
Heat">1 Heat</option>  
       <option value="3 Heat">3 
Heat</option>
       <option value="1 Heat/1 Cool">1 Heat/1 
Cool</option>
</select>

jsp:  
<sj:select     
  href="%{remoteurl_pattern02}"
                  id="selectWithReloadTopic_pattern02" 
                  formIds="formSelectReload" 
                  reloadTopics="reloadsecondlist_pattern02"       

                 name="echo_pattern02"
                   list="reloadList_pattern02"
                 multiple="true"       
                  selectable="true"
                 cssClass="multiselect"
                 dataType="json" 
                  emptyOption="true"        
                 headerKey="-1" 
                 headerValue="Select keywords" 
                resizableMinHeight="15"
               resizableMaxHeight="20" 
                value="%{patternKeyword2}"   />

 I pass in an array to "value". The array has [1 Cool, 1 Heat, 1 Heat/1 
Cool].  The array's name is "patternKeyword2".  When I ran the code, I 
found that these three items  [1 Cool, 1 Heat, 1 Heat/1 Cool] were not 
selected in the dropdown menu.

Any ideas?

Thanks so much. 

> From: lukaszlen...@apache.org
> Date: Tue, 6 Aug 2013 08:29:21 +0200
> Subject: Re: sj:select value problem
> To: user@struts.apache.org
> 
> 2013/8/6 David Wang <dwang...@hotmail.com>:
> > Hello,
> > As a beginner in struts field, I send this question to see if I get any 
> > help. Here it is. I have a multiple dropdown menu. What I want to do is to 
> > pre-select related items based the value passed in. Specifically, I have
> > html:<select name="echo" multiple="multiple" id="pattern0" 
> > class="multiselect"> <option value="-1">Select keywords</option>     
> > <option></option>       <option value="1 Cool">1 Cool</option>  <option 
> > value="1 Heat">1 Heat</option>  <option value="3 Heat">3 Heat</option>  
> > <option value="1 Heat/1 Cool">1 Heat/1 Cool</option></select>
> > jsp:  <sj:select       href="%{remoteurl_pattern02}"       
> > id="selectWithReloadTopic_pattern02"       formIds="formSelectReload"       
> > reloadTopics="reloadsecondlist_pattern02"       name="echo_pattern02"       
> > list="reloadList_pattern02"       multiple="true"       selectable="true"   
> >     cssClass="multiselect"       dataType="json"        emptyOption="true"  
> >       headerKey="-1"        headerValue="Select keywords"        
> > resizableMinHeight="15"        resizableMaxHeight="20"        
> > value="%{patternKeyword2}"   />
> > and I pass in an array to "value". The array has [1 Cool, 1 Heat, 1 Heat/1 
> > Cool].  The array's name is "patternKeyword2".  When I ran the code, I 
> > found that these three items  [1 Cool, 1 Heat, 1 Heat/1 Cool] were not 
> > selected in the dropdown menu.
> > Anybody knows how to fix this?
> 
> Do you the Struts 2 jQuery plugin? And some better formatting please :-)
> 
> 
> Regards
> -- 
> Ɓukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
                                          

Reply via email to