[ 
https://issues.apache.org/struts/browse/WW-2222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44046#action_44046
 ] 

Gavin Harrison commented on WW-2222:
------------------------------------

I'm having a very similar issue, but no matter what options I try, I just cant 
work out how to get the right value from the autocompleter. (This works fine if 
I use <s:select> with same options):


<s:autocompleter label="Event" name="eventDate.event.sid" 
value="%{eventDate.event.descName}" list="%{#eventAction.eventList}" 
listValue="descName" listKey="id"/>

Gives me this:

<select dojoType="struts:ComboBox" 
id="crud/EventDate/update_eventDate_event_sid" name="eventDate.event.sid" 
keyName="id">
    <option value="0">Size Doesn't Matter Saturday May 31 - 2008</option>
    <option value="1">test Monday June 2 - 2008</option>
    <option value="2">Tacomichi Tuesday June 3 - 2008</option>
    <option value="3">sdfvsdfgsdv  Tuesday June 3 - 2008</option>
</select>


But when I submit, eventDate.event.sid gets populated with the string value 
"Size Doesn't Matter Saturday May 31 - 2008" instead of the value "0" as I 
would expect.

I've spent many hours reading documentation and trying different examples, but 
I'm clueless as what to try next?

Is this a bug?

> The autocompleter bugs in struts2.0
> -----------------------------------
>
>                 Key: WW-2222
>                 URL: https://issues.apache.org/struts/browse/WW-2222
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Tags
>    Affects Versions: 2.0.8
>         Environment: tomcat 5.5.23, JDK 1.5, IE 6.0
>            Reporter: Stone.Hong
>            Assignee: Stone.Hong
>             Fix For: 2.1.1
>
>
> When I use autocompleter tags as following in struts page.
> <s:autocompleter cssStyle="width:220px" name="condition.receiverID" 
> theme="xhtml" autoComplete="false" searchType="substring"  
> list="receiverAccountMap" forceValidOption="true"></s:autocompleter>
> and put the ["account_001", "KFC Physical Account"],  ["account_002", "Coke 
> Physical Account"] ,["account_003", "JLF Physical Account"] to 
> receiverAccountMap in action.
> then when I access the web page and view the autocompleter tag's source HTML, 
> <select dojoType="struts:ComboBox" style="width:220px" 
> forceValidOption="true" searchType="SUBSTRING" autoComplete="false" 
> name="condition.receiverID" keyName="condition.receiverIDKey" >
>     <option value="account_001">KFC Physical Account</option>
>     <option value="account_002">Coke Physical Account</option>
>     <option value="account_003">JLF Physical Account</option>
> </select>
> it is ok in html page, but when I submit the form to web server, the field 
> [condition.receiverID] value in action is "KFC Physical Account", not "the 
> account_001". 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to