Hi,
I am trying to create the app in app studio that will show pdf files.
What I got so far is the grid where I have part revisions. Every time I click on the row I have the event which is getting the byte array representing the pdf. and saves it to the dataview.
I also have the erp-website control which will show the pdf.
It works when I set the URL property with the actual byte array just to make sure it will work.
But as I mentioned. I would like the URL to change every time when I select a row in the grid.
What I did was just use the property-set widget and set URL there. And it sets the URL correctly. I can see it when I review the controls (CTRL+ALT+L)
The last one piece that does not work is that the widget isnât refreshing the pdf. It just keeps the URL that has been set initially.
Does anyone have any ideas how to fix this last thing?
I guess that every time when I was about to change some property the change wasnât reflected in HTML.
2 Likes
Randy
(Randy Stulce)
May 23, 2025, 1:12pm
2
Still learning App Studio here too but sounds like you need an event trigger the URL change when the users selects a new row.
Sorry but Iâm not sure what do you mean?
I have the event which fires every time when the row is changed.
Inside that event I am changing the URL property by using property-set widget.
1 Like
klincecum
(Kevin Lincecum)
May 23, 2025, 3:04pm
5
Me and @hmwillett screwed with that the other day, it doesnât work.
Try setting the url to a field in your dataview. That worked.
2 Likes
This is what I did.
then I got the value to the dataview
and then it says
klincecum
(Kevin Lincecum)
May 23, 2025, 3:24pm
7
Itâs not designed for what you want to do, but if you can get it working, do share.
I have been working on some workarounds, but time is limited.
I ended up by using the row-update widget in my event and have the expression.
This hack will work until the iframe id will remain the same.
#_ document.querySelector("#embedded-app-panel.ep-embedded-iframe").src="https://www.google.com/" _#
google.com wonât work for me but Iâm just giving you an example. It works with the urls that I need.
Also you need to have some url set up in the control initially so the iframe will be there.
2 Likes
klincecum
(Kevin Lincecum)
May 23, 2025, 3:34pm
9
I was playing with something similar yesterday.
Did it work with the raw byte data?
jbooker
(Josh Booker)
May 23, 2025, 4:25pm
10
Curious⌠So is the the theory that erp-website url prop isnât ep-binding so data change doesnât bubble up?
jbooker
(Josh Booker)
May 23, 2025, 5:56pm
11
So this tooltip is a lie:
I get this:
For some reason the component isnât registering InterpolateCapability so the binding doesnât register and params donât get resolved.
this.hasInterpolateUrlCapability()
returns false on this line causing the url to be as-entered (param not eval)
which is strange cuz elsewhere the capability is clearly defined
2 Likes
Yes.
Iâm getting the revisions attachments by using Ice.BO.AttachmentSvc.DocStarDownloadFile.
This returns the raw byte data which I am using.
1 Like
jbooker
(Josh Booker)
May 23, 2025, 6:47pm
13
Fixed it with setting the capabilities property on control create event:
[
{
"id": "IInterpolateUrl",
"description": "IInterpolateUrl"
}
]
2 Likes
klincecum
(Kevin Lincecum)
May 23, 2025, 7:32pm
14
Iâm wondering if you donât know there is a PDF widget.
I just got that working.
jbooker
(Josh Booker)
May 23, 2025, 7:41pm
16
Doh! There are 2 website widgets. Web2 does this out of the box!
Toolbox > Widgets > Website Widget not Toolbox > Components > Website Widget
Always check w @hmwillett first:
Website Widget
Okay, so there are two of these.
One is in Toolbox > Components > WebSite âWidigitâ Control (not my spelling, donât hurt me). Weâll call this one Web1.
The other is in Toolbox > Widgets > Website Widget. Weâll call this Web2.
Web1 works for displaying and interacting with a website, but does not take parameters in the URL.
Web2 does the same as Web1, but also allows a user to pass in parameters.
The properties are the same, so I will only be going over the Web2 one since it âŚ
5 Likes
Hally
(Simon Hall)
May 24, 2025, 12:59am
17
Why not have one if there is only 1 parameter difference⌠is this rot setting in?
3 Likes
jbooker
(Josh Booker)
May 24, 2025, 12:49pm
18
It probably really is one in the framework. but yeah why two in the tooling and why override capabilities and why only dum one show when I search tools for âwebâ?
What other capabilities are they hiding?
Maybe not rot, but possibly patronizing.
Interesting⌠Did you use raw byte data in there?
The problem with this is that it runs only once.
No other events are firing after that.
Edit.
It works after little script change
document.querySelector("#embedded-app-panel.ep-embedded-iframe").setAttribute("src", "https://www.google.com") _#
So instead of â.src =â I used â.SetAttribute()â and it did the trick.