Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Communication between RAP and content of BrowserWidget
Communication between RAP and content of BrowserWidget [message #50730] Thu, 04 October 2007 11:37 Go to next message
Magnus Konze is currently offline Magnus KonzeFriend
Messages: 35
Registered: July 2009
Member
Hi,
i already asked about embedding a texteditor a month ago... Since we
depend on Word documents, i choosed the following way:
I created an applet and embedded Word with the SWT OleFrame widget.
Surprinsingly this works :-)
The applet is deployed on a Tomcat and is displayed with the
BrowserWidget, which is in a modal Dialog.

Now it would be great to have a button, which saves the document AND
closes the dialog.

So far i tried three approaches:
1) close the Dialog/Browser and save the document in the Applets stop()
method
2) close the Dialog/Browser and call the save method of the applet with
javascript (onunload)

Both were unsuccessful, the code, which should save the document is
called, but it seems, that at this point it is too late to save
(OleClientSite.save(...) always returns false, strangely isDirty()
always returns true, even, if i didn't change the document).
(By the way, saving works before i close the Browser.)

3) go to a new URL after saving, this should be recognized by a
LocationListener of the Browser, so that he could be closed

I saw, that there is already a bug report. At the moment the
LocationListener is only called after Browser.setUrl().

Any ideas, how to solve this. Of course i could save and close
independently, but then changes are lost, if you close the Dialog
without saving.

Thanks
Magnus
Re: Communication between RAP and content of BrowserWidget [message #52199 is a reply to message #50730] Wed, 17 October 2007 10:26 Go to previous message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

I would try to save the content of the document (however this is done within
the OleFrame) and after that sending a request to the RAP server
(Unfortunately I don't have much experience with applets, so hopefully there
is a way to do so...). The server could acknowledge the request by sending a
response that closes the dialog. This way the timing issues may be solved.

Ciao
Frank

"Magnus Konze" <bodomchild@web.de> schrieb im Newsbeitrag
news:fe2j94$1hn$1@build.eclipse.org...
> Hi,
> i already asked about embedding a texteditor a month ago... Since we
> depend on Word documents, i choosed the following way:
> I created an applet and embedded Word with the SWT OleFrame widget.
> Surprinsingly this works :-)
> The applet is deployed on a Tomcat and is displayed with the
> BrowserWidget, which is in a modal Dialog.
>
> Now it would be great to have a button, which saves the document AND
> closes the dialog.
>
> So far i tried three approaches:
> 1) close the Dialog/Browser and save the document in the Applets stop()
> method
> 2) close the Dialog/Browser and call the save method of the applet with
> javascript (onunload)
>
> Both were unsuccessful, the code, which should save the document is
> called, but it seems, that at this point it is too late to save
> (OleClientSite.save(...) always returns false, strangely isDirty() always
> returns true, even, if i didn't change the document).
> (By the way, saving works before i close the Browser.)
>
> 3) go to a new URL after saving, this should be recognized by a
> LocationListener of the Browser, so that he could be closed
>
> I saw, that there is already a bug report. At the moment the
> LocationListener is only called after Browser.setUrl().
>
> Any ideas, how to solve this. Of course i could save and close
> independently, but then changes are lost, if you close the Dialog without
> saving.
>
> Thanks
> Magnus
Previous Topic:NullPointerException in isValidThread
Next Topic:Howto get access to the information of the user of the current session
Goto Forum:
  


Current Time: Fri Nov 08 23:11:37 GMT 2024

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

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

Back to the top