FE tool - enable FeatureGrid pluging for trace layer

Bug #879297 reported by Ben Wyss
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Fix Released
High
Anton Gritsay

Bug Description

As bug 877167 can not be build at the moment, a workaround is to allow the user to select multiple traces from the grid using FeatureGrid.
Documentation: http://opengeo.github.com/gxp/lib/plugins/FeatureGrid.html

Example:
http://gxp.opengeo.org/master/examples/featuregrid.html
http://gxp.opengeo.org/master/examples/featuregrid.js

also please be aware of this resource: http://workshops.opengeo.org/gxp/

Tags: earth faulted
Ben Wyss (bmwyss)
description: updated
summary: - FE tool - enable capabilitiesgrid pluging for trace layer
+ FE tool - enable FeatureGrid pluging for trace layer
Changed in openquake:
status: New → In Progress
John Tarter (toh2)
Changed in openquake:
assignee: Benjamin Max Wyss III (bmwyss) → Anton Gritsay (angri)
importance: Medium → High
Ben Wyss (bmwyss)
description: updated
Revision history for this message
Ben Wyss (bmwyss) wrote :

To allow for the user to select multiple features from a grid, this project is using 'xtype grid' https://github.com/AIFDR/tsudat2-client/blob/master/app/static/script/app/TsuDat2/Scenario.js

Revision history for this message
Anton Gritsay (angri) wrote :

This patch allows traces to be selected by clicking on on the map (not only in the grid).

Revision history for this message
Anton Gritsay (angri) wrote :

The following change to gxp code allows to enable multiselect in a grid:

diff --git a/src/script/plugins/FeatureGrid.js b/src/script/plugins/FeatureGrid.js
index 4f7478a..7ed23be 100644
--- a/src/script/plugins/FeatureGrid.js
+++ b/src/script/plugins/FeatureGrid.js
@@ -145,6 +145,7 @@ gxp.plugins.FeatureGrid = Ext.extend(gxp.plugins.ClickableFeatures, {
         // a minimal SelectFeature control - used just to provide select and
         // unselect, won't be added to the map unless selectOnMap is true
         this.selectControl = new OpenLayers.Control.SelectFeature(featureManager.featureLayer);
+ this.selectControl.multiple = true;
         if (this.selectOnMap) {
              if (featureManager.paging) {
                 this.selectControl.events.on({

Somehow we need to add some hook to FeatureGrid.addOutput() call or shortly after it. Listening to "activate" event doesn't help because it is called before addOutput().

Anton Gritsay (angri)
Changed in openquake:
status: In Progress → Fix Committed
Changed in openquake:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.