[
https://jira.jboss.org/jira/browse/GTNPC-15?page=com.atlassian.jira.plugi...
]
Chen Wang commented on GTNPC-15:
--------------------------------
Thanks Thomas. I didn't know it has been fixed as my suggestion was based on the
latest version available on website which is Beta01. Glad to hear that. Re priority and
time estimate, sorry shouldn't have done that.
<portlet:namespace/> or PortletResponse.getNamespace()
shouldn't return a string startig with number
----------------------------------------------------------------------------------------------------
Key: GTNPC-15
URL:
https://jira.jboss.org/jira/browse/GTNPC-15
Project: GateIn Portlet Container
Issue Type: Bug
Affects Versions: 2.1.0-Beta02
Environment: cross-platform
Reporter: Chen Wang
Although not defined in jsr-168 or jsr286 spec, it is very desirable that
<portlet:namespace/> or the underlying PortletResponse.getNamespace() doesn't
return anything that starts with a number. Currently because of the way simple portal
constructs window id, the name space will always be a number which will prevent things
such as javascript variables from working if used as prefix, which is what most portlet
development tutorials tell you to do.
There are a few workarounds, for example always prepend a letter before
<portlet:namespace/> but it would be time-consuming to change existing portlets; Or
change the change window id is generated in simple portal, which is better but it still
exists as a pitfall.
To fix it, it could be as simple as changing one method
org.gatein.pc.portlet.impl.jsr168.PortletUtils.generateNamespaceFrom(String windowId)
in 'portlet container' module to always prepend a letter in front of existing
return value.
Again it's not something I would call a bug but it will affect many existing portlets
whose developer followed those tutorials to use <portlet:namespapce/> as prefix for
their javascript code. It's easy not to upset them so why not :)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira