UJO - public class KeyPopulator<UJO extends org.ujorm.Ujo,T> extends Object implements org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator<UJO>, org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn<UJO,org.ujorm.Key<UJO,T>>
ICellPopulator that adds a label that will display the
value of the specified key. Non-string properties will be converted to a string before
display.
Example:
List<ICellPopulator> columns = KeyPopulator.list
( Employee.ID
, Employee.FIRSTNAME
, Employee.LASTNAME
, Employee.EMAIL
);
final WebMarkupContainer table = new WebMarkupContainer("table");
final DataGridView grid = new DataGridView("gridPanel", columns, new InnerPeopleProvicer());
table.setOutputMarkupId(true);
grid.setItemsPerPage(20);
add(table);
table.add(grid);
add(new AjaxPagingNavigator("tableNavigator", grid));
| Constructor and Description |
|---|
KeyPopulator(org.ujorm.Key<UJO,?> key) |
KeyPopulator(org.ujorm.core.KeyRing<UJO> key) |
| Modifier and Type | Method and Description |
|---|---|
void |
detach() |
org.apache.wicket.Component |
getHeader(String componentId) |
org.ujorm.Key<UJO,T> |
getSortProperty() |
boolean |
isSortable() |
static <UJO extends org.ujorm.Ujo> |
list(org.ujorm.Key<? super UJO,?>... properties)
Create new ICellPopulator List with a pupulator with no generic item type for easy use
|
void |
populateItem(org.apache.wicket.markup.repeater.Item<org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator<UJO>> cellItem,
String componentId,
org.apache.wicket.model.IModel<UJO> rowModel) |
static <UJO extends org.ujorm.Ujo> |
safeList(org.ujorm.Key<UJO,?>... properties)
Deprecated.
|
public KeyPopulator(org.ujorm.core.KeyRing<UJO> key)
public KeyPopulator(org.ujorm.Key<UJO,?> key)
public void detach()
detach in interface org.apache.wicket.model.IDetachableIDetachable.detach()public void populateItem(org.apache.wicket.markup.repeater.Item<org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator<UJO>> cellItem, String componentId, org.apache.wicket.model.IModel<UJO> rowModel)
populateItem in interface org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator<UJO extends org.ujorm.Ujo>ICellPopulator.populateItem(org.apache.wicket.markup.repeater.Item,
java.lang.String, org.apache.wicket.model.IModel)public org.apache.wicket.Component getHeader(String componentId)
public boolean isSortable()
@Deprecated public static <UJO extends org.ujorm.Ujo> List<org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator<UJO>> safeList(org.ujorm.Key<UJO,?>... properties)
#list(java.lang.Class, org.ujorm.Key super UJO,?>[])public static <UJO extends org.ujorm.Ujo> List<org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator> list(org.ujorm.Key<? super UJO,?>... properties)
Copyright © 2018. All rights reserved.