[fusion-users] OnSelectionChanged - where to find in Fusion

Mike Adair madair at dmsolutions.ca
Wed Apr 28 14:00:02 EDT 2010


Andrei,

I suspect what you want is to register with the 
Fusion.Event.MAP_SELECTION_ON event.  This gets fired whenever there is 
a new selection.  You can have a look at the widgets/SelectionInfo.js 
for an example of how to use it.  In Fusion, the Select widget does the 
actual selection and then fires this event so that other widgets can 
update themselves with the new selection info.

Mike

miansi wrote:
> Hello,
>
> I am trying to migrate AJAX viewer to Fusion one. Currently I have custom
> logic in mainframe.temp (C:\Program Files
> (x86)\OSGeo\MapGuide\Web\www\viewerfiles\mainframe.templ):
>
> function OnSelectionChanged()
> {
>     var selCount = GetMapFrame().GetSelectedCount();
>
> 	if(selCount>0)
> 	{
> 		document.all.tags("Frameset").item(1).cols = '*,240';
>
> 		params = new Array("selection", GetMapFrame().GetSelectionXML(),
>        		"sessionId", GetMapFrame().GetSessionId(),
> 	        "fromMap", true
> 	    );           
>     	  
> GetFormFrame().Submit('http://localhost/Web/Pages/MapViewer/TaskPane/SelectionSummary.aspx',
> params, "taskPaneFrame");    
> 	}
> 	else
> 	{
> 		document.all.tags("Frameset").item(1).cols = '*,0';
> 	}
> ...
>
> As you can see - on selection change if number of selected features more
> than 0 I will open my custom page in AJAX Viewer task pane which will
> process selection the way I want.
>
> How I can achieve same results in Fusion? Is there any alternative in
> fusionSF.js to OnSelectionChanged method? Or I should use some another way
> to implement desired functionality?
>
>
> Thank you,
>
> Andrei
>   

-- 
   Michael Adair
   Senior Software Architect
   DM Solutions Group Inc.

   Office: (613) 565-5056 x26
   madair at dmsolutions.ca
   http://www.dmsolutions.ca
   http://research.dmsolutions.ca




More information about the fusion-users mailing list