users@woodstock.java.net

Javascript theme properties

From: Kenneth Suter <Kenneth.Suter_at_Sun.COM>
Date: Wed, 02 Jan 2008 15:36:27 -0600

Hello,

Using Woodstock 4.1.1 I am following along in the document The "Theme
and Woodstock Web Applications - Version 4.1" in hopes of changing the
pages' background color as well the primary buttons' colors. I've
followed the instructions in section 3 of this document adding and the
THEME_RESOURCES parameter to web.xml and defining some files in the
WEB-INF/classes directory as such:

--- Contents of http://localhost:8080/<my app>/theme/theme2.css:

body {
    background-color:yellow
}

.MyBtn1_sun4 {
    background:#222222 url(../images/button/primary-enabled.gif) repeat-x top;
    border-top-color:#333333;
    border-right-color:#444444;
    border-bottom-color:#333333;
    border-left-color:#444444;
}

.MyBtn1Hov_sun4 {
    background:#DDDDDD url(../images/button/primary-roll.gif) repeat-x top;
    border-top-color:#222222;
    border-right-color:#111111;
    border-bottom-color:#666666;
    border-left-color:#111111;
}


--- Contents of http://localhost:8080/<my app>/theme/theme2.properties:

Theme.stylesheet=/theme2.css

BUTTON1=MyBtn1_sun4
BUTTON1_HOVER=MyBtn1Hov_sun4



--- Contents of http://localhost:8080/<my app>/theme/nls/theme2.js:

{
    "styles" : {
        "BUTTON1" : "Btn1_sun4 MyBtn1_sun4",
        "BUTTON1_HOVER" : "Btn1Hov_sun4 MyBtn1Hov_sun4"
    }
}


This does have the desired effect of changing the background of the body
on the page. However the Javascript theme properties file do not seem
to work as the application's primary buttons' rendering are unaffected.
Is there something that I've overlooked?

Thanks,

-Kenneth