ref #4545: add TeamOrPersonSelectionDialog
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / dialog / selection / AgentSelectionDialog.java
index 9b781f37e7f97d1e77f3b9e01c5585e96a1f1390..a9cc19997624da805694ab79c77623f899d41130 100644 (file)
@@ -31,8 +31,8 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @created Sep 10, 2009
  * @version 1.0
  */
-public class AgentSelectionDialog extends
-               AbstractFilteredCdmResourceSelectionDialog<AgentBase> {
+public class AgentSelectionDialog<T extends AgentBase> extends
+               AbstractFilteredCdmResourceSelectionDialog {
 
        /**
         *
@@ -57,7 +57,7 @@ public class AgentSelectionDialog extends
                AgentBase entity, boolean selectTeamMember) {
                AgentSelectionDialog dialog = new AgentSelectionDialog(shell, //conversation,
                                "Choose Agent", false, AgentSelectionDialog.class.getCanonicalName(), entity, selectTeamMember);
-               return getSelectionFromDialog(dialog);
+               return (AgentBase) getSelectionFromDialog(dialog);
        }
 
        /**
@@ -89,7 +89,7 @@ public class AgentSelectionDialog extends
                 */
                @Override
         public String getText(Object element) {
-                       AgentBase agent = getCdmObjectByUuid(((UuidAndTitleCache<AgentBase>) element).getUuid());
+                   AgentBase agent = (AgentBase) getCdmObjectByUuid(((UuidAndTitleCache<AgentBase>) element).getUuid());
                        if (agent instanceof INomenclaturalAuthor) {
                                return "Nomenclatural title: '" + ((INomenclaturalAuthor) agent).getNomenclaturalTitle() + "'";
                        } else {