Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Updating an rwt-resource(How to update an rwt-resource on the fly)
Updating an rwt-resource [message #1092021] Thu, 22 August 2013 08:11 Go to next message
John Gymer is currently offline John GymerFriend
Messages: 191
Registered: November 2012
Location: UK
Senior Member
Forgive me if this is a nonsense scenario...

I have a RAP application that uses the PDFBox library to create a PDF file, saves it to a file, then I register the file as an rwt-resource so that I can display it within a Browser control (the PDF has so be available under the same server/port as the owning page for the Browser IFRAME to allow it to be viewable).

This works perfectly the first time.

However, I'd like to be able to modify the same physical PDF file (actually it doesn't have to be a PDF - it could be a web page, or anything else that could be displayed in the browser control), then refresh the rwt-resource so that the Browser control can see the updated copy.

However, this doesn't work... the physical file gets updated ok, and the register of it as an rwt-resource (same name as previous) appears to work ok, but the browser does not see the new PDF. In fact, even if I change the browser to a different URL, then back to the PDF, it doesn't refresh. It is as if the rwt-resource never got updated, and it is still using some cached copy of the resource.

Is this sort of processing possible using RWT/RAP? Have I misunderstood how resources work somehow? Or is it a feature of the browser control doing some sort of caching?

By the way, in some configurations it seems to work correctly - I have it working ok when running the RAP application directly from Eclipse, but not from a standalone OSGi configuration. Another sample app worked ok under one OSGi configuration, but not when copied to another machine. There's obviously something I've missed about the way that I'm supposed to be using the resources.

Any hints and ideas most appreciated!
Cheers, John


---
Just because you can doesn't mean you should
Re: Updating an rwt-resource [message #1097037 is a reply to message #1092021] Thu, 29 August 2013 06:54 Go to previous message
Thomas Kratz is currently offline Thomas KratzFriend
Messages: 163
Registered: July 2009
Senior Member
I would also like to hear about this to reload javascript resources while developing!

[Updated on: Thu, 29 August 2013 06:54]

Report message to a moderator

Previous Topic:Intense server push dynamic updates on RAP 2.1
Next Topic:Hybrid RAP based target plateform to share
Goto Forum:
  


Current Time: Mon Nov 24 03:10:41 GMT 2014

Powered by FUDForum. Page generated in 0.01478 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software