Hi, as Yishay said, each component/container type has its own binding bead:
- Application - ApplicationDataBinding - View - ViewDataBinding - Container - ContainerDataBinding El mié., 5 feb. 2020 a las 16:52, Yishay Weiss (<yishayj...@hotmail.com>) escribió: > As I understand it the bead you use depends on your document type. If your > root tag were a View you would use ViewDataBinding. I’m not aware of > performance differences but I wasn’t involved in writing Binding so others > may want to comment. > > > > *From: *De Carli Gustavo <gustavodeca...@gmail.com> > *Sent: *Wednesday, February 5, 2020 3:35 PM > *To: *users@royale.apache.org > *Subject: *Re: Data Binding problem > > > > Hello Yishay, thank, with ApplicationDataBinding work ! > > I understand that I can shorten the level of "binding", so I am trying to > use "ViewDataBinding" without success > > Is it recommended to use "ApplicationDataBinding"? or is less performant > > > > > > Thank very much. > > Gustavo. > > > > El mié., 5 feb. 2020 a las 10:02, Yishay Weiss (<yishayj...@hotmail.com>) > escribió: > > Have you tried adding ApplicationDataBinding? See example [1] > > > > [1] > https://royale.apache.org/binding-the-text-property-of-a-jewel-textinput-to-update-a-text-label/ > > > > *From: *De Carli Gustavo <gustavodeca...@gmail.com> > *Sent: *Wednesday, February 5, 2020 12:15 AM > *To: *users@royale.apache.org > *Subject: *Data Binding problem > > > > > > Hello. > > > I do not find what the concept of error is because it does not work > "binding" from the beginning, but in the method refresh . > > Don't load the data for default. > > > > Thk. > > > > > > > > > > <?xml version="1.0" encoding="utf-8"?> > > > > <j:Application xmlns:fx="http://ns.adobe.com/mxml/2009" > > > > xmlns:j="library://ns.apache.org/royale/jewel" > > > > xmlns:js="library://ns.apache.org/royale/basic" > > > > > width="100%" > > > > height="100%"> > > > > > > <fx:Script> > > > > <![CDATA[ > > > > import org.apache.royale.events.Event; > > > > import org.apache.royale.collections.ArrayList; > > > > > > [Bindable] > > > > private var data:ArrayList = new ArrayList( [ > > > > {label:'Africa' ,code: > '001'}, > > > > {label:'America',code: > '002'}, > > > > {label:'Asia' ,code: > '003'}, > > > > {label:'Europa' ,code: > '004'}, > > > > {label:'Oceania',code: > '005'}, > > > > ]); > > > > > > private function refresh(e:Event):void { > > > > dg.dataProvider = this.data; > > > > } > > > > ]]> > > > > </fx:Script> > > > > > > > > > > <j:initialView> > > > > <j:View> > > > > <j:DataGrid id="dg" > > > > width="400" > > > > height="200" > > > > dataProvider="{data}"> > > > > <j:columns> > > > > <j:DataGridColumn label="Label" dataField="label"/> > > > > <j:DataGridColumn label="Code" dataField="code"/> > > > > </j:columns> > > > > </j:DataGrid> > > > > <j:Button id="btnRefresh" text="Refresh Me" click= > "refresh(event)"/> > > > > </j:View> > > > > </j:initialView> > > > > </j:Application> > > > > > > > -- Carlos Rovira http://about.me/carlosrovira