Use:

private final static SimpleAttributeModifier customstyle =
     new SimpleAttributeModifier("class", "customstyle ");

and

link.add(customstyle);

Hope, this helps.

Maciek

----- Original Message ----- 
From: "fattymelt" <[EMAIL PROTECTED]>
To: <wicket-user@lists.sourceforge.net>
Sent: Monday, April 23, 2007 7:34 PM
Subject: [Wicket-user] Programmatically Apply CSS To Links?


>
> I am trying to create a reusable navigation that would "highlight" the
> current page in the navigation.
>
> Is there a way to set the "class" attribute of the link tag dynamically in
> Wicket? If not, does someone have a workaround? This seems like a pretty
> common thing one would want to be able to do.
>
> Thanks!
>
> -- 
> View this message in context: 
> http://www.nabble.com/Programmatically-Apply-CSS-To-Links--tf3633182.html#a10145188
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to