Re: DataTable's Handling of NULL Values

2010-01-02 Thread Jason Lea
Ah I see. In the end you are going to display a string n the cell, but if the string is null then it should display the default value. I guess the problem is because you are using the PropertyColumn which is a convienience implementation, and the property you are using doesn't display the right

Re: DataTable's Handling of NULL Values

2010-01-02 Thread Norman Elton
Thanks for both responses. I'm going to try them both. Two clarification questions: - In Ernesto's idea (override populateItem()), would the model still be dynamic? That is, if the table is used in a form and the data updated, would the table reflect the new change? My terminology may be a little

Re: DataTable's Handling of NULL Values

2010-01-02 Thread Ernesto Reinaldo Barreiro
I just hastily composed the code I posted and I missed the getCssClass() ... besides I do not normally use DataTable on my applications. The point was to make clear that you can override "methods"... Something that many users somehow miss when using wicket. I also use nested models when appropriat

Re: DataTable's Handling of NULL Values

2010-01-02 Thread Jason Lea
PropetyColumn implements IStyledColumn so you can override getCssClass() and return a class if it is null instead of adding the attributemodifier. And you could create your own model to return a default string when the underlying model is null... something like this... public class DefaultMo