Last change
on this file since 976 was
976,
checked in by oschonef, 13 years ago
|
- work-in-progress commit for revamped collections table
|
-
Property svn:eol-style set to
native
|
File size:
1.2 KB
|
Line | |
---|
1 | package eu.clarin.cmdi.virtualcollectionregistry.gui.table; |
---|
2 | |
---|
3 | import org.apache.commons.lang.time.FastDateFormat; |
---|
4 | import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator; |
---|
5 | import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn; |
---|
6 | import org.apache.wicket.markup.html.basic.Label; |
---|
7 | import org.apache.wicket.markup.repeater.Item; |
---|
8 | import org.apache.wicket.model.IModel; |
---|
9 | import org.apache.wicket.model.ResourceModel; |
---|
10 | |
---|
11 | import eu.clarin.cmdi.virtualcollectionregistry.model.VirtualCollection; |
---|
12 | |
---|
13 | @SuppressWarnings("serial") |
---|
14 | final class ColumnCreated extends AbstractColumn<VirtualCollection> { |
---|
15 | private static final FastDateFormat df = |
---|
16 | FastDateFormat.getInstance("yyyy-MM-dd"); |
---|
17 | |
---|
18 | ColumnCreated(VirtualCollectionTable table) { |
---|
19 | super(new ResourceModel("column.created", "Created"), "created"); |
---|
20 | } |
---|
21 | |
---|
22 | @Override |
---|
23 | public void populateItem(Item<ICellPopulator<VirtualCollection>> item, |
---|
24 | String componentId, IModel<VirtualCollection> model) { |
---|
25 | item.add(new Label(componentId, |
---|
26 | df.format(model.getObject().getCreationDate()))); |
---|
27 | } |
---|
28 | |
---|
29 | @Override |
---|
30 | public String getCssClass() { |
---|
31 | return "created"; |
---|
32 | } |
---|
33 | |
---|
34 | } // class ColumnCreated |
---|
Note: See
TracBrowser
for help on using the repository browser.