We are developing a set of portlets for Liferay. Currently we use JSPs, so we are able to use the tag for the DIV and element IDs so that they are unique on the page, even if multiple instances of the same portlet appear on the page; for example:
<div id='<portlet:namespace/>div'>
<form>
Enter your name here: <input type='text' id='<portlet:namespace/>name'/>
</form>
</div>
Now we'd like to try building the portlets with GWT instead of JSP. Any examples I find of GWT portlets (of which there are only a couple) don't solve the "how do I assign unique IDs to the div and elements" problem, since GWT seems to be pre-compiled into Javascript before the IDs are ever generated. Any idea on how to incorporate the portlet's namespace into the div/element IDs?