You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by beren7 <da...@imapmail.org> on 2009/04/17 05:09:46 UTC

Struts 2.0 autocompleter WW-2222 issue workaround

Hello.
I'm facing the WW-2222 issue in struts 2.0.14 .
The problem is with autocompleter,  

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

The generated html is fine, but when I submit the form, the request
parameter is setted to descName and not to id.
Trying to switch listValue and listKey solve the problem, but the
description is no more shown in the combo.
I also tried to add keyName="id" (as suggested) to solve the problem, but it
doesn't work for me.

This issue is marked as fixed in 2.1, but I have to find a workaround or
patch for 2.0.14 .
Someone can help me. 
-- 
View this message in context: http://www.nabble.com/Struts-2.0-autocompleter-WW-2222-issue-workaround-tp23090291p23090291.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2.0 autocompleter WW-2222 issue workaround

Posted by beren7 <da...@imapmail.org>.
I was so stupid I was using listKey in the wrong way.
keyName *IS* the name of the hidden field than contains the id I need to
submit.
Documentation is clear, but I think I was confused by the fact that listKey
attribute works in a different way in standard combobox.


beren7 wrote:
> 
> Hello.
> I'm facing the WW-2222 issue in struts 2.0.14 .
> The problem is with autocompleter,  
> 
> <s:autocompleter label="Event" name="eventDate.event.sid"
> value="%{eventDate.event.descName}" list="%{#eventAction.eventList}"
> listValue="descName" listKey="id"/> 
> 
> The generated html is fine, but when I submit the form, the request
> parameter is setted to descName and not to id.
> Trying to switch listValue and listKey solve the problem, but the
> description is no more shown in the combo.
> I also tried to add keyName="id" (as suggested) to solve the problem, but
> it doesn't work for me.
> 
> This issue is marked as fixed in 2.1, but I have to find a workaround or
> patch for 2.0.14 .
> Someone can help me. 
> 

-- 
View this message in context: http://www.nabble.com/Struts-2.0-autocompleter-WW-2222-issue-workaround-tp23090291p23209824.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org