Oops, my mistake! Yes, 2.5. I didn't realize that was a built in capability. I was trying to make that much more difficult!
I'm currently using 2.6.
Hopefully someone can help me with the whole passing a parameter to a flex viewer. I've been pouring over the forums and codes that people have posted regarding such and issue, and I've gotten my code to compile without errors. However, when I enter the query parameters my site doesn't perform the search. It just pulls up to it's normal extent with nothing selected. If someone has some time to help me troubleshoot my problem I would greatly appreciate it.I am attaching some of the code pages for reference. The url that I use for testing is: http://gis-server.greatriv.com/christiancoflex2/index.html?q=DataViewer!70*v=110515000000007000Again, I would be grateful for any help with this. JB
What i have done is declared a blank variable in my WidgetConfig as below<myVar></myVar>Then on init() i accept the value and assign it to a string.Bind this value onto a text field.and my url will be index.html?config=config-myWidget.xml&myVar=123Is this the rite way...?
Anshul, I thought that it was obvious that yes you would call ViewerContainer.urlConfigParams.yourURLVal from your widgets init function.
ViewerContainer.urlConfigParams.yourURLVal
index.html?config=config-mywidget.xml&yourURLVal=hello
Anshul, OK to do that use this line of code ViewerContainer.urlConfigParams.yourURLValSo your url would be something like index.html?config=config-mywidget.xml&yourURLVal=helloThe viewer is programmed to decode and store url parameters in the urlConfigParams object.
Anshul, All the Documentation for the Flex Viewer can be found here:http://help.arcgis.com/en/webapps/flexviewer/index.html
Anshul, All the same stuff you have in your Config.xml but make sure the widget that you are wanting to load is set to preload="open".
I have only two xml i.eConfig.xml and Config-all.xml
Anshul, OK silly question but do you actually have a config-MyWidgetName.xml file in your Flex Viewer??? If you have not yet created one than that is your issue.
Anshul, You have me a little confused now... Say you want to open the viewer with the identify widget opened then you would have a url like this:http://gis.calhouncounty.org/FlexViewer2.4/index.html?config=config-identify.xmland in the config-identify.xml it would have preload="open" but if you did not want the identify widget opened then you would not use that particular config file (config-identify.xml), you would use another.
Anshul, Before I point you down the road of making changes to the source code let me make sure you are aware of the ability that is built into Flex Viewer for loading a particular config file from the url. Basically in your scenario you could have multiple config files on your server. Take for example this url of mine that loads the viewer with my eSearch widget preloaded.http://gis.calhouncounty.org/FlexViewer2.4/index.html?config=config-eSearch.xmland the same exact viewer using a different config file to preload my TOC Widget.http://gis.calhouncounty.org/FlexViewer2.4/index.html?config=config-toc.xml
Nathan,Why are you trying it this old way? The eSearch Widget has this built in now with not changes to the map manager code.
popUpRenderer.setStyle("skinClass", widgets.eSearch.PopUpRendererSkin);
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.