Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Updating a View in an other Session
Updating a View in an other Session [message #47333] Mon, 17 September 2007 09:08 Go to next message
Lars Gehrken is currently offline Lars GehrkenFriend
Messages: 3
Registered: July 2009
Junior Member
Hi,

I've implemented an logview for my RAP-App. It works with an static
LogCache that stores any entry an notifys all registered Logviews when
an entry is added.

My Problem is, that when I have two sessions running, that both have the
Log View visible, only the LogView will be refreshed that is in the same
Session, the LogView in the other Session will show the change only when
an Entry is logged in that session. I've verifyed that the
view.refresh() is called anytime on all open views, but that has no
effect on views in other sessions.

Is it possible to refresh an view in an other session?

thx
Lars
Re: Updating a View in an other Session [message #47491 is a reply to message #47333] Tue, 18 September 2007 07:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

I would think activation of the UICallBack mechanism may do the trick.
Insert the following line into the IEntryPoint#createUI() implementation:

UICallBack.activate( getClass().getName() );

If you update your views via Display#asyncExcec(Runnable) all sessions
should be refreshed. Note currently we are doing some work on those
mechanims, so there is temporarily some unexpected behaviour possible. But
the work should be finished by the end of the week.

Hope that helps!

Ciao
Frank


"Lars Gehrken" <gehrken@orbital-computer.de> schrieb im Newsbeitrag
news:fcme8l$4nq$1@build.eclipse.org...
> Hi,
>
> I've implemented an logview for my RAP-App. It works with an static
> LogCache that stores any entry an notifys all registered Logviews when
> an entry is added.
>
> My Problem is, that when I have two sessions running, that both have the
> Log View visible, only the LogView will be refreshed that is in the same
> Session, the LogView in the other Session will show the change only when
> an Entry is logged in that session. I've verifyed that the
> view.refresh() is called anytime on all open views, but that has no
> effect on views in other sessions.
>
> Is it possible to refresh an view in an other session?
>
> thx
> Lars
>
>
>
Re: Updating a View in an other Session [message #47825 is a reply to message #47491] Wed, 19 September 2007 08:21 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Hi Frank,
does this mean, that everytime I use the UICallBack mechanisms to trigger ui
refreshes, all sessions are notfified?
Do I have to specifiy a application-wide unique id as parameter in the
activate() call to make this work?

Regards,
Stefan.

"Frank Appel" <fappel@innoopract.com> schrieb im Newsbeitrag
news:fcnt9i$d0h$1@build.eclipse.org...
> Hi,
>
> I would think activation of the UICallBack mechanism may do the trick.
> Insert the following line into the IEntryPoint#createUI() implementation:
>
> UICallBack.activate( getClass().getName() );
>
> If you update your views via Display#asyncExcec(Runnable) all sessions
> should be refreshed. Note currently we are doing some work on those
> mechanims, so there is temporarily some unexpected behaviour possible. But
> the work should be finished by the end of the week.
>
> Hope that helps!
>
> Ciao
> Frank
>
>
> "Lars Gehrken" <gehrken@orbital-computer.de> schrieb im Newsbeitrag
> news:fcme8l$4nq$1@build.eclipse.org...
>> Hi,
>>
>> I've implemented an logview for my RAP-App. It works with an static
>> LogCache that stores any entry an notifys all registered Logviews when
>> an entry is added.
>>
>> My Problem is, that when I have two sessions running, that both have the
>> Log View visible, only the LogView will be refreshed that is in the same
>> Session, the LogView in the other Session will show the change only when
>> an Entry is logged in that session. I've verifyed that the
>> view.refresh() is called anytime on all open views, but that has no
>> effect on views in other sessions.
>>
>> Is it possible to refresh an view in an other session?
>>
>> thx
>> Lars
>>
>>
>>
>
>
Re: Updating a View in an other Session [message #48928 is a reply to message #47491] Sat, 22 September 2007 09:59 Go to previous messageGo to next message
Markus Wolf is currently offline Markus WolfFriend
Messages: 153
Registered: July 2009
Senior Member
Hi Frank,

> I would think activation of the UICallBack mechanism may do the trick.
> Insert the following line into the IEntryPoint#createUI() implementation:
>
> UICallBack.activate( getClass().getName() );
>
> If you update your views via Display#asyncExcec(Runnable) all sessions
> should be refreshed. Note currently we are doing some work on those
> mechanims, so there is temporarily some unexpected behaviour possible. But
> the work should be finished by the end of the week.
>
I have a similar UseCase. I want to refresh a JFace tree view in all
user sessions. I'm not sure where exactly I should add the UICallback.
The API states that each UICallback.activate() needs a
UICallback.deactivate(). Where to put this when the activate() call is
in the createUI?
I first thought about putting the callback calls into the create and
dispose methods of my View where the tree viewer is in, but that would
create a dependency to RAP for my view which could not be used in RCP
then anymore.

Can you give a some hints on how to use the UICallbacks?
Thanks
Markus Wolf
--
> emedia-solutions wolf web: http://www.emedia-solutions-wolf.de
> Eimsbüttler Straße 115 mail: markus@emedia-solutions-wolf.de
> 22769 Hamburg pgp: http://wwwkeys.de.pgp.net
> +49 40 432 635 83 taxid: 57 / 126 / 16123
Re: Updating a View in an other Session [message #62626 is a reply to message #48928] Fri, 23 November 2007 16:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benedikt.arnold.beyondsoft.de

Hi!

I've exactly the same problem. Is there any solution?
Thanks!

Greetings,
Ben


"Markus Wolf" <markus@emedia-solutions-wolf.de> schrieb im Newsbeitrag
news:fd2p2f$gvf$1@build.eclipse.org...
> Hi Frank,
>
>> I would think activation of the UICallBack mechanism may do the trick.
>> Insert the following line into the IEntryPoint#createUI() implementation:
>>
>> UICallBack.activate( getClass().getName() );
>>
>> If you update your views via Display#asyncExcec(Runnable) all sessions
>> should be refreshed. Note currently we are doing some work on those
>> mechanims, so there is temporarily some unexpected behaviour possible.
>> But
>> the work should be finished by the end of the week.
>>
> I have a similar UseCase. I want to refresh a JFace tree view in all
> user sessions. I'm not sure where exactly I should add the UICallback.
> The API states that each UICallback.activate() needs a
> UICallback.deactivate(). Where to put this when the activate() call is
> in the createUI?
> I first thought about putting the callback calls into the create and
> dispose methods of my View where the tree viewer is in, but that would
> create a dependency to RAP for my view which could not be used in RCP
> then anymore.
>
> Can you give a some hints on how to use the UICallbacks?
> Thanks
> Markus Wolf
> --
>> emedia-solutions wolf web: http://www.emedia-solutions-wolf.de
>> Eimsb
Re: Updating a View in an other Session [message #62650 is a reply to message #62626] Fri, 23 November 2007 17:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

I have implemented this in the demo application - unfortunately the
UICallBack is deactivated at the moment in the online version, but each
changes of the datamodel are propagated to all sessions and visible as soon
as a user triggers a serverside turnaround. To activate the viewer updates
without user interaction the UICallBack#activate(String) must be called
right from the start. That's how it's done in the demo:

public class RMS implements IEntryPoint {

static {
EntityAdapter.editorInputRegistry = new EditorInputRegistry();
}

public Display createUI() {
Activator.getDefault().initializeImageRegistry(
"org.eclipse.rap.rms.ui" );
UICallBack.activate( RMS.class.getName() );
Display result = PlatformUI.createDisplay();
RMSWorkbenchAdvisor workbenchAdvisor = new RMSWorkbenchAdvisor();
PlatformUI.createAndRunWorkbench( result, workbenchAdvisor );
return result;
}
}

In the demo the underlying data model fires model events to inform observers
about such changes and I use the content providers of each 'Navigator' tree
viewer to listen to such events. To avoid invalid thread access problems use
Display#asyncExec(Runnable).

viewer.getControl().getDisplay().asyncExec( new Runnable() {
public void run() {
// do actual viewer refresh
}
} );

Hope that helps.


Ciao
Frank


"Benedikt Arnold" <benedikt.arnold@beyondsoft.de> schrieb im Newsbeitrag
news:fi706u$kpg$1@build.eclipse.org...
> Hi!
>
> I've exactly the same problem. Is there any solution?
> Thanks!
>
> Greetings,
> Ben
>
>
> "Markus Wolf" <markus@emedia-solutions-wolf.de> schrieb im Newsbeitrag
> news:fd2p2f$gvf$1@build.eclipse.org...
>> Hi Frank,
>>
>>> I would think activation of the UICallBack mechanism may do the trick.
>>> Insert the following line into the IEntryPoint#createUI()
>>> implementation:
>>>
>>> UICallBack.activate( getClass().getName() );
>>>
>>> If you update your views via Display#asyncExcec(Runnable) all sessions
>>> should be refreshed. Note currently we are doing some work on those
>>> mechanims, so there is temporarily some unexpected behaviour possible.
>>> But
>>> the work should be finished by the end of the week.
>>>
>> I have a similar UseCase. I want to refresh a JFace tree view in all
>> user sessions. I'm not sure where exactly I should add the UICallback.
>> The API states that each UICallback.activate() needs a
>> UICallback.deactivate(). Where to put this when the activate() call is
>> in the createUI?
>> I first thought about putting the callback calls into the create and
>> dispose methods of my View where the tree viewer is in, but that would
>> create a dependency to RAP for my view which could not be used in RCP
>> then anymore.
>>
>> Can you give a some hints on how to use the UICallbacks?
>> Thanks
>> Markus Wolf
>> --
>>> emedia-solutions wolf web: http://www.emedia-solutions-wolf.de
>>> Eimsb
Re: Updating a View in an other Session [message #62838 is a reply to message #62650] Sun, 25 November 2007 14:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benedikt.arnold.beyondsoft.de

Hi!

I've implemented it the same way but the problem is, that if I call
UICallback#activate it is not possible anymore to close the equinox
framework. I hope the problem will be solved if I call the
UICallback#deactivate. But where should I do this? I think all
UICallback-methods must be called from within the UI thread.

Greetings,
Ben
Re: Updating a View in an other Session [message #63901 is a reply to message #62838] Mon, 03 December 2007 13:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

you are right, but this seems to be a bug within the UICallBack mechanism.
It seems that the callback thread isn't release at the end of a session.
This is one of my tasks for this week and hopefully there will be a solution
with the service release available on friday...


Ciao
Frank


"Benedikt Arnold" <benedikt.arnold@beyondsoft.de> schrieb im Newsbeitrag
news:4c9175f1b3e2c6624a44a70d73a73689$1@www.eclipse.org...
> Hi!
>
> I've implemented it the same way but the problem is, that if I call
> UICallback#activate it is not possible anymore to close the equinox
> framework. I hope the problem will be solved if I call the
> UICallback#deactivate. But where should I do this? I think all
> UICallback-methods must be called from within the UI thread.
>
> Greetings,
> Ben
>
Re: Updating a View in an other Session [message #67144 is a reply to message #63901] Thu, 20 December 2007 10:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benedikt.arnold.beyondsoft.de

Hi Frank,

is there any progress on this issue or is there a bugzilla entry regarding
this issue? It seems that the service release did not include a solution.
Right?

Greetings and "Frohe Weihnachten",

Ben


"Frank Appel" <fappel@innoopract.com> schrieb im Newsbeitrag
news:fj10dl$jtr$1@build.eclipse.org...
> Hi,
>
> you are right, but this seems to be a bug within the UICallBack mechanism.
> It seems that the callback thread isn't release at the end of a session.
> This is one of my tasks for this week and hopefully there will be a
> solution with the service release available on friday...
>
>
> Ciao
> Frank
>
>
> "Benedikt Arnold" <benedikt.arnold@beyondsoft.de> schrieb im Newsbeitrag
> news:4c9175f1b3e2c6624a44a70d73a73689$1@www.eclipse.org...
>> Hi!
>>
>> I've implemented it the same way but the problem is, that if I call
>> UICallback#activate it is not possible anymore to close the equinox
>> framework. I hope the problem will be solved if I call the
>> UICallback#deactivate. But where should I do this? I think all
>> UICallback-methods must be called from within the UI thread.
>>
>> Greetings,
>> Ben
>>
>
>
Re: Updating a View in an other Session [message #69387 is a reply to message #67144] Wed, 09 January 2008 16:37 Go to previous message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

unfortunately I catched a bad cold before the service release, so I didn't
have that time to check out this problem thoroughly. I did some improvements
of the callback thread stuff - but obviously not enough. My schedule will
bring me back to this problem at the end of this /beginning of next week.

Ciao
Frank


"Benedikt Arnold" <benedikt.arnold@beyondsoft.de> schrieb im Newsbeitrag
news:fkdfdk$clm$1@build.eclipse.org...
> Hi Frank,
>
> is there any progress on this issue or is there a bugzilla entry regarding
> this issue? It seems that the service release did not include a solution.
> Right?
>
> Greetings and "Frohe Weihnachten",
>
> Ben
>
>
> "Frank Appel" <fappel@innoopract.com> schrieb im Newsbeitrag
> news:fj10dl$jtr$1@build.eclipse.org...
>> Hi,
>>
>> you are right, but this seems to be a bug within the UICallBack
>> mechanism. It seems that the callback thread isn't release at the end of
>> a session. This is one of my tasks for this week and hopefully there will
>> be a solution with the service release available on friday...
>>
>>
>> Ciao
>> Frank
>>
>>
>> "Benedikt Arnold" <benedikt.arnold@beyondsoft.de> schrieb im Newsbeitrag
>> news:4c9175f1b3e2c6624a44a70d73a73689$1@www.eclipse.org...
>>> Hi!
>>>
>>> I've implemented it the same way but the problem is, that if I call
>>> UICallback#activate it is not possible anymore to close the equinox
>>> framework. I hope the problem will be solved if I call the
>>> UICallback#deactivate. But where should I do this? I think all
>>> UICallback-methods must be called from within the UI thread.
>>>
>>> Greetings,
>>> Ben
>>>
>>
>>
>
>
Previous Topic:JSP page communicating with a RAP application
Next Topic:Session Issues
Goto Forum:
  


Current Time: Thu Apr 25 09:19:44 GMT 2024

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

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

Back to the top