ICEfaces
  1. ICEfaces
  2. ICE-10928

ace:graphicImage no refresh with byte[]

    Details

    • Type: Task Task
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Dev

      Description

      I´m working with Icefaces 4.0 with ace:graphicImage component specifically and I have a problem.

      Load the image from the database, it´s convert it to byte[] and set the byte value to the :graphicImage component setValue(byte) method.

      The first time the image is showed, I change the image and is not refreshed until I reload the page with F5.

      Could you orient me whats wrong in my project or exist some bug with this component by setting byte[] in the setValue?

      Thank you.

        Activity

        Hide
        Dwight Harms added a comment -

        I'm having a similar problem after converting from v3.2 to v4.2. We have a pop-up which, in 3.2, used ice:graphicImage and WORKED.

        After converting to 4.2 and changing this to ace:graphicImage, we get this failure. The first time the pop-up is opened, it shows the selected image; but on subsequent calls that open the dialog, it displays the original image, instead of the different image returned in response to the getter method for the item specified in the value= attribute.
        I have tried different scope= settings, but they either fail in a similar manner, or don't display any image.

        In the dialog box is:
        <ace:graphicImage scope="view" rendered="#

        {imageViewerBean.image ne null}

        "
        value="#

        {imageViewerBean.image.content}

        " />

        Tracing through the imageViewerBean.getImage() method shows that on subsequent calls, different objects (with different content) are returned. However, the html shown in the browser dev tool remains the same, e.g.,
        <img id="j_id_ea:j_id_ed" src="/lightspeed4/javax.faces.resource/imagej_id_ea:j_id_ed.jsf?javax.faces.ViewState=PPEGyKzH4Otfy3cet6VoBMw1mH/Osa647LHQeLkMPlfM8iF8&ice.view=/jsp/adminsys/users.xhtml">

        Refreshing the page with F5 allows a new choice to appear properly. The same is true for scope="window" or "session". (Interesting that "session" doesn't act as session-scoped, since F5 appears to reset it.)

        If scope is set to "request" – which seems like it should do what we want – or "flash", no image appears; the html shows:
        <img id="j_id_ea:j_id_ed" src="">

        If scope="application", the image never changes once it is displayed. That is, refreshing the page does not get a new image. (This seems somewhat reasonable, based on other usage of the term "application scope", even though there's no actual definition of how these settings affect ace:graphicImage.)

        Show
        Dwight Harms added a comment - I'm having a similar problem after converting from v3.2 to v4.2. We have a pop-up which, in 3.2, used ice:graphicImage and WORKED. After converting to 4.2 and changing this to ace:graphicImage, we get this failure. The first time the pop-up is opened, it shows the selected image; but on subsequent calls that open the dialog, it displays the original image, instead of the different image returned in response to the getter method for the item specified in the value= attribute. I have tried different scope= settings, but they either fail in a similar manner, or don't display any image. In the dialog box is: <ace:graphicImage scope="view" rendered="# {imageViewerBean.image ne null} " value="# {imageViewerBean.image.content} " /> Tracing through the imageViewerBean.getImage() method shows that on subsequent calls, different objects (with different content) are returned. However, the html shown in the browser dev tool remains the same, e.g., <img id="j_id_ea:j_id_ed" src="/lightspeed4/javax.faces.resource/imagej_id_ea:j_id_ed.jsf?javax.faces.ViewState=PPEGyKzH4Otfy3cet6VoBMw1mH/Osa647LHQeLkMPlfM8iF8&ice.view=/jsp/adminsys/users.xhtml"> Refreshing the page with F5 allows a new choice to appear properly. The same is true for scope="window" or "session". (Interesting that "session" doesn't act as session-scoped, since F5 appears to reset it.) If scope is set to "request" – which seems like it should do what we want – or "flash", no image appears; the html shows: <img id="j_id_ea:j_id_ed" src=""> If scope="application", the image never changes once it is displayed. That is, refreshing the page does not get a new image. (This seems somewhat reasonable, based on other usage of the term "application scope", even though there's no actual definition of how these settings affect ace:graphicImage.)

          People

          • Assignee:
            Unassigned
            Reporter:
            Alfonso Miranda
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: