You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "Eric Dalquist (JIRA)" <pl...@jakarta.apache.org> on 2005/01/13 01:36:16 UTC
[jira] Created: (PLUTO-97) Custom WindowStates and PortletModes do not work with tag library
Custom WindowStates and PortletModes do not work with tag library
-----------------------------------------------------------------
Key: PLUTO-97
URL: http://issues.apache.org/jira/browse/PLUTO-97
Project: Pluto
Type: Bug
Components: portlet container
Versions: 1.0.1-rc1
Reporter: Eric Dalquist
When creating portlet URLs via the portlet tag library implementation provided with pluto the use of custom window states and portlet modes throw a NullPointerException.
The line that causes the exception is: (RenderURL:75)
url.setWindowState((WindowState)TEI.definedWindowStates.get(windowState.toUpperCase()));
TEI is a member class of the BasicURLTag class. It has a Hashtable field definedWindowStates which is used to map window state names to WindowState objects. This map is initialized by this method in TEI: (BasicURLTag:83)
private static Hashtable getDefinedWindowStates()
{
Hashtable definedWindowStates = new Hashtable();
Field[] f = WindowState.class.getDeclaredFields();
for (int i = 0; i < f.length; i++)
{
if (f[i].getType().isAssignableFrom(javax.portlet.WindowState.class))
{
try
{
definedWindowStates.put(f[i].get(f[i]).toString().toUpperCase(), f[i].get(f[i]));
}
catch (IllegalAccessException e)
{
}
}
}
return definedWindowStates;
}
The problem is this only adds WindowStates that are part of the portlet specification and doesn't allow portal defined WindowStates or PortletModes to be used as allowed by the portlet specification. Similar code is used for PortletModes.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Assigned: (PLUTO-97) Custom WindowStates and PortletModes do not work with tag library
Posted by "David DeWolf (JIRA)" <pl...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/PLUTO-97?page=history ]
David DeWolf reassigned PLUTO-97:
---------------------------------
Assign To: David DeWolf
> Custom WindowStates and PortletModes do not work with tag library
> -----------------------------------------------------------------
>
> Key: PLUTO-97
> URL: http://issues.apache.org/jira/browse/PLUTO-97
> Project: Pluto
> Type: Bug
> Components: portlet container
> Versions: 1.0.1-rc1
> Reporter: Eric Dalquist
> Assignee: David DeWolf
>
> When creating portlet URLs via the portlet tag library implementation provided with pluto the use of custom window states and portlet modes throw a NullPointerException.
> The line that causes the exception is: (RenderURL:75)
> url.setWindowState((WindowState)TEI.definedWindowStates.get(windowState.toUpperCase()));
> TEI is a member class of the BasicURLTag class. It has a Hashtable field definedWindowStates which is used to map window state names to WindowState objects. This map is initialized by this method in TEI: (BasicURLTag:83)
> private static Hashtable getDefinedWindowStates()
> {
> Hashtable definedWindowStates = new Hashtable();
> Field[] f = WindowState.class.getDeclaredFields();
> for (int i = 0; i < f.length; i++)
> {
> if (f[i].getType().isAssignableFrom(javax.portlet.WindowState.class))
> {
> try
> {
> definedWindowStates.put(f[i].get(f[i]).toString().toUpperCase(), f[i].get(f[i]));
> }
> catch (IllegalAccessException e)
> {
> }
> }
> }
> return definedWindowStates;
> }
> The problem is this only adds WindowStates that are part of the portlet specification and doesn't allow portal defined WindowStates or PortletModes to be used as allowed by the portlet specification. Similar code is used for PortletModes.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (PLUTO-97) Custom WindowStates and PortletModes do not work with tag library
Posted by "Eric Dalquist (JIRA)" <pl...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/PLUTO-97?page=comments#action_57570 ]
Eric Dalquist commented on PLUTO-97:
------------------------------------
A possible fix for this would be to use the mapping as an initial lookup and if not found just create the WindowState object. When setting it on the PortletURL object the portal will throw an exception if the WindowState isnt valid.
> Custom WindowStates and PortletModes do not work with tag library
> -----------------------------------------------------------------
>
> Key: PLUTO-97
> URL: http://issues.apache.org/jira/browse/PLUTO-97
> Project: Pluto
> Type: Bug
> Components: portlet container
> Versions: 1.0.1-rc1
> Reporter: Eric Dalquist
>
> When creating portlet URLs via the portlet tag library implementation provided with pluto the use of custom window states and portlet modes throw a NullPointerException.
> The line that causes the exception is: (RenderURL:75)
> url.setWindowState((WindowState)TEI.definedWindowStates.get(windowState.toUpperCase()));
> TEI is a member class of the BasicURLTag class. It has a Hashtable field definedWindowStates which is used to map window state names to WindowState objects. This map is initialized by this method in TEI: (BasicURLTag:83)
> private static Hashtable getDefinedWindowStates()
> {
> Hashtable definedWindowStates = new Hashtable();
> Field[] f = WindowState.class.getDeclaredFields();
> for (int i = 0; i < f.length; i++)
> {
> if (f[i].getType().isAssignableFrom(javax.portlet.WindowState.class))
> {
> try
> {
> definedWindowStates.put(f[i].get(f[i]).toString().toUpperCase(), f[i].get(f[i]));
> }
> catch (IllegalAccessException e)
> {
> }
> }
> }
> return definedWindowStates;
> }
> The problem is this only adds WindowStates that are part of the portlet specification and doesn't allow portal defined WindowStates or PortletModes to be used as allowed by the portlet specification. Similar code is used for PortletModes.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
Re: [jira] Resolved: (PLUTO-97) Custom WindowStates and PortletModes
do not work with tag library
Posted by "David H. DeWolf" <dd...@gmail.com>.
No worries. I'm just sorry it took so long :)
One step at a time. . .
David
Eric Dalquist wrote:
> Thanks for fixing this David, sorry I didn't have a chance to contribute
> a fix myself.
>
> -Eric Dalquist
>
> David DeWolf (JIRA) wrote:
>
>> [ http://issues.apache.org/jira/browse/PLUTO-97?page=history ]
>> David DeWolf resolved PLUTO-97:
>> -------------------------------
>>
>> Resolution: Fixed
>> Fix Version: 1.0.1-rc3
>>
>> Done, thanks Eric.
>>
>>
>>
>>> Custom WindowStates and PortletModes do not work with tag library
>>> -----------------------------------------------------------------
>>>
>>> Key: PLUTO-97
>>> URL: http://issues.apache.org/jira/browse/PLUTO-97
>>> Project: Pluto
>>> Type: Bug
>>> Components: portlet container
>>> Versions: 1.0.1-rc1
>>> Reporter: Eric Dalquist
>>> Assignee: David DeWolf
>>> Fix For: 1.0.1-rc3
>>>
>>
>>
>>
>>
>>> When creating portlet URLs via the portlet tag library implementation
>>> provided with pluto the use of custom window states and portlet modes
>>> throw a NullPointerException.
>>> The line that causes the exception is: (RenderURL:75)
>>> url.setWindowState((WindowState)TEI.definedWindowStates.get(windowState.toUpperCase()));
>>>
>>> TEI is a member class of the BasicURLTag class. It has a Hashtable
>>> field definedWindowStates which is used to map window state names to
>>> WindowState objects. This map is initialized by this method in TEI:
>>> (BasicURLTag:83)
>>> private static Hashtable getDefinedWindowStates()
>>> {
>>> Hashtable definedWindowStates = new Hashtable();
>>> Field[] f = WindowState.class.getDeclaredFields();
>>> for (int i = 0; i < f.length; i++)
>>> {
>>> if
>>> (f[i].getType().isAssignableFrom(javax.portlet.WindowState.class))
>>> {
>>> try
>>> {
>>>
>>> definedWindowStates.put(f[i].get(f[i]).toString().toUpperCase(),
>>> f[i].get(f[i]));
>>> }
>>> catch (IllegalAccessException e)
>>> {
>>> }
>>> }
>>> }
>>> return definedWindowStates;
>>> }
>>> The problem is this only adds WindowStates that are part of the
>>> portlet specification and doesn't allow portal defined WindowStates
>>> or PortletModes to be used as allowed by the portlet specification.
>>> Similar code is used for PortletModes.
>>>
>>
>>
>>
>>
>
Re: [jira] Resolved: (PLUTO-97) Custom WindowStates and PortletModes
do not work with tag library
Posted by Eric Dalquist <ed...@unicon.net>.
Thanks for fixing this David, sorry I didn't have a chance to contribute
a fix myself.
-Eric Dalquist
David DeWolf (JIRA) wrote:
> [ http://issues.apache.org/jira/browse/PLUTO-97?page=history ]
>
>David DeWolf resolved PLUTO-97:
>-------------------------------
>
> Resolution: Fixed
> Fix Version: 1.0.1-rc3
>
>Done, thanks Eric.
>
>
>
>>Custom WindowStates and PortletModes do not work with tag library
>>-----------------------------------------------------------------
>>
>> Key: PLUTO-97
>> URL: http://issues.apache.org/jira/browse/PLUTO-97
>> Project: Pluto
>> Type: Bug
>> Components: portlet container
>> Versions: 1.0.1-rc1
>> Reporter: Eric Dalquist
>> Assignee: David DeWolf
>> Fix For: 1.0.1-rc3
>>
>>
>
>
>
>>When creating portlet URLs via the portlet tag library implementation provided with pluto the use of custom window states and portlet modes throw a NullPointerException.
>>The line that causes the exception is: (RenderURL:75)
>>url.setWindowState((WindowState)TEI.definedWindowStates.get(windowState.toUpperCase()));
>>TEI is a member class of the BasicURLTag class. It has a Hashtable field definedWindowStates which is used to map window state names to WindowState objects. This map is initialized by this method in TEI: (BasicURLTag:83)
>>private static Hashtable getDefinedWindowStates()
>>{
>> Hashtable definedWindowStates = new Hashtable();
>> Field[] f = WindowState.class.getDeclaredFields();
>> for (int i = 0; i < f.length; i++)
>> {
>> if (f[i].getType().isAssignableFrom(javax.portlet.WindowState.class))
>> {
>> try
>> {
>> definedWindowStates.put(f[i].get(f[i]).toString().toUpperCase(), f[i].get(f[i]));
>> }
>> catch (IllegalAccessException e)
>> {
>> }
>> }
>> }
>> return definedWindowStates;
>>}
>>The problem is this only adds WindowStates that are part of the portlet specification and doesn't allow portal defined WindowStates or PortletModes to be used as allowed by the portlet specification. Similar code is used for PortletModes.
>>
>>
>
>
>
[jira] Resolved: (PLUTO-97) Custom WindowStates and PortletModes do not work with tag library
Posted by "David DeWolf (JIRA)" <pl...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/PLUTO-97?page=history ]
David DeWolf resolved PLUTO-97:
-------------------------------
Resolution: Fixed
Fix Version: 1.0.1-rc3
Done, thanks Eric.
> Custom WindowStates and PortletModes do not work with tag library
> -----------------------------------------------------------------
>
> Key: PLUTO-97
> URL: http://issues.apache.org/jira/browse/PLUTO-97
> Project: Pluto
> Type: Bug
> Components: portlet container
> Versions: 1.0.1-rc1
> Reporter: Eric Dalquist
> Assignee: David DeWolf
> Fix For: 1.0.1-rc3
>
> When creating portlet URLs via the portlet tag library implementation provided with pluto the use of custom window states and portlet modes throw a NullPointerException.
> The line that causes the exception is: (RenderURL:75)
> url.setWindowState((WindowState)TEI.definedWindowStates.get(windowState.toUpperCase()));
> TEI is a member class of the BasicURLTag class. It has a Hashtable field definedWindowStates which is used to map window state names to WindowState objects. This map is initialized by this method in TEI: (BasicURLTag:83)
> private static Hashtable getDefinedWindowStates()
> {
> Hashtable definedWindowStates = new Hashtable();
> Field[] f = WindowState.class.getDeclaredFields();
> for (int i = 0; i < f.length; i++)
> {
> if (f[i].getType().isAssignableFrom(javax.portlet.WindowState.class))
> {
> try
> {
> definedWindowStates.put(f[i].get(f[i]).toString().toUpperCase(), f[i].get(f[i]));
> }
> catch (IllegalAccessException e)
> {
> }
> }
> }
> return definedWindowStates;
> }
> The problem is this only adds WindowStates that are part of the portlet specification and doesn't allow portal defined WindowStates or PortletModes to be used as allowed by the portlet specification. Similar code is used for PortletModes.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira