Hi all,

I have made some changes in the Nuxeo5 WebApp regarding the LifeCycle
management of the Web components.
Basically :
 - a main conversation is created at session startup
 - a lot of actionListeners have been migrated to conversation scope
 - navigation context variables are now exposed via Event scoped
factories

The purpose of these changes are :

 - allowing multi-tab or multi-window navigation 
  (virtual parallele sessions)
 => test ui can be found when clicking on permLink

 - isolate state information related to multi-screen transations 
  (nested conversation)
 => first example will be implemented on the Workspace creation wizard
 => some tabs may be treated as sub conversations to allow navigation
without loosing state

 - offer the possibility to easily switch between several documents
without loosing the context
  => basic test ui can be found by enabling rendering of the last
h:groupPanel in breadcrumb.xhtml

>From the code point of view the main changes are : 

 - Most actionListeners are now Conversation scoped
 => All actionListeners that maintain a placefull state (ie: tied to
navigationContext) should live in a conversation context

 - the "old sessions variables" are deprecated 
  (selectedItem, selectedWorkspace ...) 
 They are still updated ( for compatibility), but we should use the
navigationContext insteed of these session variables

  => Inside actionListeners : use the navigationContext getters/setters
to manipulate currentDocument, currentWorkspace ...
  (as Seam injection occurs only once per call, using getters is safer)

  => Inside pages you can direcly use the context variables
(currentDocument, currentWorkspace ...) that are outjected at Event
scope

 - Context variables are now generally outjected with the smaller
possible scope
  = Page for @DataModel
  = Event for @Factories
  ==> have fresher context variables

 - remove usage of sessionContext
  As the context is now a tree of nested conversations, if you need to
access the component by it's name :
   - ask for injection
   or
   - use the SeamContextHelper get method 
    (will do a hierarchical lookup)
  If you want to call a Seam component and want to be sure to have an
"injected" instance use SeamComponentCallHelper

Ok, I think this mail is already too long.
Come back to me if you have problems with the recent changes I made.

Tiry

_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to