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