struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alireza Fattahi (JIRA)" <>
Subject [jira] [Created] (WW-4525) s:select with an inside iterator through option group
Date Mon, 13 Jul 2015 15:19:04 GMT
Alireza Fattahi created WW-4525:

             Summary: s:select with an inside iterator through option group
                 Key: WW-4525
             Project: Struts 2
          Issue Type: Bug
            Reporter: Alireza Fattahi

Please look at below code:

<s:select id="toAccount" name="destinationKnownAccount"
                    list="destinationKnownAccounts" listKey="accountNo"
                    listValue="%{ farsiFirstName + \" \" + farsiLastName }" >
                      <s:iterator value="destinationKnownAccounts">  
                        <optgroup label="${farsiFirstName}">  
                                 <option value="${accountNo}"> ${accountNo}</option>
The optiongroup will be displayed outside select as

<optgroup label="محمد"> <option value="012222946005"> 012222946005</option>
<optgroup label="حامد"> <option value="0333783051000"> 0333783051000</option>
<optgroup label="سارا"> <option value="0100005087000"> 0100005087000</option>
 <select name="destinationKnownAccount" id="toAccount" >
    <option value=""  >   </option>
    <option value="012222946005">012222946005 محمد رادان</option>
    <option value="0333783051000">0333783051000 حامد پیروزفر</option>
    <option value="0100005087000">0100005087000 سارا حاتمی</option>

I tried other ways, even copy a static option group but same result, only s:optgroup workes
fine and generates the option group inside option

This message was sent by Atlassian JIRA

View raw message