Martin, this is the correct implementation in both the MyFaces Bridge and the 301 bridge. JBoss's encodeNamespace method needs to return a valid namespaced id.

Scott

Martin Marinschek wrote:
Hi Luca,

it would be great if you could open an issue - and maybe you could
solve this generally by doing some encoding of the problematic
characters - whatever this encoding might be. If you attach a patch to
the issue, it might as well be committed ;)

regards,

Martin

On 1/30/08, Luca Castelluzzo <[EMAIL PROTECTED]> wrote:
Hi,

I've had a problem with the automatically generated id attributes while
using JSF in a JBoss Portal portlet.

This JSF tag:

<h:form>

Becomes:

<form
     id="jbpns_2fores_2fUtilit&#224;_2f...[too long]"
     name="jbpns_2fores_2fUtilit&#224;_2f...[too long]"
     method="post"
     action="[omitted]"
     enctype="application/x-www-form-urlencoded">

Unfortunately, my portlet's namespace contains an accented character "à"
which is perfectly legal for the JSR 168, but is illegal for an id attribute
in html. Actually, this character is converted to &#224; into the rendered
page, but this is illegal too.

I've done a search in MyFaces code and found the reason: these id attributes
are built by calling the encodeNamespace of PortletExternalContextImpl. This
method relies upon the JBoss Portal namespace:

return name + ((RenderResponse) _portletResponse).getNamespace();

I think I'll solve the problem by manipulating the portlet's namespace in
the encodeNamespace method.

I just want to make you aware of this issue.
Thank you for your great job with MyFaces.

Luca





Reply via email to