I guess something like this could work too
add (new Label("label_id", "String") {
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
if (active)
tag.put ("class", "active");
}
});
-Matej
Nick Heudecker wrote:
Hi,
Let's say I have a String that I want to be colored green if it equals
"ACTIVE" or red if it equals "CANCELLED". The change would just be a
different CSS style. Is there a common method to do this with Wicket?
Thanks.
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user