You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Roman Uhlig Maxity.de" <ro...@maxity.de> on 2009/08/18 12:38:32 UTC
Does ExternalLink URL encode?
Just a simple question, I couldn't find any hint on this in the mailing
list and the wiki.
Is ExternalLink doing some URL encoding with the href param or will I
have to do it on my own? Something like:
new ExternalLink(
"id",
"http://www.mysite.com/page.jsp?title=" +
URLEncoder.encode("This is a title", "UTF-8")
);
Thanks,
Roman
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Does ExternalLink URL encode?
Posted by Jonas <ba...@gmail.com>.
"Use the Source, Luke!"
have a look at ExternalLink#onComponentTag
On Tue, Aug 18, 2009 at 12:38 PM, Roman Uhlig
Maxity.de<ro...@maxity.de> wrote:
>
> Just a simple question, I couldn't find any hint on this in the mailing
> list and the wiki.
>
> Is ExternalLink doing some URL encoding with the href param or will I
> have to do it on my own? Something like:
>
> new ExternalLink(
> "id",
> "http://www.mysite.com/page.jsp?title=" +
> URLEncoder.encode("This is a title", "UTF-8")
> );
>
> Thanks,
> Roman
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Does ExternalLink URL encode?
Posted by Steamus <st...@gmail.com>.
Roman Uhlig Maxity.de wrote:
>
>
> Just a simple question, I couldn't find any hint on this in the mailing
> list and the wiki.
>
> Is ExternalLink doing some URL encoding with the href param or will I
> have to do it on my own? Something like:
>
> new ExternalLink(
> "id",
> "http://www.mysite.com/page.jsp?title=" +
> URLEncoder.encode("This is a title", "UTF-8")
> );
>
It was the same question a couple of months ago. For some reason there was
no this problem with Wicket 1.3.5. But after migration to 1.4 I have to
encode URL parameters manually:
parameters.put( "toFind", URLEncoder.encode( searchLine, "UTF-8" ) );
......................
String lineToSearch = parameters.getString( "toFind" );
try {
lineToSearch = URLDecoder.decode( lineToSearch, "UTF-8" );
}
catch( UnsupportedEncodingException e ) {
e.printStackTrace();
}
May be I lost something, but I couldn't pass national text without manual
decode/encode as it was with 1.3.5
--
View this message in context: http://www.nabble.com/Does-ExternalLink-URL-encode--tp25022300p25024143.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