Project

General

Profile

« Previous | Next » 

Revision d81d2ff3

Added by Cherian Mathew almost 9 years ago

corrected usage of service calls returning update/delete result objects

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewPart.java
113 113
	private IContextListener contextListener;
114 114
	private final CdmFormFactory formFactory;
115 115
	private Text text_filter;
116
	private ICdmEntitySession cdmEntitySession;
116 117

  
117 118
	private PolytomousKeyViewPartDataChangeBehavior dataChangeBehavior;
118 119

  
......
197 198
	private void setInput() {
198 199
		conversation = CdmStore.createConversation();
199 200
		conversation.registerForDataStoreChanges(this);
201
		cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
202
        cdmEntitySession.registerForDataStoreChanges(this);
200 203
		List<PolytomousKey> input = CdmStore.getService(IPolytomousKeyService.class).list(PolytomousKey.class, null, null, null, null);
201 204
		if(!viewer.getControl().isDisposed()){
202 205
		    viewer.setInput(input);
......
208 211
	 */
209 212
	@Override
210 213
	public void setFocus() {
214
	    if(cdmEntitySession != null) {
215
            cdmEntitySession.bind();
216
        }
211 217
		viewer.getControl().setFocus();
212 218
	}
213 219

  
......
240 246
	        conversation.unregisterForDataStoreChanges(this);
241 247
	        conversation.close();
242 248
	        CdmStore.getContextManager().removeContextListener(contextListener);
249
	    }
250
	    if(cdmEntitySession != null) {
251
	        cdmEntitySession.dispose();
243 252
	    }
244 253
		super.dispose();
245 254
	}
......
283 292
     */
284 293
    @Override
285 294
    public ICdmEntitySession getCdmEntitySession() {
286
        // TODO Auto-generated method stub
287
        return null;
295
        return cdmEntitySession;
288 296
    }
289 297

  
290 298
    /* (non-Javadoc)
291 299
     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
292 300
     */
293 301
    @Override
294
    public <T extends CdmBase> List<T> getRootEntities() {
295
        // TODO Auto-generated method stub
296
        return null;
302
    public  List<PolytomousKey> getRootEntities() {
303
        return getKeys();
297 304
    }
298 305

  
299 306
}

Also available in: Unified diff