struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Wang <>
Subject sj:select value problem
Date Tue, 06 Aug 2013 06:06:42 GMT
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? 
Thanks so much. 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message