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".
Anshul,
All the Documentation for the Flex Viewer can be found here:
http://help.arcgis.com/en/webapps/flexviewer/index.html
ViewerContainer.urlConfigParams.yourURLVal
index.html?config=config-mywidget.xml&yourURLVal=hello
ViewerContainer.urlConfigParams.yourURLVal
index.html?config=config-mywidget.xml&yourURLVal=hello
Anshul,
OK to do that use this line of codeViewerContainer.urlConfigParams.yourURLVal
So your url would be something likeindex.html?config=config-mywidget.xml&yourURLVal=hello
The viewer is programmed to decode and store url parameters in the urlConfigParams object.
Anshul,
I thought that it was obvious that yes you would call ViewerContainer.urlConfigParams.yourURLVal from your widgets init function.
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=123
Is this the rite way...?
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=110515000000007000
Again, I would be grateful for any help with this.
JB