Details
-
Type: Improvement
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 3.0.RC1
-
Fix Version/s: 3.0
-
Component/s: Sample Apps
-
Labels:None
-
Environment:ICEfaces 3 MyFaces 2 ACE Showcase
-
Assignee Priority:P2
-
Affects:Sample App./Tutorial
Description
When running the ACE Showcase with MyFaces, any h:graphicImage that doesn't supply an 'alt' attribute generates the following warning:
WARNING: Component UIGraphic j_id1378384490_1a3c8901:image has no attribute alt or attribute resolves to null. Path to component {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /showcase.xhtml][Class: javax.faces.component.html.HtmlBody,Id: _2068169349_6d256d7f][Class: org.icefaces.ace.component.panel.Panel,Id: j_id1803199580_452a22d8][Class: javax.faces.component.html.HtmlPanelGroup,Id: _1803199580_452a228d][Class: javax.faces.component.html.HtmlForm,Id: j_id1378384490_1a3c8901][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id1378384490_1a3c891b][Class: javax.faces.component.html.HtmlGraphicImage,Id: image]}
This comes from the org.apache.myfaces.shared.renderkit.html.HtmlImageRendererBase:
102 /*
103 * Warn the user if the ALT attribute is missing.
104 */
105 if (uiComponent.getAttributes().get(HTML.ALT_ATTR) == null)
106 {
107 if(!facesContext.isProjectStage(ProjectStage.Development) && log.isLoggable(Level.WARNING))
108 log.warning("Component UIGraphic " + uiComponent.getClientId(facesContext) + " has no attribute alt or attribute resolves to null. Path to component " + RendererUtils.getPathToComponent(uiComponent));
109 }
As you can see it only happens in Production Mode. This may actually be unintended (should be Development mode) and something we can petition them to change. However, I think it likely is intended since the 'alt' attribute is technically a required attribute as per the spec.
WARNING: Component UIGraphic j_id1378384490_1a3c8901:image has no attribute alt or attribute resolves to null. Path to component {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /showcase.xhtml][Class: javax.faces.component.html.HtmlBody,Id: _2068169349_6d256d7f][Class: org.icefaces.ace.component.panel.Panel,Id: j_id1803199580_452a22d8][Class: javax.faces.component.html.HtmlPanelGroup,Id: _1803199580_452a228d][Class: javax.faces.component.html.HtmlForm,Id: j_id1378384490_1a3c8901][Class: javax.faces.component.html.HtmlPanelGrid,Id: j_id1378384490_1a3c891b][Class: javax.faces.component.html.HtmlGraphicImage,Id: image]}
This comes from the org.apache.myfaces.shared.renderkit.html.HtmlImageRendererBase:
102 /*
103 * Warn the user if the ALT attribute is missing.
104 */
105 if (uiComponent.getAttributes().get(HTML.ALT_ATTR) == null)
106 {
107 if(!facesContext.isProjectStage(ProjectStage.Development) && log.isLoggable(Level.WARNING))
108 log.warning("Component UIGraphic " + uiComponent.getClientId(facesContext) + " has no attribute alt or attribute resolves to null. Path to component " + RendererUtils.getPathToComponent(uiComponent));
109 }
As you can see it only happens in Production Mode. This may actually be unintended (should be Development mode) and something we can petition them to change. However, I think it likely is intended since the 'alt' attribute is technically a required attribute as per the spec.
Issue Links
- duplicates
-
ICE-7420 ACE Comp Suite logs warnings for certain components when running on MyFaces 2
- Closed
Mark, have these fixes been committed yet?