Refreshing the interface in Kinetic App

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)
image

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

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

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
image

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

I was playing with something similar yesterday.

Did it work with the raw byte data?

Curious… So is the the theory that erp-website url prop isn’t ep-binding so data change doesn’t bubble up?

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

:man_shrugging:

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

Fixed it with setting the capabilities property on control create event:

[
	{
		"id": "IInterpolateUrl",
		"description": "IInterpolateUrl"
	}
]

2025-05-23 14 50 35

2 Likes

I’m wondering if you don’t know there is a PDF widget.
I just got that working.

pdfworks

3 Likes

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:

5 Likes

Why not have one if there is only 1 parameter difference… is this rot setting in?

3 Likes

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.

@klincecum ???

3 Likes

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.