In RBD 8012, I believe the Dojo Sample contains an example of what you are looking for. To get the sample:
Locate the sample in the help system using Help->Welcome->Samples->EGL Rich UI Dojo Widgets
Import (in the following order):
- Dojo Widgets
- Rich UI Widgets
- Local Dojo Toolkit
- Sample
Expand /com.ibm.egl.rui.dojo.samples_2.0.0/EGLSource/dojo.samples/
Right click on Gallery.egl and select Open With -> EGL Rich UI Editor. When the editor opens, select the Preview tab. At the top of the page there is an option to select which theme is used to render the application.
The theme is controlled by the ThemeLib library, which is backed by the DojoTheme external type. In the JavaScript code for the DojoTheme external type, which you can find in the WebContent folder of the sample, there is one function for dynamically loading CSS files at runtime (changeCSS), and there is another function for changing the class tag on the body of the document (setTheme).
-Brian
bsvihovec