flex - Communication between widgets -
i'm new in flex, , im working on webmapping application using flex 4.6, java, , sql server database, i'm trying make communication between wigdets, copy each selected item of combobox in widget1, , show in textinput in widget2, followed steps explaind robert here http://forums.arcgis.com/threads/138...+communication no luck, problem i'm facing can't call components of first widget (textinput, button....) second widget, underlined !!
at jump found change made,
widget 1
var layoutarr:arraycollection = new arraycollection(); private function widgetcommunication1():void { addshareddata("liste des chapitres", layoutarr); }
widget 2
<viewer:basewidget xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:viewer="com.esri.viewer.*" width="638" height="552" creationcomplete="application1_applicationcompletehandler(event)" initialize="basewidget1_initializehandler(event)"> <fx:script> <![cdata[ import com.esri.viewer.appevent; import mx.events.flexevent; protected function basewidget1_initializehandler(event:flexevent):void { viewercontainer.addeventlistener(appevent.data_publish, shareddataupdated); } private function shareddataupdated(event:appevent):void { var data:object = event.data; if (data.key == "liste des chapitres") { dplist.selectedindex = ***intchap***.text; } } ]]> </fx:script> <s:dropdownlist id="dplist" x="10" y="10" width="282" height="26" labelfield="intitulechap" dataprovider="{remoterapportdao.selection.lastresult}" change="dplist_changehandler(event)" ></s:dropdownlist>
intchap bold & italic textinput in widget1 , got underlined in widget 2, if made communication 1 can tell me i'm messing ?? or code appreciated !
http://web.zone.ee/bespiva/ there example on link above, follow steps, works ;)
Comments
Post a Comment