Select to view content in your preferred language

Pass URL parameters in sample viewer

7739
49
11-03-2010 08:08 AM
AaronNash
Deactivated User
There was a previous thread on the old forum to pass search parameters into a url string,
http://forums.esri.com/Thread.asp?c=158&f=2421&t=294907&mc=104#msgid925229
I would like to see if anyone has accomplished this for the new viewer. I have a non-spatial flex application that runs a query on a ArcServer service and returns the results into a datagrid, I then have a button that exports the results into a pdf report. I would like to have another function that takes a value from the datagrid, populates it into a URL string that opens a new browser and zooms to that selected feature. 

thanks,
  Aaron
Tags (2)
0 Kudos
49 Replies
RobertScheitlin__GISP
MVP Emeritus
Aaron,

   As you saw from that post this is not simple... Here are the instructions for all the components that have to be changed in FlexViewer 2.1. Maybe I did not forget anything...
0 Kudos
LeeAllen
Frequent Contributor
Are there any other items that need to be done if using the enhanced search widget?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Lee,

   Yep there is a pretty big difference. I will have to find some time to update for that.
0 Kudos
AaronNash
Deactivated User
Robert, I have been working through this code and have not been able to get it to work. I can compile with no errors and the ext string will zoom to the extent. But when I try to zoom through a query it does not execute a search through the widget. I have been comparing the provided code to the other thread and you had some additions to the IBaseWidget and BaseWidget, is that code still needed for this build?

thanks
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Aaron,

   Are you using the standard search widget? The basewidget stuff from the old code is irrelevant now.
0 Kudos
AaronNash
Deactivated User
I started adding the code into your enhanced search widget and then saw the follow up question from Lee, so i deleted the code and added it into the base search widget included in the sample viewer.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Aaron,

   Make sure you have preload="open" in your config.xml for the search widget then. I am pretty sure my instructions text a couple of posts above covers every thing...
0 Kudos
AaronNash
Deactivated User
Robert,

thanks for replying so quick, I do have the preload set to open. i am going through the code again and everything looks like it is in place. here is a URL to the sample viewer site http://gis.vernon-ct.gov/new_viewer/index.html?MBL=40-0107-00010 you can see the behavior on how it does not search when the link is clicked.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Aaron,

   You should probably zip up all three files that were changed  and let me look at them.
0 Kudos