Details
-
Bug
-
Status: Resolved
-
Resolution: Fixed
-
1.4b4-dev / CVS
-
None
-
None
-
Operating System: All
Platform: All
-
18208
Description
Allow the "skinning" of the images that will be used to represent actions with
Jetspeed.
Sample from a Skin entry:
<property name="image-restore" value="images/rk/icons/actions/1/restore.gif"
hidden="false"/>
all image resources within a skin would be required to have the "image-" prefix.
Two new methods would be added to the PortletSkin interface and to BasePortletSkin:
getImage(String name):
would return the path specified in the skin value. The "image-" prefix would
not be required as part of the "name" argument as the method would prepend it
automatically. Null if no resource is found.
getImage(String name, String dftPath):
Same as above, accept if there is no image defined for the "name", the
"dftPath", which should contain the path of an existing image, would be
returned. This makes implementing the approach within existing controls very
easy with no modifications to the existing regitries needing to made. Here is a
working example from my jetspeed.vm control:
#foreach ( $action in $actions )
<a href="${action.Link}" title="${action.Name}" ><img
src="${skin.getImage($action.Name,"images/${action.Name}.gif")}"
alt="${action.Alt}" border="0"></a>
#end
This approach can be used for other purposes in addition to the action images.
-scott