Hello,
I am trying to implement the "Print Widget" in this application right here:
http://www.arcgis.com/home/item.html?id=442c350d47644325a99ad04a85733117
The problem is this application does not have a config.xml neither a 'widgetcontainer' so I don't know how to call it in the application.
I've tried to call it by:
SiteContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_MENU_CLICKED,false, false, PrintWidget));
but it doesn't work because I can't recognize the PrintWidget.xml.
Did someone ever try to do something like this?
Thanks in advance,
Vanessa
Vanessa,
What version of Flex Viewer are you using? Looking at your code that is for an older version of the viewer.
This is what your code should look like in 3.x:
var id:Number = ViewerContainer.getInstance().widgetManager.getWidgetId("PrintWidget"); AppEvent.dispatch(AppEvent.WIDGET_RUN, id);