You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "pedro.boado" <pe...@gmail.com> on 2008/12/09 15:40:58 UTC

BUG on wicket-ajax.js on Ajax behaviour in IE7 ??

Hi, 

I have detected problems with my UTF-8 encoded application , Wicket > 1.3.2
( also 1.4rc1) 
when trying to add AjaxBehaviours to an AutoCompleteTextField (from
wicket.extensions) . 

These problems regards on Ajax Submitting of Strings with non-english chars
( 'España' , receiving 'España') . The application works fine on Firefox,
but fails on IE7 . 

When receiving getChoices event on AutoCompleteTextField everything goes
right, but when receiving onUpdate event for a
AjaxFormComponentUpdatingBehavior("onchange"), the ModelObject from the
AutoCompleteTextField is bad encoded. 

Using the search on the mailing list I found 
http://www.nabble.com/Re%3A-Weird-Ajax-non-English-characters-encoding-problem.-tt16636043.html#a16636043
Weird-Ajax-non-English-characters-encoding-problem  , that is pretty much
like my problem. But setting URIEncoding="UTF-8" seems to have no effect (
even seems to have no sense ) .

Using a HTTP Sniffer found that Firefox automatically completes request
header 'Content-Type' from 
"application/x-www-form-urlencoded" to "application/x-www-form-urlencoded;
charset=UTF-8" . IE7 doesn't do this, so no charset is set, and 
ISO-8859-1 is used. When the request enters Tomcat, it is read as an UTF-8
String . 

Also checked that patching wicket-ajax.js forcing doPost function from 				
t.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 
to
t.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;
charset=UTF-8");

makes application works fine. 


What am I doing wrong?


Pedro Boado. 

-- 
View this message in context: http://www.nabble.com/BUG-on-wicket-ajax.js-on-Ajax-behaviour-in-IE7----tp20915921p20915921.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org