Hi,I have am working on developing a custom geoprocessing widget. I have been making good progress, but have hit a couple problems that have me stumped.The first involves datagrids. The widget has 3 states -- an input form, a status update window that adds ArcGIS Server messages (from the python script), and a results datagrid. I have the input form and the status updates working fine and now I am trying to get the datagrid working (and eventaully bound to the results graphicLayer). To emphasize... the geoprocessing functionality and return of a graphicLayer result works -- both when I run it from localhost (http://localhost/ViewerCustom/bin-debug/index.html)) as well as when I run it from my test server. However, when I add a generic sample datagrid using the follow code, it works fine when I am debugging locally (running it localhost) but, when I copy the .swf onto my test server, the widget won't even load up. If I look in Firebug the GET CustomWidget.swf response is blank... nothing happens. <s:Group id="resultsState" includeIn="Results" width="100%" height="100%" y="20"> <s:Panel width="100%" height="100%"> <s:DataGrid id="resultGrid" width="100%" height="100%" requestedRowCount="5"> <s:ArrayCollection> <s:DataItem key="1000" name="Abrasive" price="100.11" call="false"/> <s:DataItem key="1001" name="Brush" price="110.01" call="true"/> <s:DataItem key="1002" name="Clamp" price="120.02" call="false"/> <s:DataItem key="1003" name="Drill" price="130.03" call="true"/> <s:DataItem key="1004" name="Epoxy" price="140.04" call="false"/> <s:DataItem key="1005" name="File" price="150.05" call="true"/> <s:DataItem key="1006" name="Gouge" price="160.06" call="false"/> <s:DataItem key="1007" name="Hook" price="170.07" call="true"/> <s:DataItem key="1008" name="Ink" price="180.08" call="false"/> <s:DataItem key="1009" name="Jack" price="190.09" call="true"/> </s:ArrayCollection> </s:DataGrid> </s:Panel> </s:Group>
However, if I take out the data grid and replace it with a text message, the widget loads fine when I copy the .swf over to my test server, the text is visible in the "Results" state , and the rest of the functionality continues to work. <s:Group id="resultsState" includeIn="Results" width="100%" height="100%" y="20"> <s:Panel width="100%" height="100%"> <s:TextArea text="test test test... this works fine"/> </s:Panel> </s:Group>
The test server is running the Flex Viewer 2.5 that is customized using config files to point to my URLs, change the color scheme, etc. On my localhost, I am running the mostly un-configured Viewer 2.5 source code (I did the minimal amount of configuration necessary to plug in my URL and load my custom widget). In both cases, I am consuming the apps on the same desktop computer with Firefox & the most recent debugger version of Flash.So my question is: what else might be different between running an app on localhost and a server that could effect how a datagrid is handled? Is there some other setting or option I should look into? Any suggestions would be most welcome.A second and mostly unrelated question... In the same widget, if I add scroll bars (by wrapping a S:Scroller around the widget group the Design View in Flash BUilder gets grayed out. This seems odd, but not critical. Again, tahnks in advance for any insight. <viewer:WidgetTemplate id="myCustomWidget" includeIn="Params,Processing, Results" width="450" height="600" minWidth.Params="415" minHeight.Params="150"> <s:Scroller width="100%" height="100%" y="25" horizontalScrollPolicy="on" verticalScrollPolicy="on"> <s:Group id="widgetGrp" width="100%" height="100%"> <s:Group id="paramsArea" width="100%" height="100%" y="-35" includeIn="Params"> <s:TextInput id="filter" x="68" y="48" text=""OBJECTID"<200" width="289" height="20"/> <s:Button id="submit" x="190" y="720" label="Submit" click="submit_clickHandler(event)"/> <s:Button id="clear" x="270" y="720" label="Clear Results" click="clear_clickHandler(event)"/> </s:Group> <s:Group id="processArea" width="100%" height="100%" includeIn="Processing"> <s:TextArea id="statusArea" width="100%" height="100%" y="20" alpha="0.7" verticalScrollPolicy="off"/> </s:Group> <s:Group id="resultsArea" includeIn="Results" width="100%" height="100%" y="20"> <s:Panel width="100%" height="100%"> <s:TextArea text="test test test... this works fine"/> </s:Panel> </s:Group> </s:Group> </s:Scroller> </viewer:WidgetTemplate>