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

        Tyler Johnson created issue -
        Tyler Johnson made changes -
        Field Original Value New Value
        Salesforce Case [5007000000A79Zs]
        Tyler Johnson made changes -
        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 which results in a new page being fetched and an additional view being created. The ideal solution would be to display a broken link and log this as a warning. 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. The ideal solution would be to display a broken link and log this as a warning.
        Ken Fyten made changes -
        Fix Version/s 1.8.3 [ 10211 ]
        Assignee Priority P1
        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. The ideal solution would be to display a broken link and log this as a warning. 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. The ideal solution would be to display a broken link and log this as a warning.

        We will need an image to use for "broken link" that will be rendered in this case.
        Assignee Yip Ng [ yip.ng ]
        Ken Fyten made changes -
        Attachment redx.gif [ 12065 ]
        Ken Fyten made changes -
        Attachment redx.gif [ 12065 ]
        Ken Fyten made changes -
        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. The ideal solution would be to display a broken link and log this as a warning.

        We will need an image to use for "broken link" that will be rendered in this case.
        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.
        yip.ng made changes -
        Attachment screenshot-1.png [ 12066 ]
        yip.ng made changes -
        Attachment screenshot-1.png [ 12066 ]
        yip.ng made changes -
        Attachment screenshot-1.png [ 12067 ]
        yip.ng made changes -
        Attachment screenshot-2.png [ 12068 ]
        yip.ng made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.8.2-EE-Beta [ 10215 ]
        Adnan Durrani made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Adnan Durrani made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.8.2-EE-GA [ 10216 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1
        Assignee Yip Ng [ yip.ng ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: