I don't know on the Wicket wiki... but when I have to use such things I always look into the "existing wicket code". A quick search on my IDE leads me to this the class org.wicketstuff.yui.markup.html.slider.Slider where a text template is used to populate the init.js file... Hope this helps... Best,
Ernesto On Sun, Nov 16, 2008 at 3:50 PM, James Carman <[EMAIL PROTECTED]>wrote: > I was thinking about learning how to use TextTemplates to generate the > CSS. Is there any good reference out there? > > On Sun, Nov 16, 2008 at 9:44 AM, Ernesto Reinaldo Barreiro > <[EMAIL PROTECTED]> wrote: > > I see two options: > > 1-Generate the css out for of some other data you can easily use at Java > > level (a velocity template maybe?) > > 2-Parse the CSS (e.g. with > > http://cssparser.sourceforge.net/)<http://cssparser.sourceforge.net/> > > <http://www.w3.org/Style/CSS/SAC/> > > > > For a project I had to use approach 2 and it worked fine except for some > > glitches on the parser (don't remember exactly but I think it was > something > > about _ character not accepted by the parser as part of CSS class-names, > but > > maybe this has already been fixed). > > > > Best, > > > > Ernesto > > > > On Sun, Nov 16, 2008 at 3:09 PM, James Carman < > [EMAIL PROTECTED]>wrote: > > > >> I have the same sort of need in my application. I need to do an > >> "overlay" on an existing image using the same colors that are defined > >> in a CSS document. I guess I could dynamically generate the CSS, but > >> I have no idea how to go about that. :) > >> > >> On Sun, Nov 16, 2008 at 7:02 AM, Swinsburg, Stephen > >> <[EMAIL PROTECTED]> wrote: > >> > > >> > What do you need it for? Why can't you just make another class with > just > >> the attribute in it and AttributeAppender that in? > >> > > >> > > >> > > >> > -----Original Message----- > >> > From: egolan74 [mailto:[EMAIL PROTECTED] > >> > Sent: Sun 11/16/2008 10:42 AM > >> > To: users@wicket.apache.org > >> > Subject: RE: Reading an attribute that is set in a CSS file as a class > >> > > >> > > >> > > >> > > >> > Steve Swinsburg-2 wrote: > >> >> > >> >> On your component attach an AttributeAppender or AttributeModifier, > set > >> >> the "class" attribute to be the name of your class. Done :) > >> >> > >> > > >> > Thanks Steve but this is not what I meant. > >> > Adding a class as an attribute to a component is a pretty basic stuff. > >> > > >> > What I want is, getting a value of an attribute of a class in a CSS > file. > >> > > >> > ----- > >> > Eyal Golan > >> > [EMAIL PROTECTED] > >> > > >> > Visit: http://jvdrums.sourceforge.net/ JVDrums > >> > LinkedIn: http://www.linkedin.com/in/egolan74 LinkedIn > >> > -- > >> > View this message in context: > >> > http://www.nabble.com/Reading-an-attribute-that-is-set-in-a-CSS-file-as-a-class-tp20523855p20524044.html > >> > Sent from the Wicket - User mailing list archive at Nabble.com. > >> > > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: [EMAIL PROTECTED] > >> > For additional commands, e-mail: [EMAIL PROTECTED] > >> > > >> > > >> > > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: [EMAIL PROTECTED] > >> > For additional commands, e-mail: [EMAIL PROTECTED] > >> > > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >