diff artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/ScenarioTypeState.java @ 9271:f48a8dc78529

uinfo.salix details
author gernotbelger
date Thu, 19 Jul 2018 13:39:27 +0200
parents 2f5052835b76
children 1b2623dff742
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/ScenarioTypeState.java	Thu Jul 19 13:36:38 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/ScenarioTypeState.java	Thu Jul 19 13:39:27 2018 +0200
@@ -3,9 +3,15 @@
 
 import java.util.LinkedHashMap;
 
+import org.dive4elements.artifactdatabase.ProtocolUtils;
+import org.dive4elements.artifactdatabase.data.StateData;
 import org.dive4elements.artifacts.Artifact;
+import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.CallMeta;
+import org.dive4elements.artifacts.common.utils.XMLUtils;
+import org.dive4elements.river.artifacts.resources.Resources;
 import org.dive4elements.river.artifacts.states.RadioSelect;
+import org.w3c.dom.Element;
 
 /**
  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
@@ -26,4 +32,22 @@
         return entries;
 
     }
+
+    @Override
+    protected Element createData(final XMLUtils.ElementCreator cr, final Artifact artifact, final StateData data, final CallContext context) {
+        final Element select = ProtocolUtils.createArtNode(cr, "select", null, null);
+
+        cr.addAttr(select, "name", data.getName(), true);
+
+        final Element label = ProtocolUtils.createArtNode(cr, "label", null, null);
+
+        label.setTextContent(Resources.getMsg(context.getMeta(), "state.uinfo.load.scenario_type"));
+
+        final Element description = ProtocolUtils.createArtNode(cr, "description", null, null);
+        description.setTextContent("TEST");
+        select.appendChild(description);
+        select.appendChild(label);
+
+        return select;
+    }
 }
\ No newline at end of file

http://dive4elements.wald.intevation.org