List of usage examples for org.apache.wicket.extensions.markup.html.repeater.data.table NavigatorLabel setOutputMarkupId
public final Component setOutputMarkupId(final boolean output)
From source file:com.googlecode.wicketwebbeans.containers.BeanTablePanel.java
License:Apache License
/** * Construct a new BeanTablePanel.//w w w. j av a 2 s . c o m * * @param id the Wicket id for the editor. * @param dataProvider - source of the data * @param sortStateLocator - the sorter for the dataProvider * @param metaData the meta data for the bean/row. * @param viewOnly * @param numRows the number of rows to be displayed. */ public BeanTablePanel(String id, IDataProvider dataProvider, ISortStateLocator sortStateLocator, BeanMetaData metaData, boolean viewOnly, int numRows) { super(id); this.metaData = metaData; List<IColumn> columns = new ArrayList<IColumn>(); for (ElementMetaData element : metaData.getDisplayedElements()) { columns.add(new BeanElementColumn(element, this)); } if (columns.isEmpty()) { columns.add(new EmptyColumn()); } final BeanDataTable table = new BeanDataTable("t", columns, dataProvider, sortStateLocator, numRows, metaData); add(table); final NavigatorLabel navigatorLabel = new NavigatorLabel("nl", table); navigatorLabel.setOutputMarkupId(true); add(navigatorLabel); add(new AjaxPagingNavigator("np", table) { private static final long serialVersionUID = 1L; protected void onAjaxEvent(AjaxRequestTarget target) { super.onAjaxEvent(target); target.addComponent(table); target.addComponent(navigatorLabel); } }); }