I’m having an issue getting a PDF to load from a database into a PDF View component in a Vision popup on the opening of the window.
I’m passing a database ID to a custom property on the window called BOLGUID.
The following script works in a button on the popup, so I know the database connection and the loading of the PDF is working conceptually.
#Pull data based on BOL GUID from Popup
data = system.db.runNamedQuery("BOLData", {"BOLGUID":event.source.parent.BOLGUID})
#Paint PDF View with BOL
reportBytes = data.getValueAt(0, "PDFStore")
event.source.parent.getComponent('PDF Viewer').loadPDFBytes(reportBytes, "BOL Report")
However, I’ve tried the following script in the internalFrameActivated event on the popup window and it does not load a PDF properly when I open the window
data = system.db.runNamedQuery("BOLData", {"BOLGUID":event.source.rootContainer.BOLGUID})
bytes = data.getValueAt(0, "PDFStore")
system.gui.getParentWindow(event).getComponentForPath('Root Container.PDF Viewer').loadPDFBytes(bytes, "BOL Report")
Any suggestions on where to look?