I've been using this on 1.3. You could generify to 1.4.
public class DateTimePropertyColumn extends PropertyColumn {
private DateFormat df;
/* ... Constructors.... */
@Override
protected IModel createLabelModel(IModel itemModel) {
Date date = (Date)
PropertyResolver.getValue(getPropertyExpression(),
itemModel.getObject());
if (date == null) {
return new Model("-");
}
return new Model(df.format(date));
}
}
On Sat, Feb 14, 2009 at 3:32 PM, Christoph GrĂ¼n <[email protected]> wrote:
> Hi all,
>
>
>
> columns.add(new PropertyColumn(new Model<String>("Title"), "title", " title
> "));
>
>
>
> How can I have such a property column that displays java.util.dates?
>
> I would also need the same for checkboxes or true/false values.
>
>
>
> Thanks a lot,
>
> Christoph
>
>
>
>
--
Marcelo Morales
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]