PDA

View Full Version : Seriously, just give me any info on TreeLoader directFn.



dontbugme
15 Feb 2011, 12:35 PM
Maybe a 10 line example of a function being called with one line of json data being returned?

Nothing online to be found except people having issues with it.

The API page has nothing more than "Function to call when executing a request."

I mean, really. That is it?

It would seem dataURL is the only example ever used. Is this other method not preferred, but cause our over-elaborate app can't make a direct GET call.

mitchellsimoens
15 Feb 2011, 4:55 PM
Seriously, calm down.

Here is a working TreeLoader for me:


new Ext.tree.TreeLoader({
paramsAsHash: true,
baseParams: {
test: "Hi"
},
directFn: Action.method
})

JSON:


{
"tid": 4,
"action": "Action",
"method": "method",
"type": "rpc",
"result": [
{
"leaf": false,
"expanded": true,
"text": "Node",
"children": [
{
"leaf": true,
"text": "Leaf One"
},
{
"leaf": true,
"text": "Leaf Two"
},
{
"leaf": true,
"text": "Leaf Three"
}
]
}
]
}

mitchellsimoens
15 Feb 2011, 4:57 PM
Also, if you look at the examples under Direct, you will see an example of this.

dontbugme
16 Feb 2011, 7:08 AM
Seriously, how would one know to look under direct for this? There was no mention this was intended as a server-side RPC thing. What little information other members could gleam is that it called a client-side JavaScript function.

In which case, thanks but no thanks. Then there really isn't a viable option for me to drop this tree into my application.

mitchellsimoens
16 Feb 2011, 7:10 AM
Seriously, calm down.

Do you know what Ext.Direct is? Guess not. Maybe when you get more versed with ExtJS then you will recognize how things are and work.

dontbugme
16 Feb 2011, 7:26 AM
Maybe if they said Ext.Direct was involved instead of their skimpy, one sentence description people could pick up and use their software. There documentation sucks. Pass, many other options to choose from.

mitchellsimoens
16 Feb 2011, 7:27 AM
Ok, bye =D>