private IContextListener contextListener;
private final CdmFormFactory formFactory;
private Text text_filter;
+ private ICdmEntitySession cdmEntitySession;
private PolytomousKeyViewPartDataChangeBehavior dataChangeBehavior;
private void setInput() {
conversation = CdmStore.createConversation();
conversation.registerForDataStoreChanges(this);
+ cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
+ cdmEntitySession.registerForDataStoreChanges(this);
List<PolytomousKey> input = CdmStore.getService(IPolytomousKeyService.class).list(PolytomousKey.class, null, null, null, null);
if(!viewer.getControl().isDisposed()){
viewer.setInput(input);
*/
@Override
public void setFocus() {
+ if(cdmEntitySession != null) {
+ cdmEntitySession.bind();
+ }
viewer.getControl().setFocus();
}
conversation.unregisterForDataStoreChanges(this);
conversation.close();
CdmStore.getContextManager().removeContextListener(contextListener);
+ }
+ if(cdmEntitySession != null) {
+ cdmEntitySession.dispose();
}
super.dispose();
}
*/
@Override
public ICdmEntitySession getCdmEntitySession() {
- // TODO Auto-generated method stub
- return null;
+ return cdmEntitySession;
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
+ */
+ @Override
+ public List<PolytomousKey> getRootEntities() {
+ return getKeys();
}
}