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

Woonsan Ko commented on JS2-1120:
---------------------------------

Hi Gonzalo,

Actually, I have thought of auto-detecting if the icon resource exists or not.
Technically, I think we can check it by using 
javax.servlet.ServletContext#getResource() or 
javax.portlet.PortletContext#getResource() because it reads the method returns 
null if the resource is not available.
However, I have the followings in mind:
(1) If we invoke getResource() method in the PortletRegistryService, then I 
think it would cost much with regard to performance.
(2) Or, we could think of another approach to make invocations during the 
initialization time of portlet application or portlet instance.
      However, when a user browses portlet definitions in the toolbox, a 
portlet application for the portlet definition or a portlet instance for the 
portlet are not guaranteed to be initialized at that moment.

Therefore, I think those additional metadata fields would be better.
By the way, the metadata fields are defined at the application level in 
jetspeed-portlet.xml, not at the portlet level. So, I think it minimizes the 
burden.

Kind regards,

Woonsan

> 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: Woonsan Ko
>            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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to