There is no hardcoding of this. You have two approaches.

1. If you are using a simple HTML template, then there is a particular structure you 
need to use in your deployment. See how extralite is done. In the nukes-lib.jar:

the template "theme.html" is in .../core/themes/extralite.
The stylesheet for this must be .../core/themes/extralite/style/style.css

Now, in your MBean which kicks off this theme, you will have:

  |    <mbean
  |       code="org.jboss.nukes.theme.ThemeTemplate"
  |       name="nukes.themes:name=extralite"
  |       xmbean-dd=""
  |       xmbean-code="org.jboss.nukes.component.NukesMBean">
  |       <depends>nukes.modules:name=core</depends>
  |       <depends>nukes.modules:name=html</depends>
  |       <constructor>
  |          <arg type="boolean" value="true"/>
  |       </constructor>
  |       <xmbean>
  |          <attribute name="Security">
  |             <security>
  |                <permission group="Admins" pattern=".*:.*:.*" level="ADMIN"/>
  |             </security>
  |          </attribute>
  |          <attribute name="Id">jar:/theme.html</attribute>
  |          <attribute name="Root">org/jboss/nukes/core/themes/extralite</attribute>
  |       </xmbean>
  |    </mbean>
  | 

Note the Root and Id attributes. The Root maps to the root place in a jar (or file 
system? don't know about that) for the theme details. The Id is the theme template in 
a file relative to the Root.

All HTML references to stylesheets, images etc are based off the theme MBean name. ie.

Say your theme MBean is named "myTheme". A relative URL in your HTML like 
"themes/myTheme/images/anImage.jpg" is mapped to looking in the jar where the Root is, 
gets the file from the jar at .../themes/myTheme/images/anImage.jpg. Also, modules are 
mapped in same way - replace "themes" with "modules" in the references.


2. Have a custom theme which generates the right stylesheet reference. If you are 
getting the CSSs out of the DB, then this is what you will need. Probably something 
like "index.html?module=html&op=display&id=/mySheet.css". Check out seabreeze.  The 
HTML references outlined above work in the same way.


Sherman

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3828580#3828580

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3828580


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to