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 <chris...@gmx.at> 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: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to