Assuming you use a Label for your amounts:

new Label( ... ) {
    @Override
    protected void onComponentTag(ComponentTag tag) {
        super.onComponentTag(tag);
        if( isNumberPositive() )
            tag.append("class", "positive_num_css", " ");
        else
            tag.append("class", "negative_num_css", " ");
    }
}

Bertrand

On 16/08/2012 6:20 AM, Delange wrote:
Hi, in my DataView I have a column with amounts.
I want to give the positive ones a green color, and the negative ones a red
color;

How to accomplish that?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dataview-need-a-differente-css-for-negative-values-tp4651270.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