[
https://jira.jboss.org/jira/browse/GTNPC-15?page=com.atlassian.jira.plugi...
]
Thomas Heute commented on GTNPC-15:
-----------------------------------
It's already the case AFAIK:
https://svn.jboss.org/repos/gatein/components/pc/tags/2.1.0-CR01/portlet/...
tmp.append('G');
It always starts with a 'G'
Also, please do not change the 'priority' and the time estimate (If you fix an
issue and test and run the testsuite and commit in 10 min you would get an award ;)
<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
Priority: Critical
Original Estimate: 10 minutes
Remaining Estimate: 10 minutes
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