dev@javaserverfaces.java.net

Re: Problems with & handling between RI and Facelets

From: Michael Youngstrom <youngm_at_gmail.com>
Date: Fri, 28 Jul 2006 13:29:46 -0600

> Not that I'm aware of. The Renderkit docs are clear that '&' is
> not to be encoded
>
> <quote>
> Renders an HTML "img" element. Render the clientId as the value of the
> "id" attribute. Render the value of the component as the value of the
> "src" attribute, after passing it to the getResourceURL() method of the
> ViewHandler for this application, and passing the result through the
> encodeResourceURL() method of the ExternalContext. When handling the
> "src" attribute, the value must not be escaped. For example, & must not
> be turned into &amp;. If the "styleClass" attribute is specified, render
> its value as the value of the "class" attribute.
> </quote>

My original question is with the encoding of the & for an outputLink.
I looked at the outputLink renderDocs and no comments on & are made so
perhaps outputLink could always render an &amp;? Though it would be
interesting to know the history of that comment on the graphicImage
renderKit docs

On the graphicImage side of things I'm a little concerned that if
implemented so an & is always returned then the graphicImage component
will never produce valid xml when 2 parameters are used. Perhaps the
renderKit docs can be interpereted in a way that if the user specified
& in the url attribute then that will never be converted to an &amp;
But if the user specifies &amp; in the src perhaps the renderer can
just pass it through?

Mike