Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java @ 831:9101b4d64666
Datacage: Re-written ToLoad to feature the new filter models.
flys-client/trunk@2539 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 23 Aug 2011 16:58:07 +0000 |
parents | bd56dc762e7f |
children | 29966a53cfeb |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java Tue Aug 23 16:30:22 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java Tue Aug 23 16:58:07 2011 +0000 @@ -45,8 +45,6 @@ import de.intevation.flys.client.shared.model.AttrList; import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; import java.util.List; import java.util.Stack; @@ -69,7 +67,7 @@ protected Layout layout; - protected Map<String, ToLoad> toLoad; + protected ToLoad toLoad; public DatacageWindow(Artifact artifact, User user) { @@ -131,12 +129,12 @@ centerInPage(); - toLoad = new HashMap<String, ToLoad>(); + toLoad = new ToLoad(); triggerTreeBuilding(); } - public Map<String, ToLoad> toLoad() { + public ToLoad getToLoad() { return toLoad; } @@ -155,8 +153,6 @@ } } - GWT.log(toLoad.toString()); - if (!toLoad.isEmpty()) { destroy(); } @@ -166,7 +162,6 @@ TreeNode node = (TreeNode)event.getRecord(); collectToLoads(node); - GWT.log(toLoad.toString()); destroy(); } @@ -179,16 +174,12 @@ node = stack.pop(); String factory = node.getAttribute("factory"); if (factory != null) { // we need at least a factory - String ids = node.getAttribute("ids"); - String artifactId = node.getAttribute("artifact-id"); - String num = node.getAttribute("num"); + String artifact = node.getAttribute("artifact-id"); + String out = node.getAttribute("out"); + String name = node.getName(); + String num = node.getAttribute("num"); - ToLoad tl = toLoad.get(artifactId); - if (tl == null) { - tl = new ToLoad(artifactId); - } - - tl.add(factory, ids, num); + toLoad.add(artifact, factory, out, name, num); } TreeNode [] children = tree.getChildren(node); if (children != null) {