Opened 16 years ago
Closed 16 years ago
#630 closed defect (fixed)
Fusion search widget bug: solution proposed
Reported by: | poulet1212 | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Fusion | Version: | 2.0.1 |
Severity: | critical | Keywords: | |
Cc: | chrisclaydon | External ID: |
Description
Hi all, already described the problem here: http://trac.osgeo.org/mapguide/ticket/623
I found a fix that worked.
First, looking at widgets/Search/Search.templ:
function CellClicked(sel) { var map = GetParent().Fusion.getMapByName(mapName); map.setSelection(sel, false, true); }
Should be changed like this to match correctly the API:
function CellClicked(sel) { var map = GetParent().Fusion.getMapByName(mapName); map.setSelection(sel, true); }
Second, the call to setSelection from map object is (lib/Map.js):
setSelection: function(selText, requery, zoomTo) { for (var i=0; i<this.aMaps.length; i++ ) { this.aMaps[i].setSelection(selText, requery, zoomTo); } }
Should be changed like this to match correctly the API:
setSelection: function(selText, zoomTo) { for (var i=0; i<this.aMaps.length; i++ ) { this.aMaps[i].setSelection(selText, zoomTo); } },
Finally, setSelection from Mapguide.js has for params:
'selection': encodeURIComponent(selText),
it's proposed to change like this:
'selection': selText,
encodeURIComponent encodes twice the params and that make the call-back error happend.
We see that setSelection has finally in Mapguide.js only 2 parameters: selText, zoomTo. But in Map.js and Search.templ it was called with 3 parameters: selText, requery, zoomTo
Quite confusing for a mistake.
Rémy
Change History (5)
comment:1 by , 16 years ago
Cc: | added |
---|
comment:2 by , 16 years ago
comment:4 by , 16 years ago
Not sure what you are asking here. I just checked the Fusion SVN and it is already committed there. That is, the code was submitted and ticet 89 is set as fixed.
comment:5 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
These changes have been applied in the referenced fusion repository.
Thanks Rémy, I've filed http://trac.osgeo.org/fusion/ticket/89 to get this into fusion. This ticket should stay open until a new version of fusion with the appropriate fix is put into mapguide svn.