ICEfaces
  1. ICEfaces
  2. ICE-5061

Empty ice:graphicImage URL creates unnecessary views

    Details

      Description

      Returning an empty string for the src attribute of <ice:graphicImage/> will cause the browser to re-write the url to point to the main page of the application, fetch this new page, and create an additional view.

      This is clearly an application level issue, however, since it is relatively common we can add a check for this and if the 'src' attribute is blank or '/' (or null) then the component should do the following:

      1. Log and WARN level message, indicating the source page, the ice:graphicImage component ID (if any), and that the graphicImage 'src' attribute is blank.

      2. Replace the <image> tag in the rendered output for the graphicImage component with text "???". This will be easier to maintain than trying to load a specific image to display in this case. The key thing is that the image tag cannot request the incorrect image, or an unnecessary view will be created.

      Of course, if the 'src' attribute is anything but blank, null, or "/", then we should render as normal.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19734 Thu Nov 19 12:47:49 MST 2009 adnan.durrani Fix related to ICE-5061 (Empty ice:graphicImage URL creates unnecessary views)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/ImageRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19531 Wed Oct 28 15:09:10 MDT 2009 yip.ng ICE-5061: Changed to output text "???" instead of img tag when image URL is missing.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/ImageRenderer.java

          People

          • Assignee:
            Unassigned
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: