1 Reply Latest reply on Dec 17, 2009 2:53 AM by lathoudero

    How to dynamically bind component with DataService

    lathoudero

      Hi All,

       

      I have the following question:

       

      How do I create THIS:

       

              <mx:FormItem label="First name">
                  <s:TextInput id="firstname_ti"
                               text="@{person.first_name}"/>
              </mx:FormItem>

       

      Dynamically with ActionScript?

       

                  switch (switchItem) {
                      case "textinput":
                          var myTextInput:TextInput=new TextInput();
                          myTextInput.id=value.@id;
                          myTextInput.text=???LINK WITH PERSON???;
                          myTextInput.toolTip=value.@tooltip;
                          formItem.addElement(myTextInput);
                          break;

                          etc....