Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWidget.java @ 4131:360e22afb98b
Cosmetics, warnings and minor TODOs.
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Mon, 15 Oct 2012 00:04:35 +0200 |
parents | 9b29facddbd1 |
children | 7558a18ceb23 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWidget.java Sun Oct 14 14:44:28 2012 +0200 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWidget.java Mon Oct 15 00:04:35 2012 +0200 @@ -1,48 +1,35 @@ package de.intevation.flys.client.client.ui; -import de.intevation.flys.client.client.event.DatacageHandler; -import de.intevation.flys.client.client.event.DatacageDoubleClickHandler; - import com.google.gwt.core.client.GWT; - import com.google.gwt.user.client.rpc.AsyncCallback; +import com.smartgwt.client.types.SelectionStyle; +import com.smartgwt.client.types.TreeModelType; import com.smartgwt.client.util.SC; - import com.smartgwt.client.widgets.Button; - +import com.smartgwt.client.widgets.events.ClickEvent; +import com.smartgwt.client.widgets.events.ClickHandler; +import com.smartgwt.client.widgets.grid.HoverCustomizer; +import com.smartgwt.client.widgets.grid.ListGridRecord; +import com.smartgwt.client.widgets.grid.events.RecordDoubleClickEvent; +import com.smartgwt.client.widgets.grid.events.RecordDoubleClickHandler; +import com.smartgwt.client.widgets.layout.VLayout; import com.smartgwt.client.widgets.tree.Tree; import com.smartgwt.client.widgets.tree.TreeGrid; import com.smartgwt.client.widgets.tree.TreeNode; -import com.smartgwt.client.types.SelectionStyle; -import com.smartgwt.client.types.TreeModelType; - -import com.smartgwt.client.widgets.layout.VLayout; - -import com.smartgwt.client.widgets.events.ClickHandler; -import com.smartgwt.client.widgets.events.ClickEvent; - -import com.smartgwt.client.widgets.grid.ListGridRecord; - -import com.smartgwt.client.widgets.grid.events.RecordDoubleClickEvent; -import com.smartgwt.client.widgets.grid.events.RecordDoubleClickHandler; - -import com.smartgwt.client.widgets.grid.HoverCustomizer; - -import de.intevation.flys.client.shared.model.Artifact; -import de.intevation.flys.client.shared.model.User; -import de.intevation.flys.client.shared.model.ToLoad; - +import de.intevation.flys.client.client.Config; import de.intevation.flys.client.client.FLYSConstants; -import de.intevation.flys.client.client.Config; - +import de.intevation.flys.client.client.event.DatacageDoubleClickHandler; +import de.intevation.flys.client.client.event.DatacageHandler; import de.intevation.flys.client.client.services.MetaDataService; import de.intevation.flys.client.client.services.MetaDataServiceAsync; - +import de.intevation.flys.client.shared.model.Artifact; +import de.intevation.flys.client.shared.model.AttrList; +import de.intevation.flys.client.shared.model.DataCageNode; 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.shared.model.ToLoad; +import de.intevation.flys.client.shared.model.User; import java.util.ArrayList; import java.util.List; @@ -259,7 +246,7 @@ return toLoad; } - ListGridRecord [] selection = treeGrid.getSelection(); + ListGridRecord [] selection = treeGrid.getSelectedRecords(); if (selection != null) { for (ListGridRecord record: selection) { @@ -281,7 +268,7 @@ return new String[] {}; } - ListGridRecord [] selection = treeGrid.getSelection(); + ListGridRecord [] selection = treeGrid.getSelectedRecords(); if (selection == null) { return new String[] {}; @@ -401,11 +388,13 @@ outs, parameters, new AsyncCallback<DataCageTree>() { + @Override public void onFailure(Throwable caught) { GWT.log("Could not load meta data."); SC.warn(caught.getMessage()); } + @Override public void onSuccess(DataCageTree dcTree) { GWT.log("Successfully loaded meta data."); IdGenerator idGenerator = new IdGenerator();