portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Woonsan Ko (JIRA)" <jetspeed-...@portals.apache.org>
Subject [jira] Commented: (JS2-1120) Portlet icon to be shown on toolbox should be loaded from application context
Date Wed, 24 Mar 2010 16:25:27 GMT

    [ https://issues.apache.org/jira/browse/JS2-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849261#action_12849261

Woonsan Ko commented on JS2-1120:

I'm seeing the following lines in your patch:

+				iconFile = new File(applicationContextPath + "/images/portlets/" + portletIcon);
+				// How to check if file exists? Need application context absolute path
+//				if(iconFile.exists())
+//				{
+//					portletIconPath = iconFile.getPath();
+//				}
+//				else
+//					portletIconPath = new String();
+				portletIconPath = iconFile.getPath();

I prefer supporting the existing feature (icons in portal app) as well as new proposed feature
(icons in portlet app). In this sense, the above code seems to support the new feature only.
How about simply adding a metadata field in jetspeed-portlet.xml like this? That could be
a global metadata for the portlet app like this:

<portlet-app id="demo">
  <js:metadata name="portlet-icon-location" xml:lang="en">portlet</js:metadata>
</portlet-app id="demo">

This metadata could be checked in the portlet registry service and passed to toolbox view
page. If it exists with 'portlet' value, then the portlet context path will be used; otherwise
the default portal path will be used.
What do you think?


> Portlet icon to be shown on toolbox should be loaded from application context
> -----------------------------------------------------------------------------
>                 Key: JS2-1120
>                 URL: https://issues.apache.org/jira/browse/JS2-1120
>             Project: Jetspeed 2
>          Issue Type: Improvement
>    Affects Versions: 2.2.1
>            Reporter: Gonzalo Aguilar
>            Assignee: David Sean Taylor
>            Priority: Minor
>             Fix For: 2.2.2
>         Attachments: Prepatch-j2-admin-JS2-1120-20100307.patch, Prepatch-jetspeed2-JS2-1120-20100307.patch
> Portlet icons are currently loaded from Portal context. 
> It makes difficult to update individual Portlet icons because they must be deployed to
the Portal Application. 
> Proposed change is to make Portal to lookup the resource on Portlet context if the icon
is not found in the main Portal location.
> This will help developers update Portlet icons with application.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org

View raw message