pdfviewer ignores initial content media

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Normal
    • 9.0.0
    • Affects Version/s: Freshly, 9.0.0
    • Component/s: Components
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      <div>
          <zscript>
              import java.net.URL;
              import org.zkoss.util.media.AMedia;
              public AMedia loadPdf() {
                  return new AMedia(application.getResource(execution.toAbsoluteURI("test.pdf", true)), null, null);
              }
              AMedia document = loadPdf();
          </zscript>
          pdfviewer is ignoring the content media initially
          <pdfviewer id="pdf" content="${document}"/>
          <button label="dynamic content via zkau works" onClick="pdf.setContent(loadPdf());"/>
      </div>
      

      Current Result

      the pdfview component doesn't load the content from the initial AMedia
      only setting the content later has an effect

      Expected Result

      the media content should load initially

      Debug Information

      the initial content is not handled during Pdfviewer.renderProperties

      Workaround

            Assignee:
            rudyhuang
            Reporter:
            cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Time Spent - 1 hour Remaining Estimate - 3 hours
                3h
                Logged:
                Time Spent - 1 hour Remaining Estimate - 3 hours
                1h