|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn<UJO>
org.ujorm.wicket.component.gridView.KeyColumn<UJO>
public class KeyColumn<UJO extends Ujo>
A convenience implementation of column that adds a Ujo Property to the cell whose model is determined by
the provided wicket property expression (same as used by PropertyModel) that is evaluated
against the current row's model object
Example:
public class DataTablePage2 extends WebPage { public DataTablePage2() { final EmployeeProvider userProvider = new EmployeeProvider(); final List<IColumn> columns = new ArrayList<IColumn>(); columns.add(new KeyColumn(Employee.ID)); columns.add(new KeyColumn(Employee.FIRSTNAME)); columns.add(new KeyColumn(Employee.LASTNAME)); columns.add(new KeyColumn(Employee.EMAIL)); columns.add(new KeyColumn(Employee.STUDENT)); add(new DefaultDataTable("datatable", columns, userProvider, 20)); } }The above will attach a label to the cell with a property model for the expression "name.first"
PropertyModel,
Serialized Form| Constructor Summary | |
|---|---|
KeyColumn(Class type,
Key property)
Deprecated. |
|
KeyColumn(Key property)
Creates a property column that is also sortable - the simplyfied methdod |
|
| Method Summary | |
|---|---|
protected org.apache.wicket.model.IModel<UJO> |
createLabelModel(org.apache.wicket.model.IModel<UJO> rowModel)
Factory method for generating a model that will generated the displayed value. |
String |
getPropertyExpression()
|
void |
populateItem(org.apache.wicket.markup.repeater.Item<org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator<UJO>> item,
String componentId,
org.apache.wicket.model.IModel<UJO> rowModel)
Implementation of populateItem which adds a label to the cell whose model is the provided property expression evaluated against rowModelObject |
| Methods inherited from class org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn |
|---|
detach, getCssClass, getDisplayModel, getHeader, getSortProperty, isSortable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Deprecated
public KeyColumn(Class type,
Key property)
displayModel - display modelsortProperty - sort propertyproperty - wicket property expression used by PropertyModelpublic KeyColumn(Key property)
displayModel - display modelsortProperty - sort propertyproperty - wicket property expression used by PropertyModel| Method Detail |
|---|
public void populateItem(org.apache.wicket.markup.repeater.Item<org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator<UJO>> item,
String componentId,
org.apache.wicket.model.IModel<UJO> rowModel)
ICellPopulator.populateItem(Item, String, IModel)protected org.apache.wicket.model.IModel<UJO> createLabelModel(org.apache.wicket.model.IModel<UJO> rowModel)
propertyExpression specified in the constructor.
rowModel -
public String getPropertyExpression()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||