1. #1
    Ext JS Premium Member
    Join Date
    Apr 2010
    Posts
    20
    Vote Rating
    0
    nikolawannabe is on a distinguished road

      0  

    Question Unanswered: TreeStore with Extra Parameters from Node

    Unanswered: TreeStore with Extra Parameters from Node


    Hi all,

    I have a TreeStore with a node that contains an extra field, NodeType. I'd like to send this parameter along with the node id when it does an ajax request. I'm currently using an AjaxProxy. I see that there is an extraParams property, but it seems to take only things set at the initialization of the proxy, not things from the node itself.

    Does anyone have any pointers? (pun intended.)

  2. #2
    Ext JS Premium Member
    Join Date
    Apr 2010
    Posts
    20
    Vote Rating
    0
    nikolawannabe is on a distinguished road

      0  

    Default


    Figured it out with help from StackOverflow. The code looks something like the following:

    Code:
       proxy = {
            type: 'ajax',
            url: proxyURL
        };
        store = new Ext.data.TreeStore({
            model: 'TreeItem',
            proxy: proxy,
            listeners: {
                beforeload: function (store, operation, eOpts) {
                    if (operation.node.attributes.record.data) {
                        var nodeType = operation.node.attributes.record.data["ItemType"];
                        var nodeId = operation.node.attributes.record.data["ItemId"];
                        operation.params.ItemType = nodeType;
                        operation.params.node = nodeId;
                    } else {
                        operation.params.node = "root";
                    }
                }
            }
        });

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar