You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Hugo Palma <hu...@gmail.com> on 2009/04/09 01:07:41 UTC
Encoding an event context parameter in javascript
Sometimes i need construct an event url in javascript. In order to be able
pass context parameter to the event that include strings with spaces for
example i need to encode the parameter values.
I've tried url encoding but if i do i get an exception when tapestry tries
to build the EventContext. Something like:
java.lang.IllegalArgumentException: Input string 'a b' is not valid; the
character ' ' at position 2 is not valid.
at
org.apache.tapestry5.internal.services.URLEncoderImpl.decode(URLEncoderImpl.java:143)
at $URLEncoder_12087e2f017.decode($URLEncoder_12087e2f017.java)
at
org.apache.tapestry5.internal.services.ContextPathEncoderImpl.decodePath(ContextPathEncoderImpl.java:86)
when the passed value is 'a b' url encoded. I can see that there's an
ContextPathEncoder service but that's obviously not available on javascript.
I'm using 5.1.0.2.
Any idea how i can do this ?
Thanks.
Re: Encoding an event context parameter in javascript
Posted by Hugo Palma <hu...@gmail.com>.
:o)
fair enough, i'll give it a try...
On Thu, Apr 9, 2009 at 1:15 AM, Thiago H. de Paula Figueiredo <
thiagohp@gmail.com> wrote:
> Em Wed, 08 Apr 2009 20:07:41 -0300, Hugo Palma <hu...@gmail.com>
> escreveu:
>
> Any idea how i can do this ?
>>
>
> You can write a Javascript counterpart of ContextPathEncoder and contribute
> it to Tapestry or file a JIRA about it. :D
> Talking seriously, I can't think of another solution now.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Encoding an event context parameter in javascript
Posted by Hugo Palma <hu...@gmail.com>.
Done, i've created an issue with my implementation.
For future reference: https://issues.apache.org/jira/browse/TAP5-637
On Thu, Apr 9, 2009 at 1:15 AM, Thiago H. de Paula Figueiredo <
thiagohp@gmail.com> wrote:
> Em Wed, 08 Apr 2009 20:07:41 -0300, Hugo Palma <hu...@gmail.com>
> escreveu:
>
> Any idea how i can do this ?
>>
>
> You can write a Javascript counterpart of ContextPathEncoder and contribute
> it to Tapestry or file a JIRA about it. :D
> Talking seriously, I can't think of another solution now.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Encoding an event context parameter in javascript
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Wed, 08 Apr 2009 20:07:41 -0300, Hugo Palma <hu...@gmail.com>
escreveu:
> Any idea how i can do this ?
You can write a Javascript counterpart of ContextPathEncoder and
contribute it to Tapestry or file a JIRA about it. :D
Talking seriously, I can't think of another solution now.
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org