Hi,
Ive 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à_2f...[too long]"
name="jbpns_2fores_2fUtilità_2f...[too long]"
method="post"
action="[omitted]"
enctype="application/x-www-form-urlencoded">
Unfortunately, my portlets 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 à into the rendered
page, but this is illegal too.
Ive 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 Ill solve the problem by manipulating the portlets namespace in
the encodeNamespace method.
I just want to make you aware of this issue.
Thank you for your great job with MyFaces.
Luca