I have an app that includes the URL Widget. The widget is supposed to display pdf files stored on the IFS. The widget is displayed when a row is clicked on a grid. The URL is set based upon information in the row. However, the pdf will not display. The pdfs are not in the valence6 directory. I'm using a fully qualified path. What am I missing?
Announcement
Collapse
No announcement yet.
URL Widget
Collapse
X
-
Update your Apache config file using IBM Web Administration for i, which you access via the browser (for example, yourIBMi:2001/HTTPAdmin), and add the path where the PDFs are stored
Example
Code:Alias /myCustomerPdfs /someFolder/myCustomerPdfs <Directory /someFolder/myCustomerPdfs> Order Allow,Deny allow from all </Directory>
Comment
-
I checked the Apache config and the aliases are already in place. I thought I had this working before. I did check again whether I can access the pdfs from the browser using the alias path and they open up just fine. My issue seems to be that Valence will not open the files. Can you confirm how the url should be constructed for the URL widget?
Comment
-
I'm using "Link URL". I've attached a screenshot of the config.
Attached Files
Comment
-
Can you go to http://192.168.222.54:7060/Invoices/validInvoice.pdf from your browser directly?
If so, have you validated that INVIN65 doesn't have spaces, etc.?
Comment
-
Below is an image of accessing one of the pdfs directly in the browser:
Screenshot 2023-11-21 1.50.08 PM.png
The field INVN65 does not include any spaces or special characters. The only thing I see is as below when displaying the URL widget:
Screenshot 2023-11-21 1.57.11 PM.png
Comment
-
This appears to be a bug using "Link URL" with a URL Widget specified as a popup. We will look to get this fixed for the next build. In the meantime, you can use an app variable.- Create new app variable "pdfPath" or whatever you choose.
- Use Link To App Variables against the URL widget and link the "URL" property to the newly created app variable
- Upon click
- Set App Variables
- pdfPath = /Invoices/{INVN65}.pdf
- Hide/Show Widgets
- Show the URL widget popup
- Set App Variables
Comment
Comment