Hi people, I'm starting with Flex technology and have some doubts on how datadinding between client-side objects work. After reading Adobe's Flex3 and playing with some samples I ended up with the following situation: Created a Product.as class declared as bindable. Created a product.mxml in which I declare the following: ... <Product id=p name="{nameControl.text}"/> ... <mx:text id="nameControl" text="{p.name}"/> ...
For what I understand the first binding is to make sure that the product's name is set to what the user entered in the textControl and the second binding can be used to load an initial value in the textControl from an existing product. right? Now, my Product class actually has a Dimensions(width, height, etc) attribute, where Dimensions is another as class created by me and declared bindable. How can I bind, for example the width of my Product to another textControl? Can I nest a Dimensions tag inside the Product tag? or add to the Product tag an attribute like dimensions.width="{widthControl.text}"? I'd also like to achieve the same binding by creating the Product instance in actionScript and not using mxml tags. Is this possible? Any example on how to do these will be aprreciated as I tried different ways but couln't get what I want. Any example on the web or open source project that I can use as a guide for this case? (trying to create a list-create-modify-delete screen and want to reuse the Product form for creation and modification) because I found Adobe's examples on this theme to be too simplistic. Thanks in advanced, Martin