Hello,
I try to display a application a table with odd line in red and even line in
blue.
For each cell of the table I use a label.
Somebody know how can I set the color to a label.
Thanks for your help
Vincent
Use css. If you're using a ListView, the ListItem has a getIndex()
method that you can use to see if it's odd or even.
On 3/19/08, vincent Renaville [EMAIL PROTECTED] wrote:
Hello,
I try to display a application a table with odd line in red and even line in
blue.
For each cell of the
You should specify separate css classes for the odd and the even labels:
public class CSSClass extends AttributeModifier {
public CSSClass(final String clazz) {
super(class, true, new AbstractReadOnlyModel() {
/** */
private static final long serialVersionUID = 1L;
I would probably use a helper method, along with AttributeAppender
instead of creating an entirely new class for this:
On 3/19/08, Martin Makundi [EMAIL PROTECTED] wrote:
You should specify separate css classes for the odd and the even labels:
public class CSSClass extends AttributeModifier {
, true, new Model(oddRow)));
} else {
item.add(new AttributeModifier(class, true, new Model(evenRow)));
}
Cheers.
--
View this message in context:
http://www.nabble.com/Set-a-dynamic-color-to-a-label-tp16158028p16162946.html
Sent from the Wicket - User mailing list archive at Nabble.com
)));
}
Cheers.
--
View this message in context:
http://www.nabble.com/Set-a-dynamic-color-to-a-label-tp16158028p16162946.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e