Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-Beta1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:Glassfish 3.0.1
-
Workaround Exists:Yes
-
Workaround Description:Use a plain HTML <img> or <h:graphicImage>.
Description
When using a <ice:graphicImage> to render an image resource by passing corresponding EL as the value attribute, the root folder of the path (in this case the project name) is duplicated. This was noticed during testing of the easyPopup component.
<ice:graphicImage value="#{resource['images/tabs:popupclose.gif']}">
produces an image tag with the src attribute:
"/YACS/YACS/javax.faces.resource/popupclose.gif.jsf?ln=images/tabs"
while the EL alone renders as:
"/YACS/javax.faces.resource/popupclose.gif.jsf?ln=images/tabs"
ice:graphicImage as expected, cannot find the resource.
h:graphicImage is unaffected.
<ice:graphicImage value="#{resource['images/tabs:popupclose.gif']}">
produces an image tag with the src attribute:
"/YACS/YACS/javax.faces.resource/popupclose.gif.jsf?ln=images/tabs"
while the EL alone renders as:
"/YACS/javax.faces.resource/popupclose.gif.jsf?ln=images/tabs"
ice:graphicImage as expected, cannot find the resource.
h:graphicImage is unaffected.
Activity
| Status | Resolved [ 5 ] | Closed [ 6 ] |
| Assignee Priority | P2 |
| Fix Version/s | 2.0.0 [ 10230 ] |
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
| Salesforce Case | [] | |
| Fix Version/s | 2.0-Beta2 [ 10242 ] | |
| Assignee Priority | P2 | |
| Affects Version/s | 2.0-Beta1 [ 10231 ] | |
| Assignee | Ken Fyten [ ken.fyten ] | Deryk Sinotte [ deryk.sinotte ] |
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Ken Fyten [ ken.fyten ] |

The issue appeared to be that the ViewHandler.getResourceURL method in JSF 1.2 would check for the /context and remove it if it was there. Subsequent processing would add it back in if necessary. The ViewHandler impl in JSF 2.0 doesn't do this. So I added the /context removal logic back into our compat CoreUtils.resolveResourceURL call and then updated all the other components that weren't using this method (ie using facesContext.getApplication().getViewHandler().getResourceURL directly) to use the CoreUtils API.