I have a custom query tool that was developed for me, and I would like to pass 2 combobox selections to a print widget to use as the title of a print template in a print widget. I have taken a look at the post where Robert explained how to do this (http://forums.arcgis.com/threads/13863-Communication-between-widgets?highlight=widget+communication), but I still seem to be having a bit trouble. the code I have put together is below. I think the problem may be in how I'm building my array in the custom query widget and/or how I'm trying to recall the items in the array in my print widget. Any suggestions out there?
// CUSTOM QUERY WIDGET
// share data
var layoutArr:ArrayCollection = new ArrayCollection();
layoutArr.addItemAt(String(cboLayerHybrid.selectedLabel), 0);
layoutArr.addItemAt(String(cboLayerTrait.selectedLabel), 1);
addSharedData("LayoutTitle", layoutArr);
// CUSTOM PRINT WIDGET
private function init():void
{
trace("MyPrintWidget init()");
AppEvent.addListener(AppEvent.DATA_PUBLISH, sharedDataUpdated);
}
private function sharedDataUpdated(event:AppEvent):void
{
var data:Object = event.data;
if (data.key == "LayoutTitle")
{
var theObj:Object = data.collection[0];
layoutArr.addItem(theObj);
mapproduct = layoutArr.getItemAt(0);
maptrait = layoutArr.getItemAt(1);
title = mapproduct + maptrait;
}
}
Thanks,Wade