| Page 1 of 1 | [ 5 posts ] |
|
I'm having issues with using tabview and treeview together. I've set up the tabview so it grabs all tab content from separate .html files using dataSrc. One of the files that a tab loads its content from contains a treeview. Now, the treeview loads fine when I view the file directly, but when it's loaded using tabview, nothing shows up in the content. It appears the tab stays in the "loading" state.
Can this even be done? |
|
So after further investigation, I'm assuming I need to use the YUI Loader in some fashion.
|
|
Not exactly.
Depending on the way you want to implement this. You have 3 options: 1. you can include the requirements for the treeview component at the document level (head) 2. you can include the requirements on demand, using YUI Loader right before the instantiation process for the treeview. 3. you can delegate the requirements to the content of the tab, with means that the content loaded thru dataSrc will include also some CSS and JS files. YUI Tabview supports all this options. The different is that 1 and 2 will require that part of the internal logic of the tab (creating a treeview object) will be at the document level, and because of that you have to wait until the tab become active/loaded, to fire that logic. In the 3 approach, your tab and your application in general will not know what the tab will do. The content loaded within the tab is responsible to define/fire that logic, creating some kind of autonomy for that content. I don't have an example for the treeview, but I have one for nested tabviews, which is quite similar: http://bubbling-library.com/sandbox/dis ... bview.html The first tab will load the content, and the tab itself execute the instantiation process when the content of the tab get ready: var mySimpleTab = new YAHOO.widget.TabView('childtabview'); the second tab relay on the content to create the tabview. The first tab will works with a "plain" yui implementation as well. The second one requires the dispatcher plugin. Best Regards, Caridy |
|
Wow, this dispatcher plugin is exactly what I need. Thanks!
|
|
I'm glad to help.
Best Regards, Caridy |
| Page 1 of 1 | [ 5 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group