1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    11
    Vote Rating
    0
    naveenkumargupta is on a distinguished road

      0  

    Default Unanswered: List not binding well

    Unanswered: List not binding well


    Hi,

    I am getting a problem as below. I am having a xml as below:

    Code:
    <Product id = 1>
          <items>
               <Product id =2>
               </Product>
               <Product id=3>
               </Product>
           </items>
    </Product>
    <Product id = 4>
           <items>
                <Product id =5>
                </Product>
                <Product id=6>
                </Product>
                <Product id=7>
                </Product>
           </items>
    </Product>
    I want that list should just bind the Products 1 and 4, only, but on running the list gets bound to all the Products from 1 to 7

    Please suggest. How the model/view needs to be altered
    Last edited by mitchellsimoens; 9 Apr 2012 at 4:57 AM. Reason: added [CODE] tags

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,004
    Answers
    3489
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    There is currently a bug open for the Xml reader that the mapping is wrong. The issue is if the elements have the same name then it will get mapped. If you change the name you will have no issue.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1