title: show UploadedFile content from Primeface's p:fileUpload in same form without refresh
body: <p>I'm trying to implement an ImageUpload and show the uploaded Image immediately on same page using DynamicImage. My Problem is, I can't force the p:graphicImage content be refreshed and show the uploaded image after uploading it.</p>
  
  <pre><code>@ManagedBean(name = "myformbean")
  @Controller
  @ViewScoped
  @Data
  public class MyFormBean implements Serializable {
  
      private StreamedContent listImage = null;
  
      public StreamedContent getListImage() {
          if (listImage == null) {
              try {
                  listImage = new DefaultStreamedContent(new FileInputStream("E:/t.jpg"), "image/png"); // load a dummy image
              }
              catch (FileNotFoundException e) {
                  e.printStackTrace();
              }
          }
  
          return listImage;
      }
  
      public void handleFileUpload(FileUploadEvent event) {
          final UploadedFile uploadedFile = event.getFile();
  
          listImage = new DefaultStreamedContent(new ByteArrayInputStream(uploadedFile.getContents()), "image/png");
      }
  }
  </code></pre>
  
  <p>And in .xhtml file:</p>
  
  <pre><code>&lt;p:graphicImage value="#{myformbean.listImage}" /&gt;
  </code></pre>