Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7628223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:33:59+00:00 2026-05-31T05:33:59+00:00

i have an error adding dataprovider on my spark datagrid: Multiple initializers for property

  • 0

i have an error adding dataprovider on my spark datagrid:

Multiple initializers for property 'dataProvider'. (note: 'dataProvider' is the default property of 'spark.components.DataGrid').

My data is from s:httpService declaration and i put it in data grid something like this

<s:DataGrid includeIn="formState" x="348" y="57" width="287" dataProvider="{myHttpService}">
    <s:columns>
        <s:ArrayList>
            <s:GridColumn dataField="data1" headerText="Data Field 1"></s:GridColumn>
            <s:GridColumn dataField="data2" headerText="Data Field 2"></s:GridColumn>
            <s:GridColumn dataField="data3" headerText="Data Field 3"></s:GridColumn>
        </s:ArrayList>
    </s:columns>
    <s:typicalItem>
        <fx:Object dataField1="Sample Data" dataField2="Sample Data" dataField3="Sample Data"></fx:Object>
    </s:typicalItem>
    <s:ArrayList>
        <fx:Object data1="data1" data2="data1" data3="data1"></fx:Object>
        <fx:Object data1="data2" data2="data2" data3="data2"></fx:Object>
        <fx:Object data1="data3" data2="data3" data3="data3"></fx:Object>
        <fx:Object data1="data4" data2="data4" data3="data4"></fx:Object>
    </s:ArrayList>
</s:DataGrid>

and my http service is:

<s:HTTPService id="myHttpService" url="http://host.com/mydata.php"/>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:33:59+00:00Added an answer on May 31, 2026 at 5:33 am

    Your code specifies the dataProvider twice, inadvertently I think.

    The first time it is specified as a property on the tag, on this line.

    <s:DataGrid includeIn="formState" x="348" y="57" width="287" dataProvider="{myHttpService}">
    

    The second time it is specified as a child of the DataGrid, with these blocks:

    <s:ArrayList>
        <fx:Object data1="data1" data2="data1" data3="data1"></fx:Object>
        <fx:Object data1="data2" data2="data2" data3="data2"></fx:Object>
        <fx:Object data1="data3" data2="data3" data3="data3"></fx:Object>
        <fx:Object data1="data4" data2="data4" data3="data4"></fx:Object>
    </s:ArrayList>
    

    You can’t specify the dataProvider in both cases.

    Additionally, I’ll add that your code, as is, is using myHttpService as the dataProvider (in thef irst line). You probably want to use the results of the myHttpService call as the dataProvider; not the actual myHttpService object.

    I believe you could bind to myHttpService.lastResults if you wanted, by my preference is to have a formal results handler that deals with handling the results, Conceptually like this:

    <s:HTTPService id="myHttpService" url="http://host.com/mydata.php" result="onMyResult(event)"/>
    
    protected function onMyResult(event:ResultEvent):void{
      this.myDataGrid.dataProvider = new ArrayCollection(event.results as Array);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an error occuring frequently from our community server installation whenever the googlesitemap.ashx
I have this error that is keeping me from moving forward. I basically have
I have this query and I have an error: images = Image.find_by_sql('PREPARE stmt FROM
I have been adding error and business validation to my app, and when I
i have the following script i am using to scrap data from my uni
I have set error reporting in my development environment to E_STRICT by adding to
I have the following error when trying to import .sql file into MYSQL from
I have prefer this post for example but I got the error at adding
I have an error below adding an .mdf file (SQL Server Database) in a
I have went through to the T Apple's documentation for this error for adding

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.