|
| I can't get a namespace set on a Struts HTML:Text control using the styleId attribute. styleId sets the ID attribute of the resulting INPUT tag. Neither the <portlet:namespace/> nor <%=renderResponse.getNamespace()%> work inside the styleId attribute.
Does anybody have any idea why and how to get around this?
I've tested in on Portal 5.1.0.3 and Portal 6.0 with the same results.
Here's the details:
I use a Struts HTML:Text tag to display an input field like this:
<html:text styleId="<portlet:namespace />email" property="email"/>
However, this renders like this: <input type="text" name="email" value="" id="<portlet:namespace />email">
The namespace tag isn't getting resolved.
So, I changed the Struts tag to use the renderResponse.getNamespace() as shown below:
<html:text styleId="<%= renderResponse.getNamespace()%>email" property="email"/>
Yet this renders like this:
<input type="text" name="email" value="" id="<%= renderResponse.getNamespace()%>email">
If I create a non-struts INPUT tag, both versions of the namespace work fine:
<INPUT type="text" id="<portlet:namespace/>email" name="email"> becomes
<INPUT type="text" id="PC_7_0_58P_email" name="email">
|
|