We are developing a portlet using the Spring Portlet MVC.
Within our JSPs, we are trying to use the <portlet:namespace> tag to ensure that IDs are unique to a specific instance of the portlet. However, if we try to use the <portlet:namespace> tag within a Spring Form tag, the <portlet:namespace> tag is not recognised and is treated as text. The <portlet:namespace> tag works fine with 'ordinary' html tags
e.g. for an ordinary html input field, the following JSP code will generate an input element with the id prefixed with the portlet namespace (such as "specificnamespacefield1")
<input id="<portlet:namespace/>field1">
For a Spring form input field, the following JSP code does not recognise that the portlet namespace and will generate an input element with an id of "<portlet:namespace/>field1"
<form:input id="<portlet:namespace/>field1">
Does anyone know how to prefix a Spring form tag id with a portlet namespace?


Reply With Quote
