You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Christoph Grün <ch...@gmx.at> on 2009/02/14 20:32:29 UTC
propertycolumn - date column, checkbox column
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
Re: propertycolumn - date column, checkbox column
Posted by Korbinian Bachl - privat <ko...@whiskyworld.de>.
Hi,
use AbstractColumn instead and provide a panel that does what you want, eg:
columns.add(new AbstractColumn<Marke>(new Model<String>("CHGE"),
"changed") {
public void populateItem(Item<ICellPopulator<Marke>>
cellItem, String componentId, IModel<Marke> model) {
cellItem.add(new ChangedCellPanel(componentId,
model.getObject().isChanged()));
}
@Override
public String getCssClass() {
return "center w50";
}
});
It is usually always a good idea to have a look at the classes you want
to customise (here: PropertyColumn that extends AbstractColumn) as most
parts of wicket utilize extensions of abstract classes and/ or
implementations of interfaces;
Best
PS: the code is from 1.4-rc2, so using generics - in 1.3 you can't do that
Christoph Grün schrieb:
> 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
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org