where to do the remote service call [message #26143] |
Sun, 17 May 2009 19:14  |
Eclipse User |
|
|
|
Originally posted by: kessels.sjoerd.gmail.com
Hi,
I have a view and corresponding controller that displays a list of projects.
In the controller's configureRidgets() method I placed the call to the
remote service that returns the list of projects. This works.
However the second time I open the view via the navigation menu the
configureRidgets() method is not called anymore, which makes sense. So my
view is not repopulated.
What would be the best place to place my remote service call so I am able to
call it every time the view (navigationnode) gets activated while still
being able to ge to the controller to update the model that is bound to the
table?
Is there something like a listener of navigationnodes? And where would I
place the listener?
Thanks,
Sjoerd
|
|
|
|
|
Re: where to do the remote service call [message #26342 is a reply to message #26304] |
Mon, 18 May 2009 18:27  |
Eclipse User |
|
|
|
Originally posted by: kessels.sjoerd.gmail.com
Thanks! Both work fine.
Thanks,
Sjoerd
"Christian Campo" <christian.campo@compeople.de> wrote in message
news:4A1164AC.9000503@compeople.de...
> Hi Sjoerd,
>
> you can use the NavigationNodeListener for a number of different event you
> get for the nodes. For the problem that you describe you might as well
> overwrite the method afterBind in the SubModuleController (make sure you
> call super.afterBind()) and that method "afterBind" gets called each and
> every time that SubModule is activated.
>
> cheers
> christian
>
>
> Thorsten Schenkel schrieb:
>> Hi Sjoerd,
>>
>> you can add to every node of the navigation a listener
>> (NavigationNodeListener).
>> So you will be informed after every change of status of the navigation
>> node.
>>
>> example:
>>
>>
>> @Override
>> public void setNavigationNode(ISubModuleNode navigationNode) {
>>
>> super.setNavigationNode(navigationNode);
>>
>> getNavigationNode().addListener(new SubModuleNodeListener() {
>> @Override
>> public void afterDeactivated(ISubModuleNode source) {
>> super.afterDeactivated(source);
>> getStatusLine().clear();
>> }
>> });
>> }
>>
>> greetings
>>
>> Thorsten
>>
>>
>> Sjoerd Kessels schrieb:
>>> Hi,
>>>
>>> I have a view and corresponding controller that displays a list of
>>> projects. In the controller's configureRidgets() method I placed the
>>> call to the remote service that returns the list of projects. This
>>> works.
>>> However the second time I open the view via the navigation menu the
>>> configureRidgets() method is not called anymore, which makes sense. So
>>> my view is not repopulated.
>>>
>>> What would be the best place to place my remote service call so I am
>>> able to call it every time the view (navigationnode) gets activated
>>> while still being able to ge to the controller to update the model that
>>> is bound to the table?
>>>
>>> Is there something like a listener of navigationnodes? And where would I
>>> place the listener?
>>>
>>> Thanks,
>>>
>>> Sjoerd
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02207 seconds