Bubbling Library > Examples

Dispatcher (YUI-CMS:YAHOO.util.Dispatcher): Tutorials


Dynamic Navigation Theory: Dispatcher + Bubbling Core Object = Dynamic Website

See how the left menu load the corresponding content in the central area of the page.
If you'll like to see an advanced example, and learn how to include external components that will be loaded onDemand in the main area of the page, click here.

Dispatcher Example - Dynamically loading content with script inside

This is an example of the DISPATCHER feature over two DIV tags, you can use the dispatcher to managing the content inside each DIV. This feature will warranty the execution of the scripts (remote and inline "script" tags) during the URI request.

TabView and Dispatcher Example - Dynamically loading content with script inside

This is an example of the DISPATCHER feature over the YUI tabview component, you can use the dispatcher to managing the content inside the tab. This feature will warranty the execution of the scripts (remote and inline "script" tags) during the dataSrc request.

TabView and Dispatcher Example - Dynamically loading content with child tabview inside

This is an example of the DISPATCHER feature over the YUI tabview component, you can use the dispatcher to managing the "child tabview" inside each tab.

TabView, Datatable and Dispatcher Example - Dynamically loading content with datatable inside

This is an example of the DISPATCHER feature over the YUI tabview component, you can use the dispatcher to managing the content inside the tab, and including another YUI component (YUI Datatable) during the dataSrc request.

TabView, Accordion and Dispatcher Example - Dynamically loading content with accordion inside

This is an example of the DISPATCHER feature over the YUI tabview component, you can use the dispatcher to managing the content inside the tab, and including another tabview with accordion layout.

TabView and Dispatcher Example - Dynamically loading content with script inside

This is an example of the DISPATCHER feature over the YUI tabview component, you can use the dispatcher to managing the content inside the tab. This feature will warranty the execution of the scripts (remote and inline "script" tags) during the dataSrc request.

How to pass parameters thru the dispatcher

In this example, you will see how to pass parameters in the initialization process, and then use these parameters in the different moments during the loading process.

How to avoid memory leaks

In this example, you can see how the first tab "Datatable Control" define the rules to destroy the YUI Datatable before change the content of the tab (which means that every time you click on the first tab, the dispatcher will destroy the DataTable control, releasing the memory and then will display the new content). Also, by default, the dispatcher will release all the listeners defined for a dynamic area before display the new content (YAHOO.util.Event.purgeElement).

Dynamic content with inline scripts

See how to process a HTML/JS code using the dispatcher.

CSS Injection Example

Using the dispatcher plugin you will be able to inject CSS rules on demand in your application, the rules can be written in line or thru a remote file loaded thru AJAX using the YUI connection manager.

Dynamic content with remote scripts (FULLPATH)

Defining the path for the remote assets using the fullpath.