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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: