Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.8RC2
-
Fix Version/s: 1.8
-
Component/s: Sample Apps
-
Labels:None
-
Environment:portal portlet component showcase
-
Affects:Sample App./Tutorial
Description
Some of the samples in the Component Showcase use images for various things. If those images are referenced relatively, then they won't be properly resolved in a portlet environment. The current problems are in:
- data paginator (the arrows)
- table expandable (triangles)
- tree (arrows and node lines)
- download resource (the image link)
- data paginator (the arrows)
- table expandable (triangles)
- tree (arrows and node lines)
- download resource (the image link)
The first three components are all related to the StyleBean class which sets up a map to store the available styles and image directory like so:
styleMap = new HashMap(3);
styleMap.put(RIME, new StylePath(
"./xmlhttp/css/rime/rime.css",
"./xmlhttp/css/rime/css-images/"));
styleMap.put(XP, new StylePath(
"./xmlhttp/css/xp/xp.css",
"./xmlhttp/css/xp/css-images/"));
styleMap.put(ROYALE, new StylePath(
"./xmlhttp/css/royale/royale.css",
"./xmlhttp/css/royale/css-images/"));
Unfortunately, the relative references to the images won't resolve in a portlet. The last one (output resource) has a relative reference right in the page code:
<ice:outputResource id="pdf-image"
{resourceBean.pdfResource}resource="#
" mimeType="application/pdf"
fileName="Enterprise-Ajax-Security-with-ICEfaces.pdf"
image="./images/button-submit.gif" />
Changing all these to absolute references solves the problem for portlets while still allowing the Component Showcase to operate properly in non-portlet environments.