I came up with the following class that I find very useful in our application:
public abstract class FragmentColumn<T> extends AbstractColumn<T> { private static final long serialVersionUID = 1L; protected FragmentColumn( IModel<String> displayModel ) { super(displayModel); } protected FragmentColumn( IModel<String> displayModel, String sortProperty ) { super(displayModel, sortProperty); } protected abstract Fragment<T> createFragment( String componentId, IModel<T> model ); public void populateItem( Item<ICellPopulator<T>> item, String componentId, IModel<T> itemModel ) { item.add(createFragment(componentId, itemModel)); } } Basically, it allows you to provide a Fragment (or a choice of Fragments) as the contents of your column. At runtime, you decide (by overriding the createFragment() abstract method) which Fragment will be displayed for the current row. An example would be: public class ActionsColumn extends FragmentColumn<Person> { private static final long serialVersionUID = 1L; public ActionsColumn() { super(new Model<String>("Actions")); } protected Fragment<Person> createFragment(String componentId, IModel<Person> itemModel) { if (isEditable(itemModel.getObject())) // isEditable implementation not provided! { final Fragment<Person> fragment = new Fragment<Person>(componentId, "actions", PersonListPage.this, itemModel); fragment.add(EditPersonPage.createLink("edit", itemModel. return fragment; } else { return new Fragment<Person>(componentId, "doNothing", AnalysisJobListPage.this, itemModel); } } } In the markup: <wicket:fragment wicket:id="actions"><a href="#" wicket:id="edit">edit</a></wicket:fragment> <wicket:fragment wicket:id="doNothing"> </wicket:fragment> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]