Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWidget.java @ 1268:d0500e993218
Force a single selection in the datacage widget for DEMs and WSPs.
flys-client/trunk@2821 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 26 Sep 2011 11:04:00 +0000 |
parents | 07aa1f504491 |
children | e8bb11976c70 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWidget.java Mon Sep 26 09:08:47 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWidget.java Mon Sep 26 11:04:00 2011 +0000 @@ -15,6 +15,7 @@ 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; @@ -162,6 +163,16 @@ } + public void setIsMutliSelectable(boolean multi) { + if (multi) { + treeGrid.setSelectionType(SelectionStyle.MULTIPLE); + } + else { + treeGrid.setSelectionType(SelectionStyle.SINGLE); + } + } + + /** * @param handler Handler to be added (notified on add-action). */