3 Replies Latest reply on Feb 24, 2010 1:20 PM by JohnMerlino

    multiple initializers for property dataProvider

    JohnMerlino Level 1

      All I'm trying to do is display xml data from a Rails application in a list., but it doesn't like this:

                          dataProvider="{student_requests.student_request}"

       

      It tells me "multiple initializers for property dataProvider".

       

      Any idea of how to address this? Thanks.

       

        <fx:Script>
              <![CDATA[
                 
                  import mx.controls.Alert;
                  import mx.rpc.events.FaultEvent;
                  import mx.rpc.events.ResultEvent;   
                 
                  [Bindable]
                  private var student_requests:XML;
                  private const CONTEXT_URL:String = "http://localhost:3000";
                 
                  private function initApp():void {
                      student_requestsIndex.send();
                  }    
                 
                  protected function textInput_enterHandler():void
                  {
                      currentState='List';
                  }

       

                  protected function list_changeHandler():void
                  {
                      currentState='Detail';
                  }

       


                  protected function button_clickHandler():void
                  {
                      currentState='List';
                  }

       


                  protected function button_clickHandler_1():void
                  {
                      currentState='Search';
                  }

       

              ]]>

       

          </fx:Script>
          <s:states>
              <s:State name="Detail"/>
              <s:State name="List"/>
              <s:State name="Search"/>
          </s:states>
         
          <fx:Declarations>
             
              <s:HTTPService
                  id="student_requestsIndex"
                  url="{CONTEXT_URL}/student_requests.xml"
                  resultFormat="e4x"
                  result="student_requests=event.result as XML"/>       
             
              <s:HTTPService
                  id="student_requestsCreate" url="{CONTEXT_URL}/student_requests.xml"
                  method = "POST"
                  resultFormat="e4x"
                  contentType="application/xml"
                  result="student_requestsIndex.send()"/>
             
              <s:HTTPService
                  id="student_requestsUpdate" url="{CONTEXT_URL}/student_requests/{student_requestsGrid.selectedItem.id}/confirm_reques t"
                  method="POST"
                  resultFormat = "e4x"
                  contentType="application/xml"
                  headers="{{X_HTTP_METHOD_OVERRIDE: 'PUT'}}" />
             
          </fx:Declarations>

       

       

              <fx:DesignLayer d:id="49" ai:objID="644a1270" d:userLabel="LeftPanel" visible.Search="false" id="designlayer2">

       

              <s:List skinClass="components.DataList3" x="65" y="96"
                          change="list_changeHandler()"
                          id="list1"
                          dataProvider="{student_requests.student_request}"
                          labelField="student_request">
                     
                      <s:ArrayCollection>
                          <fx:String></fx:String>
                          <fx:String></fx:String>
                          <fx:String></fx:String>
                          <fx:String></fx:String>
                          <fx:String></fx:String>
                      </s:ArrayCollection>
                  </s:List>

              </fx:DesignLayer>