0 Replies Latest reply on May 22, 2011 3:31 AM by wingmok

    Flex 4.5 form generator to mysql problem

    wingmok

      I followed the steps in this tutorial

       

      http://www.youtube.com/watch?v=MGCrRlC4i5E

       

      I found that there is nothing writtened to mysql database...

      But i can get right in test operation...

       

      did i do something wrong...?

      please help....

       

      <?xml version="1.0" encoding="utf-8"?>

      <s:Application

       

       

      xmlns:fx="http://ns.adobe.com/mxml/2009"

      xmlns:s="

      library://ns.adobe.com/flex/spark"

      xmlns:mx="

      library://ns.adobe.com/flex/mx"

      xmlns:valueObjects="

      valueObjects.*"

      xmlns:peopleservice="

      services.peopleservice.*"

      minWidth="

      955" minHeight="600">

       

       

      <fx:Script>

      <![CDATA[

       

       

      import mx.controls.Alert;

       

       

      protected function button_clickHandler(event:MouseEvent):void

      {

       

       

      var people2:People = new People();

      people2.first_name = first_nameTextInput.text;

      people2.last_name = last_nameTextInput.text;

      people2.age = parseInt(ageTextInput.text);

       

      createPeopleResult.token = peopleService.createPeople(people2);

      currentState=

      "Submit";

      }

       

       

      protected function button1_clickHandler(event:MouseEvent):void

      {

       

       

      // TODO Auto-generated method stub

       

      currentState =

       

      "Form";

      }

       

      ]]>

       

      </fx:Script>

       

      <s:states>

       

      <s:State name="Form"/>

       

      <s:State name="Submit"/>

       

      </s:states>

       

      <fx:Declarations>

       

      <valueObjects:People id="people"/>

       

      <peopleservice:PeopleService id="peopleService"

      fault="Alert.show(event.fault.faultString +

      '\n' + event.fault.faultDetail)"

      showBusyCursor="

      true"/>

       

      <s:CallResponder id="createPeopleResult"/>

       

      <!-- Place non-visual elements (e.g., services, value objects) here -->

       

      </fx:Declarations>

       

      <s:Form includeIn="Form" x="10" y="84" defaultButton="{button}">

       

      <s:FormItem label="First_name">

       

      <s:TextInput id="first_nameTextInput" text="{people.first_name}"/>

       

      </s:FormItem>

       

      <s:FormItem label="Last_name">

       

      <s:TextInput id="last_nameTextInput" text="{people.last_name}"/>

       

      </s:FormItem>

       

      <s:FormItem label="Age">

       

      <s:TextInput id="ageTextInput" text="{people.age}"/>

       

      </s:FormItem>

       

      <s:Button id="button" label="CreatePeople" click="button_clickHandler(event)"/>

       

      </s:Form>

       

      <s:Button includeIn="Submit" x="111" y="209" label="Button" click="button1_clickHandler(event)"/>

      </s:Application>