Voila the main & the popup:
<?xml version="1.0" encoding="utf-8"?> <mx:VBox autoLayout="true" width="100%" height="100%" xmlns:mx="http://www.macromedia.com/2003/mxml" backgroundColor="#FFFFFF" horizontalAlign="center" verticalAlign="middle" childCreated="monTableau()" > <mx:Script> <![CDATA[ var projectID; var title = "Zone Hall/Atrium"; var zoneCode:Number = 31; function monTableau():Void{ var creation:Object = new Object(); creation.zoneGenID = zoneCode; creation.projectID = projectID; ecranRO.affichage(creation); } function launchPopUp(task:String):Void{ var initObj = {task:task, target:this, zoneCode:zoneCode, projectID:projectID}; var popWindow = mx.managers.PopUpManager.createPopUp(this, popup.popup_new_zone, true, initObj); } function del():Void{ zones.removeItemAt (zones.selectedIndex); this.deletePopUp(); } function changeLabels(event):Void{ myLabelTitle.text = zones.selectedItem.Description; myLabelValue.text = zones.selectedItem.Building_Zone_ID; } ]]> </mx:Script> <mx:RemoteObject id="ecranRO" endpoint="@ContextRoot ()/flashservices/gateway" source="EEWizard3.cf.zone" fault="mx.core.Application.alert(event.fault.faultstring, 'Error')"> <mx:method name="affichage"/> </mx:RemoteObject> <mx:HBox width="100%" height="100%" verticalAlign="middle" horizontalAlign="center"> <mx:DataGrid id="zones" dataProvider="{ecranRO.affichage.result}" change="changeLabels (event);"> <mx:columns> <mx:Array> <mx:DataGridColumn columnName="Building_Zone_ID" headerText="Building Zone" /> <mx:DataGridColumn columnName="Description" headerText="Description"/> </mx:Array> </mx:columns> </mx:DataGrid> <mx:List id="myList" width="100%" height="100%" dataProvider="{ecranRO.affichage.result}" labelField="Description" borderStyle="solid" change="changeLabels(event);"/> <mx:VBox width="100%" height="100%"> <mx:Button label="Ajouter une zone" toolTip="Ajouter une zone" click="launchPopUp('new')"/> <mx:Button label="Effacer une zone" toolTip="Effacer la zone" click="del()"/> <mx:Button label="Renommer une zone" toolTip="Renommer la zone" click="launchPopUp('rename')"/> <mx:Button label="Accéder à la zone"/> <mx:Label id="myLabelTitle"/> <mx:Label id="myLabelValue"/> </mx:VBox> </mx:HBox> </mx:VBox> POPUP <?xml version="1.0" encoding="utf-8"?> <mx:TitleWindow xmlns:mx="http://www.macromedia.com/2003/mxml" autoLayout="true" title="Nouvelle instance de zone" closeButton="true" width="325" height="160" click="this.deletePopUp()"> <mx:Script> <![CDATA[ var target:Object; var task:Object; var zoneCode:Object; var projectID; function submitForm(){ if(task == 'new'){ if(zoneTitre.text != ""){ creerZone(); } }else if(task == 'rename'){ target.zones.replaceItemAt (target.zones.selectedIndex, zoneTitre.text); this.deletePopUp(); } } function creerZone():Void{ var creation:Object = new Object(); creation.zoneGenID = zoneCode; creation.projectID = projectID; creation.zoneTitre = zoneTitre.text; ecranRO.ajout(creation); } function populateZoneList(event:Object):Void{ target.zones.addItem(event.result); this.deletePopUp(); } ]]> </mx:Script> <mx:RemoteObject id="ecranRO" endpoint="@ContextRoot ()/flashservices/gateway" source="EEWizard3.cf.zone"> <mx:method name="ajout" result="populateZoneList(event)"> <mx:arguments> <zoneGenID>{zoneCode}</zoneGenID> <projectID>{projectID}</projectID> <zoneTitre>{zoneTitre.text}</zoneTitre> </mx:arguments> </mx:method> </mx:RemoteObject> <mx:VBox width="300" horizontalAlign="center"> <mx:Label id="zge" text="{projectID}"/> <mx:Label text="{zoneCode}"/> <mx:TextInput id="zoneTitre"/> <mx:HBox> <mx:Button label="OK" click="submitForm();"/> <mx:Button label="Annuler" click="this.deletePopUp ();"/> </mx:HBox> </mx:VBox> </mx:TitleWindow> --- In [email protected], "Stacy Young" <[EMAIL PROTECTED]> wrote: > Can u pls show flex code? > > > > -Stace > > > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Ghislain Simard > Sent: Saturday, July 23, 2005 9:59 PM > To: [email protected] > Subject: >< [flexcoders] Re: update a list with new value from > RemoteOject result > > > > ok...it's a Query now > same problem....Datagrid is not updated > > --- In [email protected], "Stacy Young" <[EMAIL PROTECTED]> > wrote: > > An array of structures? Cause u won't be able to bind a single > struct to > > a datagrid... > > > > > > > > Stace > > > > > > > > ________________________________ > > > > From: [email protected] > [mailto:[EMAIL PROTECTED] On > > Behalf Of Ghislain Simard > > Sent: Saturday, July 23, 2005 6:27 PM > > To: [email protected] > > Subject: >< [flexcoders] Re: update a list with new value from > > RemoteOject result > > > > > > > > no..it's a structure. > > > > > > --- In [email protected], "Stacy Young" > <[EMAIL PROTECTED]> > > wrote: > > > Wait, ur using CF...is this a recordset ur returning? Try: > > > > > > > > > > > > ecranRO.affichage.result._items > > > > > > > > > > > > -Stace > > > > > > > > > > > > ________________________________ > > > > > > From: [email protected] > > [mailto:[EMAIL PROTECTED] On > > > Behalf Of Ghislain Simard > > > Sent: Saturday, July 23, 2005 5:56 PM > > > To: [email protected] > > > Subject: [flexcoders] Re: update a list with new value from > > RemoteOject > > > result > > > > > > > > > > > > I can see the grid moving for inserting the value...but there is > > no > > > value text inside. > > > > > > --- In [email protected], "Stacy Young" > > <[EMAIL PROTECTED]> > > > wrote: > > > > Try setting the result of the service call to a function...and > > > have that > > > > function set the dataprovider of ur grid. > > > > > > > > Would grab u an example from livedocs but seems to be down... > > > > > > > > > > > > > > > > -Stace > > > > > > > > > > > > > > > > ________________________________ > > > > > > > > From: [email protected] > > > [mailto:[EMAIL PROTECTED] On > > > > Behalf Of Ghislain Simard > > > > Sent: Saturday, July 23, 2005 5:25 PM > > > > To: [email protected] > > > > Subject: [flexcoders] Re: update a list with new value from > > > RemoteOject > > > > result > > > > > > > > > > > > > > > > The grid is not updated... > > > > > > > > --- In [email protected], "Stacy Young" > > > <[EMAIL PROTECTED]> > > > > wrote: > > > > > Can u maybe explain the problem in more detail? Is the grid > not > > > > > updating? > > > > > > > > > > > > > > > > > > > > -Stace > > > > > > > > > > > > > > > > > > > > ________________________________ > > > > > > > > > > From: [email protected] > > > > [mailto:[EMAIL PROTECTED] On > > > > > Behalf Of Ghislain Simard > > > > > Sent: Saturday, July 23, 2005 3:25 PM > > > > > To: [email protected] > > > > > Subject: [flexcoders] Re: update a list with new value from > > > > RemoteOject > > > > > result > > > > > > > > > > > > > > > > > > > > I have no model. I'm communicating to the RemoteObject > > directly > > > > see: > > > > > > > > > > <mx:RemoteObject id="ecranRO" endpoint="@ContextRoot > > > > > ()/flashservices/gateway" source="EEWizard3.cf.zone" > > > > > fault="mx.core.Application.alert > > > > (event.fault.faultstring, 'Error')"> > > > > > <mx:method name="affichage"/> > > > > > </mx:RemoteObject> > > > > > <mx:HBox width="100%" height="100%" > > verticalAlign="middle" > > > > > horizontalAlign="center"> > > > > > <mx:DataGrid id="myGrid" > > > > > dataProvider="{ecranRO.affichage.result}" rowCount="2"> > > > > > <mx:columns> > > > > > <mx:Array> > > > > > <mx:DataGridColumn > columnName="Building_Zone_ID" > > > > > headerText="Building Zone" /> > > > > > <mx:DataGridColumn columnName="Description" > > > > > headerText="Description"/> > > > > > </mx:Array> > > > > > </mx:columns> > > > > > </mx:DataGrid> > > > > > > > > > > --- In [email protected], "Stacy Young" > > > > <[EMAIL PROTECTED]> > > > > > wrote: > > > > > > You could bind your result to a model and have your list > and > > > > > datagrid > > > > > > bound to their specific model. Whenever the result is > > received > > > > > from the > > > > > > server, the model will be updated...and in turn, your UI > > > > > components. > > > > > > > > > > > > > > > > > > > > > > > > HTH, > > > > > > > > > > > > Stace > > > > > > > > > > > > > > > > > > > > > > > > ________________________________ > > > > > > > > > > > > From: [email protected] > > > > > [mailto:[EMAIL PROTECTED] On > > > > > > Behalf Of Ghislain Simard > > > > > > Sent: Saturday, July 23, 2005 1:48 PM > > > > > > To: [email protected] > > > > > > Subject: [flexcoders] update a list with new value from > > > > RemoteOject > > > > > > result > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > I have a list and a datagrid that I would like to update. > > How > > > > to > > > > > > update all the columns and refresh the DataGrid and List > > > > > dynamically > > > > > > using the RemoteObject result? The idea is that I would > > like > > > to > > > > > > insert in the list the new created record with his new ID > > > > received > > > > > > from the RemoteObject result. > > > > > > > > > > > > Thanks > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Flexcoders Mailing List > > > > > > FAQ: > > > > > > > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > > > > > Search Archives: > > > > > > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ________________________________ > > > > > > > > > > > > YAHOO! GROUPS LINKS > > > > > > > > > > > > > > > > > > > > > > > > * Visit your group "flexcoders > > > > > > <http://groups.yahoo.com/group/flexcoders> " on the web. > > > > > > > > > > > > * To unsubscribe from this group, send an email to: > > > > > > [EMAIL PROTECTED] > > > > > > <mailto:[EMAIL PROTECTED] > > > > > subject=Unsubscribe> > > > > > > > > > > > > * Your use of Yahoo! Groups is subject to the Yahoo! > > > Terms > > > > of > > > > > > Service <http://docs.yahoo.com/info/terms/> . > > > > > > > > > > > > > > > > > > > > > > > > ________________________________ > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Flexcoders Mailing List > > > > > FAQ: > > > > > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > > > > Search Archives: > > > > > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > > > > > > > > > > > > > > > > > > > > > > > ________________________________ > > > > > > > > > > YAHOO! GROUPS LINKS > > > > > > > > > > > > > > > > > > > > * Visit your group "flexcoders > > > > > <http://groups.yahoo.com/group/flexcoders> " on the web. > > > > > > > > > > * To unsubscribe from this group, send an email to: > > > > > [EMAIL PROTECTED] > > > > > <mailto:[EMAIL PROTECTED] > > > > subject=Unsubscribe> > > > > > > > > > > * Your use of Yahoo! Groups is subject to the Yahoo! > > Terms > > > of > > > > > Service <http://docs.yahoo.com/info/terms/> . > > > > > > > > > > > > > > > > > > > > ________________________________ > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Flexcoders Mailing List > > > > FAQ: > > > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > > > Search Archives: > > > > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > > > > > > > > > > > > > > > > > > SPONSORED LINKS > > > > > > > > Computer software testing > > > > <http://groups.yahoo.com/gads? > > > t=ms&k=Computer+software+testing&w1=Comput > > > > > > > > > > er+software+testing&w2=Macromedia+flex&w3=Development&w4=Software+dev > > > elo > > > > per&c=4&s=93&.sig=kh2CguJwmatU5oBXjFo9Rg> > > > > > > > > Macromedia flex > > > > <http://groups.yahoo.com/gads? > > > t=ms&k=Macromedia+flex&w1=Computer+softwar > > > > > > > > > > e+testing&w2=Macromedia+flex&w3=Development&w4=Software+developer&c=4 > > > &s= > > > > 93&.sig=dAUcEV7do91-wrRtVS641g> > > > > > > > > Development > > > > <http://groups.yahoo.com/gads? > > > t=ms&k=Development&w1=Computer+software+te > > > > > > > > > > sting&w2=Macromedia+flex&w3=Development&w4=Software+developer&c=4&s=9 > > > 3&. > > > > sig=AlxNUQBOI7Io7S7nhmxV0Q> > > > > > > > > Software developer > > > > <http://groups.yahoo.com/gads? > > > t=ms&k=Software+developer&w1=Computer+soft > > > > > > > > > > ware+testing&w2=Macromedia+flex&w3=Development&w4=Software+developer& > > > c=4 > > > > &s=93&.sig=QWIit8JayomoIHLVkV3FDg> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ________________________________ > > > > > > > > YAHOO! GROUPS LINKS > > > > > > > > > > > > > > > > * Visit your group "flexcoders > > > > <http://groups.yahoo.com/group/flexcoders> " on the web. > > > > > > > > * To unsubscribe from this group, send an email to: > > > > [EMAIL PROTECTED] > > > > <mailto:[EMAIL PROTECTED] > > > subject=Unsubscribe> > > > > > > > > * Your use of Yahoo! Groups is subject to the Yahoo! > Terms > > of > > > > Service <http://docs.yahoo.com/info/terms/> . > > > > > > > > > > > > > > > > ________________________________ > > > > > > > > > > > > > > > -- > > > Flexcoders Mailing List > > > FAQ: > > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > > Search Archives: > > > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > > > > > > > > > > > > > SPONSORED LINKS > > > > > > Computer software testing > > > <http://groups.yahoo.com/gads? > > t=ms&k=Computer+software+testing&w1=Comput > > > > > > er+software+testing&w2=Macromedia+flex&w3=Development&w4=Software+dev > > elo > > > per&c=4&s=93&.sig=kh2CguJwmatU5oBXjFo9Rg> > > > > > > Macromedia flex > > > <http://groups.yahoo.com/gads? > > t=ms&k=Macromedia+flex&w1=Computer+softwar > > > > > > e+testing&w2=Macromedia+flex&w3=Development&w4=Software+developer&c=4 > > &s= > > > 93&.sig=dAUcEV7do91-wrRtVS641g> > > > > > > Development > > > <http://groups.yahoo.com/gads? > > t=ms&k=Development&w1=Computer+software+te > > > > > > sting&w2=Macromedia+flex&w3=Development&w4=Software+developer&c=4&s=9 > > 3&. > > > sig=AlxNUQBOI7Io7S7nhmxV0Q> > > > > > > Software developer > > > <http://groups.yahoo.com/gads? > > t=ms&k=Software+developer&w1=Computer+soft > > > > > > ware+testing&w2=Macromedia+flex&w3=Development&w4=Software+developer& > > c=4 > > > &s=93&.sig=QWIit8JayomoIHLVkV3FDg> > > > > > > > > > > > > > > > > > > > > > > > > ________________________________ > > > > > > YAHOO! GROUPS LINKS > > > > > > > > > > > > * Visit your group "flexcoders > > > <http://groups.yahoo.com/group/flexcoders> " on the web. > > > > > > * To unsubscribe from this group, send an email to: > > > [EMAIL PROTECTED] > > > <mailto:[EMAIL PROTECTED] > > subject=Unsubscribe> > > > > > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms > of > > > Service <http://docs.yahoo.com/info/terms/> . > > > > > > > > > > > > ________________________________ > > > > > > > > > > -- > > Flexcoders Mailing List > > FAQ: > http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > Search Archives: > > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > > > > > > > > ________________________________ > > > > YAHOO! GROUPS LINKS > > > > > > > > * Visit your group "flexcoders > > <http://groups.yahoo.com/group/flexcoders> " on the web. > > > > * To unsubscribe from this group, send an email to: > > [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED] > subject=Unsubscribe> > > > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > > Service <http://docs.yahoo.com/info/terms/> . > > > > > > > > ________________________________ > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > > > ________________________________ > > YAHOO! GROUPS LINKS > > > > * Visit your group "flexcoders > <http://groups.yahoo.com/group/flexcoders> " on the web. > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED] subject=Unsubscribe> > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/> . > > > > ________________________________ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

