# HG changeset patch # User Sascha L. Teichmann # Date 1312822832 0 # Node ID dc7b1ba05cd48f9fed8789f0143ea03656ebb47e # Parent 112f95d7b286c3a898c6be5b45f7db5eac747676 Removed superfluous imports. flys-client/trunk@2472 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 112f95d7b286 -r dc7b1ba05cd4 flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java Mon Aug 08 16:24:07 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java Mon Aug 08 17:00:32 2011 +0000 @@ -16,6 +16,9 @@ import com.smartgwt.client.widgets.layout.Layout; import com.smartgwt.client.widgets.layout.VLayout; +import com.smartgwt.client.widgets.tree.events.LeafClickEvent; +import com.smartgwt.client.widgets.tree.events.LeafClickHandler; + import de.intevation.flys.client.shared.model.Artifact; import de.intevation.flys.client.shared.model.ArtifactDescription; import de.intevation.flys.client.shared.model.Data; @@ -31,6 +34,7 @@ import de.intevation.flys.client.shared.model.DataCageTree; import de.intevation.flys.client.shared.model.DataCageNode; +import de.intevation.flys.client.shared.model.AttrList; import de.intevation.flys.client.client.widgets.tree.AttributedTreeNode; @@ -69,6 +73,20 @@ treeGrid.setWidth100(); treeGrid.setHeight100(); + treeGrid.addLeafClickHandler(new LeafClickHandler() { + @Override + public void onLeafClicked(LeafClickEvent lce) { + AttributedTreeNode atn = (AttributedTreeNode)lce.getLeaf(); + AttrList attrList = atn.getSpecialAttributes(); + if (attrList != null) { + for (int i = 0, N = attrList.size(); i < N; ++i) { + GWT.log("'" + attrList.getKey(i) + + "' -> '" + attrList.getValue(i) + "'"); + } + } + } + }); + layout.addMember(treeGrid); String river = findRiver();