How to force reload content inside AWIFrame

40 views
Skip to first unread message

Kazz

unread,
Feb 20, 2013, 10:49:59 PM2/20/13
to arib...@googlegroups.com
Hi everyone,

This seems HTML issues but...


My app displays PDF inside AWIFrame;

<a:IFrame value="$generatePDF" />

But it is cached on browser so I can't display a correct PDF content.

It seems a feature of some browsers such like IE and Chrome.
Does anyone know how to force reload the content after the containing page loaded?

I tried AWClientSideScript but I can't good solution as of now.

Kazuo 

František Kolář

unread,
Feb 21, 2013, 2:28:11 AM2/21/13
to arib...@googlegroups.com
Hi Kuzuo, 

Not sure what is behind your part but you can forse full refresh(1) with following call or you can AWPoll to make incremental update, when you can decide if you want to reload or not (2). 

1) AWRequestContext.forceFullPageRefresh();

2) Inside your AWComponent -> activate Polling page().setPollingInitiated(true) and register notifier listener once you feel on server side that you need to refresh the page you simply call notify on your notifiy and you receive newrequest into your AWComponent. 


 


Regards

František Kolář

Kazz

unread,
Feb 21, 2013, 2:50:54 AM2/21/13
to arib...@googlegroups.com
Thanks for advice!
AWRequestContext.forceFullPageRefresh() seems to work on this.

My page contains IFrame which display generated PDF on server.
The problem is, when I show the page, another (cached) PDF is displayed in the IFrame.  So I wanted to force to reload the content of the IFrame when the page is loaded.

I tried 

<a:IFrame id="frame0" value="$generatedPDF" style="width:900px; height:640px;"></a:IFrame>

<a:ClientSideScript scriptString="function reloadPage({document.getElementById('frame0').contentWindow.location.reload(true);reloadPage();}" />



It seems to work but it's ugly. :)

I will try forceFullPageRefresh() later.


Anyway thanks for quick advice.

Kazuo





2013年2月21日木曜日 16時28分11秒 UTC+9 František Kolář:
Reply all
Reply to author
Forward
0 new messages