On 9/16/16, 10:33 PM, "PKumar" <prashaku...@gmail.com> wrote:

>Hi,
>
>I am learning the FlexJS and trying to create the binding example. But
>FlexJS data binding is not same as normal flex SDK.no BindingUtils &
>ChangwWatcher class available.

FlexJS databinding won't be 1:1 the same as Flex.  We want it to be faster
and understand life cycles.  We haven't really worked on dynamically
adding bindings at runtime.  What did you use BindingUtils and
ChangeWatcher for in your app?

> I also created a simple example that worked
>in regular Flex SDK but not working in FlexJS,
>
> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
>                   xmlns:js="library://ns.apache.org/flexjs/basic" >
>    <js:valuesImpl>
>        <js:SimpleCSSValuesImpl />
>    </js:valuesImpl>
>    <js:initialView>
>        <js:View>
>                       <js:VContainer>
>                               <js:TextInput id="txtInput1" />
>                               <js:TextInput id="txtInput2" 
> text="{txtInput1.text}" />
>                       </js:VContainer>
>        </js:View>
>    </js:initialView>
></js:Application>

Just about everything in the FlexJS basic component set is pay-as-you-go
(PAYG).  In this example, it looks like there is no declaration of a
binding implementation.  Binding implementations can be replaced by more
sophisticated implementations someday.

So, I think you need the View children to include the binding imll:

<js:View>
  <js:beads>
    <js:ViewDataBinding />
  </js:beads>
  <js:VContainer>
    <js:TextInput id="txtInput1" />
    <js:TextInput id="txtInput2" text="{txtInput1.text}" />
  </js:VContainer>
        </js:View>


HTH,
-Alex

Reply via email to