1. #1
    Sencha User
    Join Date
    May 2010
    Location
    Las Vegas, NV
    Posts
    134
    Answers
    7
    Vote Rating
    2
    billtricarico is on a distinguished road

      0  

    Default Answered: Expanding Tree Nodes Using a REST Proxy

    Answered: Expanding Tree Nodes Using a REST Proxy


    Hello,

    I have a basic tree bound to a store with a REST proxy. This loads the tree as expected. I am purposely only returning one level of children so as not to load the entire tree. In each child node I have a 'url' property that represents a REST url to load that node's children.

    I want to be able to click on that node and use it's 'url' property to load its children. But whenever I click the node, it instantly calls the store proxy url. I tried setting the url in the itemclick event handler but that doesn't work. Instead I get this error:
    Code:
    Uncaught TypeError: Cannot read property 'internalId' of undefined.
    Can anyone help me to understand how to use REST with a tree?

  2. I think the best thing to do is stay away from REST until it works as expected.

  3. #2
    Sencha User
    Join Date
    Dec 2009
    Location
    Enschede, The Netherlands
    Posts
    327
    Answers
    16
    Vote Rating
    13
    flanders will become famous soon enough

      0  

    Default


    The default behaviour of the restproxy is that it throws all it's actions at the same url. In the case of a tree this means that all the loading is done from the same url providing an extra POST parameter which node is to be loaded. So the default behaviour sticks to one url only.

    If you cannot change your serverside, the best think to do is take a look at buildUrl() of the rest proxy. You should be able to change the url here.

    (In the context of assocations to other models, there has been some talk that a proper RESTful implementation should handle url's provided in the response to retrieve related data. http://www.sencha.com/forum/showthre...l-applications)
    Last edited by flanders; 5 Dec 2011 at 10:16 PM. Reason: added the link instead of blabla

  4. #3
    Sencha User
    Join Date
    May 2010
    Location
    Las Vegas, NV
    Posts
    134
    Answers
    7
    Vote Rating
    2
    billtricarico is on a distinguished road

      0  

    Default


    I think the best thing to do is stay away from REST until it works as expected.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi