Maybe a callback function (given some usefull context parameters..) which produces the url could do the trick..
On 2 Mai, 17:24, jayg <[EMAIL PROTECTED]> wrote: > Thanks Jörn, > I will post code here when I get a good solution. However, I know the > treeview is being worked on in the UI project as well, should I be > looking at something other than treview.asynch to make these changes > to? Additionally, I was considering adding a 'custom' persist option, > I can provide a patch if you think it would be useful (and assuming it > is done generically enough). Probably also going to be looking at > adding a 'loading' spinner option, unless it is there and I have just > missed it. > > On Apr 30, 11:42 am, Jörn Zaefferer <[EMAIL PROTECTED]> wrote: > > > jayg schrieb:> I need to set up dynamic urls with async trees as well, > > though I am > > > using rails, so I am looking for something more like 'foo/bar/1', but > > > same functionality. The problem I have with the idea to use > > > "source.php?id=firsttree" or something similar is that I don't know > > > how many subtrees I may have - this needs to be built dynamically. If > > > I misunderstood, and this is intended to be dynamic, a code snippet > > > would be greatly helpful. If not, my thought was in the getJSON > > > function of thetreeview.asynch to have _that_ create the url info for > > > the newly returned tree. We already have this.id and could easily > > > return the name of the controller and method to call. Then, at the > > > end when we call $(container).treeview({add:child}), we could insert > > > the url we created into ts setting. I may hack on this until I hear > > > another idea, but let me know what you think of that approach. > > > Ideas, especially in the form of code, are very welcome. The basic > > problem, dynamic arguments and different URL formats, applies now to > > bothtreeviewand autocomplete plugins, so solving it properly would > > help a lot. > > > Jörn