html is best for static classes

for java subclass the component and override oncomponenttag and set
the class from there.

if you cannot do that or you have some cross-component-cutting logic
then use an attribute modifier.

-igor


On Thu, Mar 8, 2012 at 12:58 PM, Uvex <andrei.niculesc...@gmail.com> wrote:
> I am new in wicket and programming and I'll be grateful if someone could tell
> me what is the best practice for adding css style to a component (or setting
> a css class): from the .java file or from the .html file?
>
>
> OR
> control.add(new SimpleAttributeModifier("class", "HelloCssClass"));
>
> Thank you.
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Best-practice-for-adding-style-to-a-component-tp4457648p4457648.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to