Chaps, I am trying to add a button to a DataTable.
Sadly, the button is rendered as text saying [cell]
Is this expected behavior? If it is then I guess I need to wrap my
button in a Panel to make it work or is there another even simpler solution.
Code extract follows:
List<IColumn<Person>> columns = new ArrayList<IColumn<Person>>();
columns.add(new PropertyColumn<Person>(new Model<String>("id"), "id"));
columns.add(new AbstractColumn<Person>(new Model<String>("select")){
@Override
public void populateItem(Item<ICellPopulator<Person>> item,
String componentId, IModel<Person> rowModel) {
item.add(new Button(componentId,
new StringModel("Select") ){
@Override
public void onSubmit() {
System.out.println( "******************");
}
});
}
});
form.add( new DataTable<Person>(
"table", columns, new SortableDataProvider<Person>() {
...
Thanks in advance - Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]