You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jijoe Vurghese <ji...@yahoo.com> on 2005/05/15 09:20:47 UTC
Decoding HTML in Tapestry
I tried searching this forum, but didn't find anyone running into a similar
situation. Here is what I have so far...
String data in a POJO object member - ">How do you do?"
This data is displayed on a Tapestry page in a text field.
Tapestry converts the string to ">How do you do?"
So far, so good...Tapestry has automagically done escaping of HTML
When the user submits the form on this Tapestry page, I would expect Tapestry to
call the POJO's set method with the value ">How do you do?". In other words,
_after_ unescaping the HTML back to original form.
However, I see Tapestry setting the value ">How do you do?"
Question 1 - is there is a Tapestry method that can "unescape" the incoming HTML?
Question 2 - is there an automagic way to have Tapestry just do this unescape on
incoming requests?
Caveat - I am using a custom OGNL property accessor for get/set on this POJO
because the get/set methods can't follow the JavaBean conventions:
setAttribute(String key, String value)
getAttribute(String key)
Right now, I have a hack in setProperty() method of my custom property accessor
to do the unescape. But this seems like a hack to me, because the reverse
(escaping while rendering page) is automatic.
TIA,
Jijoe
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Decoding HTML in Tapestry
Posted by Jijoe Vurghese <ji...@yahoo.com>.
Paul Ferraro <pmf8 <at> columbia.edu> writes:
>
> Actually, OGNL /does/ support object indexed properties. Read more
> about it here:
> http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/indexing.html#N101C5
>
Holy Smokes!! That ought to teach me to RTFM :-)
Thanks for that tip, Paul
Jijoe
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Decoding HTML in Tapestry
Posted by Paul Ferraro <pm...@columbia.edu>.
Actually, OGNL /does/ support object indexed properties. Read more
about it here:
http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/indexing.html#N101C5
Paul
Jijoe Vurghese wrote:
>I tried searching this forum, but didn't find anyone running into a similar
>situation. Here is what I have so far...
>
>String data in a POJO object member - ">How do you do?"
>
>This data is displayed on a Tapestry page in a text field.
>
>Tapestry converts the string to ">How do you do?"
>
>So far, so good...Tapestry has automagically done escaping of HTML
>
>When the user submits the form on this Tapestry page, I would expect Tapestry to
>call the POJO's set method with the value ">How do you do?". In other words,
>_after_ unescaping the HTML back to original form.
>
>However, I see Tapestry setting the value ">How do you do?"
>
>Question 1 - is there is a Tapestry method that can "unescape" the incoming HTML?
>
>Question 2 - is there an automagic way to have Tapestry just do this unescape on
>incoming requests?
>
>Caveat - I am using a custom OGNL property accessor for get/set on this POJO
>because the get/set methods can't follow the JavaBean conventions:
>
>setAttribute(String key, String value)
>getAttribute(String key)
>
>Right now, I have a hack in setProperty() method of my custom property accessor
>to do the unescape. But this seems like a hack to me, because the reverse
>(escaping while rendering page) is automatic.
>
>TIA,
>
>Jijoe
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org