diff flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java @ 270:d01b0d81b92a

Parse the facets of a Collection and distinguish between an ordinary OutputMode and an ExportMode (new). flys-client/trunk@1895 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 11 May 2011 09:11:40 +0000
parents dd1dad2ff94e
children 8264b02091ef
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Wed May 11 07:32:08 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Wed May 11 09:11:40 2011 +0000
@@ -18,6 +18,7 @@
 import de.intevation.flys.client.shared.model.Artifact;
 import de.intevation.flys.client.shared.model.ArtifactDescription;
 import de.intevation.flys.client.shared.model.Collection;
+import de.intevation.flys.client.shared.model.ExportMode;
 import de.intevation.flys.client.shared.model.OutputMode;
 import de.intevation.flys.client.shared.model.User;
 
@@ -353,14 +354,16 @@
      * @param name The name and title of the output.
      */
     protected void addOutputTab(String name, OutputMode out) {
-        // XXX Maybe we should change this determination of visual outputs. I am
-        // not sure if the mimetype is the correct value for this!
+        if (out instanceof ExportMode) {
+            ExportMode export = (ExportMode) out;
 
-        if (out.getMimeType().equals("text/plain")) {
-            TableDataPanel p = new TableDataPanel();
-            p.setUuid(collection.identifier());
-            p.setName(out.getName());
-            parameterList.setPanel (p);
+            if (export.getFacet("csv") != null) {
+                TableDataPanel p = new TableDataPanel();
+                p.setUuid(collection.identifier());
+                p.setName(out.getName());
+                parameterList.setPanel (p);
+            }
+
             return;
         }
 

http://dive4elements.wald.intevation.org