@Name(value="transientStateCleaner") @Scope(value=EVENT) @Install(precedence=10) public class TransientStateCleaner extends Object implements Serializable
This can happen if a low level Listener decides to RollBack the transaction.
In this case the DocumentModel won't be saved to the DB, but since the ApplyModelValue JSF phase has run, the DocumentModel will have been modified resulting in a Dirty state inside the Context.
We want to keep this dirty state as long as we stay on the same Tab, but as soon as we navigate somewhere else, we must reset the state.
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log |
protected NavigationContext |
navigationContext |
Constructor and Description |
---|
TransientStateCleaner() |
Modifier and Type | Method and Description |
---|---|
void |
flushTransientStateIfNeeded() |
@In(create=true, required=false) protected transient NavigationContext navigationContext
protected static final org.apache.commons.logging.Log log
public TransientStateCleaner()
@Observer(value="currentTabChanged", create=true) public void flushTransientStateIfNeeded()
Copyright © 2018 Nuxeo. All rights reserved.