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.xml
and 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
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.xml
and 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,
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.
I have only two xml i.e
Config.xml and Config-all.xml