Set focus to search field for specimen editor
authorPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 18 Aug 2016 12:07:49 +0000 (14:07 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 18 Aug 2016 12:07:49 +0000 (14:07 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/searchFilter/DerivateSearchCompositeController.java

index 904bee8c81f7ebb58fd2e525e17857c4f83594f6..e4df386b14e82ed34774039cf79d949b8318592d 100644 (file)
@@ -396,7 +396,6 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
 
     @Override
     public void setFocus() {
-        viewer.getControl().setFocus();
         //make sure to bind again if maybe in another view the conversation was unbound
         if(conversation!=null && !conversation.isBound()){
             conversation.bind();
@@ -404,6 +403,7 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
         if(cdmEntitySession != null) {
             cdmEntitySession.bind();
         }
+        derivateSearchCompositeController.setFocusOnSearchField();
     }
 
     @Override
index 3f07f19c68af590d105c6fb9649c4f8f10feaa0d..3fe068faf0fec05d54db7c213509c93d3480f49c 100644 (file)
@@ -178,5 +178,9 @@ public class DerivateSearchCompositeController implements Listener{
             derivateSearchComposite.getComboTaxonAssignment().setEnabled(false);
         }
     }
+    
+    public void setFocusOnSearchField(){
+       derivateSearchComposite.getSearchField().setFocus();
+    }
 
 }