ICEfaces
  1. ICEfaces
  2. ICE-7556

MyFaces 2: A warning is generated for all h:graphicImage tags that don't include an 'alt' attribute

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor 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.

        Issue Links

          Activity

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27041 Thu Dec 22 07:05:11 MST 2011 esadovoi Resolved ICE-7556
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/file/FileEntryBean.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/accordionpanel/AccordionPanelDynamicBean.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/progressbar/progressBarPush.xhtml
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/progressbar/ProgressBarPush.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/accordionpanel/ImageSet.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/progressbar/progressBar.xhtml
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/animation/animation.xhtml
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/fileentry/fileentry.xhtml
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/tooltip/toolTip.xhtml
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/progressbar/ProgressBarBean.java

            People

            • Assignee:
              Evgheni Sadovoi
              Reporter:
              Deryk Sinotte
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: