View persistence between sessions. [message #93137] |
Thu, 12 June 2008 16:01  |
Eclipse User |
|
|
|
Hi,
Using 1.1RC3
We are trying to persist a view content between user sessions. This view manage what could be considered "bookmarks"
within the application.
What we have done yet:
in WorkbenchAdvisor, getWorkbenchConfigurer().setSaveAndRestore(true);
in our view, we implements the init(IViewSite, IMemento) and saveState(IMemento) methods.
init is called upon the first display of the view. saveState is never called. Is this because it is not implemented yet?
Is using the IMemento/IPersistable interface the best way to achieve this? What would be the best way?
Thanks,
Patrick
|
|
|
Re: View persistence between sessions. [message #93349 is a reply to message #93137] |
Fri, 13 June 2008 09:20   |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Patrick,
when explicitly closing the workbench, saveState() is called. That's
what I observed. Not entirely sure, but I it should also be called
when a session-timeout occurs which in turn closes the workbench.
What are you doing to "end" the session/workbench?
Cheers,
Rüdiger
Patrick Turcotte wrote:
> Hi,
>
> Using 1.1RC3
>
> We are trying to persist a view content between user sessions. This view
> manage what could be considered "bookmarks" within the application.
>
> What we have done yet:
>
> in WorkbenchAdvisor, getWorkbenchConfigurer().setSaveAndRestore(true);
>
> in our view, we implements the init(IViewSite, IMemento) and
> saveState(IMemento) methods.
>
> init is called upon the first display of the view. saveState is never
> called. Is this because it is not implemented yet?
>
>
> Is using the IMemento/IPersistable interface the best way to achieve
> this? What would be the best way?
>
> Thanks,
>
> Patrick
|
|
|
Re: View persistence between sessions. [message #93405 is a reply to message #93349] |
Fri, 13 June 2008 11:17   |
Eclipse User |
|
|
|
Hi,
> when explicitly closing the workbench, saveState() is called. That's
> what I observed. Not entirely sure, but I it should also be called when
> a session-timeout occurs which in turn closes the workbench.
>
> What are you doing to "end" the session/workbench?
>
RWT.getRequest().getSession().setMaxInactiveInterval(1);
> Cheers,
> Rüdiger
>
>
>
> Patrick Turcotte wrote:
>> Hi,
>>
>> Using 1.1RC3
>>
>> We are trying to persist a view content between user sessions. This
>> view manage what could be considered "bookmarks" within the application.
>>
>> What we have done yet:
>>
>> in WorkbenchAdvisor, getWorkbenchConfigurer().setSaveAndRestore(true);
>>
>> in our view, we implements the init(IViewSite, IMemento) and
>> saveState(IMemento) methods.
>>
>> init is called upon the first display of the view. saveState is never
>> called. Is this because it is not implemented yet?
>>
>>
>> Is using the IMemento/IPersistable interface the best way to achieve
>> this? What would be the best way?
>>
>> Thanks,
>>
>> Patrick
|
|
|
Re: View persistence between sessions. [message #93448 is a reply to message #93405] |
Fri, 13 June 2008 14:45  |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Patrick,
just to be sure, could you try
RWT.getRequest().getSession().setMaxInactiveInterval( 20 );
?
Cheers,
Rüdiger
Patrick Turcotte wrote:
> Hi,
>
>> when explicitly closing the workbench, saveState() is called. That's
>> what I observed. Not entirely sure, but I it should also be called
>> when a session-timeout occurs which in turn closes the workbench.
>>
>> What are you doing to "end" the session/workbench?
>>
>
> RWT.getRequest().getSession().setMaxInactiveInterval(1);
>
>> Cheers,
>> Rüdiger
>>
>>
>>
>> Patrick Turcotte wrote:
>>> Hi,
>>>
>>> Using 1.1RC3
>>>
>>> We are trying to persist a view content between user sessions. This
>>> view manage what could be considered "bookmarks" within the application.
>>>
>>> What we have done yet:
>>>
>>> in WorkbenchAdvisor, getWorkbenchConfigurer().setSaveAndRestore(true);
>>>
>>> in our view, we implements the init(IViewSite, IMemento) and
>>> saveState(IMemento) methods.
>>>
>>> init is called upon the first display of the view. saveState is never
>>> called. Is this because it is not implemented yet?
>>>
>>>
>>> Is using the IMemento/IPersistable interface the best way to achieve
>>> this? What would be the best way?
>>>
>>> Thanks,
>>>
>>> Patrick
|
|
|
Powered by
FUDForum. Page generated in 0.03036 seconds