当前位置: 首页>>代码示例>>Java>>正文


Java ISortableDataProvider类代码示例

本文整理汇总了Java中org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider的典型用法代码示例。如果您正苦于以下问题:Java ISortableDataProvider类的具体用法?Java ISortableDataProvider怎么用?Java ISortableDataProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ISortableDataProvider类属于org.apache.wicket.extensions.markup.html.repeater.data.table包,在下文中一共展示了ISortableDataProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testSizeNoPartitions

import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider; //导入依赖的package包/类
/**
 * Test of size method, of class PartitionedDataProvider.
 */
@Test
public void testSizeNoPartitions() {

    final ISortableDataProvider provider = context.mock(ISortableDataProvider.class);
    // create instance with no partitioning (one list item)
    final PartitionedDataProvider instance = new PartitionedDataProvider(provider, 0);

    context.checking(new Expectations() {
        {
            never(provider).size(); //should not be called, there is always 1 partition
        }
    });

    assertEquals(1, instance.size());
}
 
开发者ID:acdh-oeaw,项目名称:vlo-curation,代码行数:19,代码来源:PartitionedDataProviderTest.java

示例2: testSizePartitions

import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider; //导入依赖的package包/类
/**
 * Test of iterator method, of class PartitionedDataProvider.
 */
@Test
public void testSizePartitions() {

    final ISortableDataProvider provider = context.mock(ISortableDataProvider.class);
    // create instance with partitions of 2
    final PartitionedDataProvider instance = new PartitionedDataProvider(provider, 2);

    context.checking(new Expectations() {
        {
            oneOf(provider).size();
            will(returnValue(9L));
        }
    });

    assertEquals("ceil(9/2) = 5", 5, instance.size());
}
 
开发者ID:acdh-oeaw,项目名称:vlo-curation,代码行数:20,代码来源:PartitionedDataProviderTest.java

示例3: ModelDataTable

import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider; //导入依赖的package包/类
public ModelDataTable(final String wicketId, final TableHtmlElement element,
        final ISortableDataProvider<Object, String> sortableDataProvider, final long rowsPerPage) {
    super(wicketId, element.createWicketColumns(), sortableDataProvider, rowsPerPage);
    this.element = element;
    setOutputMarkupId(true);
    final AbstractToolbar headersToolbar = newHeadersToolbar();
    if (headersToolbar != null) {
        addTopToolbar(headersToolbar);
    }
    final NoRecordsToolbar noRecordsToolbar = newNoRecordsToolbar();
    if (noRecordsToolbar != null) {
        addBottomToolbar(noRecordsToolbar);
    }
    final NavigationToolbar navigationToolbar = newNavigationToolbar();
    if (navigationToolbar != null) {
        addBottomToolbar(navigationToolbar);
    }
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:19,代码来源:ModelDataTable.java

示例4: SortableTable

import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider; //导入依赖的package包/类
@SuppressWarnings({"unchecked"})
public SortableTable(String id, final List<IColumn<T>> columns, ISortableDataProvider<T> dataProvider,
        int rowsPerPage) {
    super(id, columns, dataProvider, rowsPerPage);
    setOutputMarkupId(true);
    setVersioned(false);
    add(new CssClass("data-table"));

    addTopToolbar(getDropDownNavToolbar());

    // add header
    AbstractToolbar headersToolbar = newHeadersToolbar();
    addTopToolbar(headersToolbar);

    // add bottom toolbars
    addBottomToolbar(new NoRecordsToolbar(this));

    notifyColumnsAttached();
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:20,代码来源:SortableTable.java

示例5: createTable

import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider; //导入依赖的package包/类
protected DataTable<Person, String> createTable(String id) {
    return createTable(id, new ITableSkeleton<Person, String>() {
        private static final long serialVersionUID = 1L;

        @Override
        public ISortableDataProvider<Person, String> getDataProvider() {
            return AbstractDataTableTest.this.getDataProvider();
        }

        @Override
        public Integer getRowsPerPage() {
            return AbstractDataTableTest.this.getRowsPerPage();
        }

        @Override
        public List<IColumn<Person, String>> getColumns() {
            return AbstractDataTableTest.this.getColumns();
        }
    });
}
 
开发者ID:flex-oss,项目名称:flex-ui,代码行数:21,代码来源:AbstractDataTableTest.java

示例6: initLayout

import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider; //导入依赖的package包/类
private void initLayout(List<IColumn<T, String>> columns, ISortableDataProvider provider, int rowsPerPage) {
    DataTable<T, String> table = new DataTable<>(ID_TABLE, columns, provider, rowsPerPage);

    table.setOutputMarkupId(true);

    TableHeadersToolbar headers = new TableHeadersToolbar(table, provider);
    headers.setOutputMarkupId(true);
    table.addTopToolbar(headers);

    CountToolbar count = new CountToolbar(table);
    addVisibleBehaviour(count, showCount);
    table.addBottomToolbar(count);

    add(table);

    NavigatorPanel nb2 = new NavigatorPanel(ID_PAGING, table, true);
    addVisibleBehaviour(nb2, showPaging);
    add(nb2);

    setItemsPerPage(rowsPerPage);
}
 
开发者ID:Evolveum,项目名称:gizmo-v3,代码行数:22,代码来源:TablePanel.java

示例7: AjaxCheckTablePanel

import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider; //导入依赖的package包/类
public AjaxCheckTablePanel(String id, List<IColumn<T, String>> columns, ISortableDataProvider<T, String> dataProvider, int rowsPerPage) {
     super(id);
     
     this.setOutputMarkupId(true);
     
     selectedObjects = new ArrayList<T>();
     
     columns.add(0, new CheckableTableColumn(new Model<String>(), "id"));
     dataTable = new BaseTable<T>(TABLE_ID, columns, dataProvider, rowsPerPage) {

private static final long serialVersionUID = 1L;

@Override
         protected Item<T> newRowItem(String id, int index, IModel<T> model) {
             return newRowTableItem(model, new HighlitableDataItem(id, index, model));
         }

     };
     // ItemReuseStrategy is usefull to refresh only modified row, but it uses hash code and equals of the model 
     // (EntityModel in this case which contains only the id)
     // So if we do a rename with this strategy, the change will not be seen (as when adding a new report for example)
     //dataTable.setItemReuseStrategy(ReuseIfModelsEqualStrategy.getInstance());
     add(dataTable);
 }
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:25,代码来源:AjaxCheckTablePanel.java

示例8: CheckTablePanel

import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider; //导入依赖的package包/类
public CheckTablePanel(String id, List<IColumn<T, String>> columns, ISortableDataProvider<T, String> provider, int rows) {
    super(id);

    group = new CheckGroup<T>("group", marked);

    this.dataTable = new BaseTable<T>("table", createTableColumns(columns), provider, rows) {

        @Override
        protected Item<T> newRowItem(String s, int i, IModel<T> entityIModel) {
            Item<T> item = super.newRowItem(s, i, entityIModel);
            return newRowTableItem(entityIModel, item);
        }

    };
    
    Form<T> form = new Form<T>("form");
    group.add(dataTable);
    form.add(group);
    add(form);
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:21,代码来源:CheckTablePanel.java

示例9: createTablePanel

import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider; //导入依赖的package包/类
protected AjaxCheckTablePanel<Entity> createTablePanel(ISortableDataProvider<Entity, String> dataProvider) {
     return new AjaxCheckTablePanel<Entity>("work", createTableColumns(), dataProvider, getEntitiesPerPage()) {
     	
private static final long serialVersionUID = 1L;

@Override
         protected Item<Entity> newRowTableItem(IModel<Entity> entityIModel, Item<Entity> item) {
             // select report from scheduler job action or dashboard GoToReport
             selectEntity(entityIModel.getObject(), item, ReportSection.ID);
             // select chart from dashboard GoTo
             selectEntity(entityIModel.getObject(), item, ChartSection.ID);
             // select data source from audit GoTo
             selectEntity(entityIModel.getObject(), item, DataSourceSection.ID);
             // select scheduler from audit GoTo
             selectEntity(entityIModel.getObject(), item, SchedulerSection.ID);
             
             return item;
         }
     	
     };
 }
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:22,代码来源:EntityBrowserPanel.java

示例10: DefaultDataTable

import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider; //导入依赖的package包/类
public DefaultDataTable(final String id, final List<? extends IColumn<T, S>> columns,
		final ISortableDataProvider<T, S> dataProvider, final int rowsPerPage) {
	super(id, columns, dataProvider, rowsPerPage);

	addBottomToolbar(new AjaxNavigationToolbar(this) {

		@Override
		protected PagingNavigator newPagingNavigator(String navigatorId, DataTable<?, ?> table) {
			return new BootstrapAjaxPagingNavigator(navigatorId, table);
		}
		
	});
	addTopToolbar(new AjaxFallbackHeadersToolbar<S>(this, dataProvider));
	addBottomToolbar(new NoRecordsToolbar(this));
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:16,代码来源:DefaultDataTable.java

示例11: BoxedTablePanel

import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider; //导入依赖的package包/类
public BoxedTablePanel(String id, ISortableDataProvider provider, List<IColumn<T, String>> columns,
		UserProfileStorage.TableId tableId, int pageSize) {
	super(id);
	this.tableId = tableId;

	initLayout(columns, provider, pageSize);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:8,代码来源:BoxedTablePanel.java

示例12: initLayout

import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider; //导入依赖的package包/类
private void initLayout(List<IColumn<T, String>> columns, ISortableDataProvider provider, int pageSize) {
       setOutputMarkupId(true);
	WebMarkupContainer box = new WebMarkupContainer(ID_BOX);
	box.add(new AttributeAppender("class", new AbstractReadOnlyModel<String>() {
		private static final long serialVersionUID = 1L;

		@Override
		public String getObject() {
			String boxCssClasses = getAdditionalBoxCssClasses();
			if (boxCssClasses == null) {
				return "";
			} else {
				return " " + boxCssClasses;
			}
		}
	}));
	add(box);

	WebMarkupContainer tableContainer = new WebMarkupContainer(ID_TABLE_CONTAINER);
	tableContainer.setOutputMarkupId(true);

	DataTable<T, String> table = new SelectableDataTable<T>(ID_TABLE, columns, provider, pageSize) {
		@Override
		protected Item<T> newRowItem(String id, int index, IModel<T> rowModel) {
			Item<T> item = super.newRowItem(id, index, rowModel);
			return customizeNewRowItem(item, rowModel);
		}
	};
	table.setOutputMarkupId(true);
	tableContainer.add(table);
	box.add(tableContainer);

	TableHeadersToolbar headersTop = new TableHeadersToolbar(table, provider);
	headersTop.setOutputMarkupId(true);
	table.addTopToolbar(headersTop);

	box.add(createHeader(ID_HEADER));
	box.add(createFooter(ID_FOOTER));
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:40,代码来源:BoxedTablePanel.java

示例13: TablePanel

import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider; //导入依赖的package包/类
public TablePanel(String id, ISortableDataProvider provider, List<IColumn<T, String>> columns,
                  UserProfileStorage.TableId tableId, long pageSize) {
    super(id);
    Validate.notNull(provider, "Object type must not be null.");
    Validate.notNull(columns, "Columns must not be null.");

    this.tableId = tableId;

    initLayout(columns, provider, pageSize);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:11,代码来源:TablePanel.java

示例14: showPagedPagingModel

import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider; //导入依赖的package包/类
private IModel<Boolean> showPagedPagingModel(ISortableDataProvider provider) {
    if (!(provider instanceof BaseSortableDataProvider)) {
        return new AbstractReadOnlyModel<Boolean>() {
            @Override
            public Boolean getObject() {
                return true;
            }
        };
    }

    BaseSortableDataProvider baseProvider = (BaseSortableDataProvider) provider;
    return baseProvider.isSizeAvailableModel();
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:14,代码来源:TablePanel.java

示例15: initLayout

import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider; //导入依赖的package包/类
protected void initLayout(UserProfileStorage.TableId tableId, int pageSize) {
      List<IColumn<DecisionDto, String>> columns = new ArrayList<>();
      columns.add(new PropertyColumn<>(createStringResource("DecisionsPanel.user"), DecisionDto.F_USER));
      columns.add(new PropertyColumn<>(createStringResource("DecisionsPanel.originalActor"), DecisionDto.F_ORIGINAL_ACTOR));
      columns.add(new PropertyColumn<>(createStringResource("DecisionsPanel.stage"), DecisionDto.F_STAGE));
columns.add(createOutcomeColumn());
      columns.add(new PropertyColumn<DecisionDto, String>(createStringResource("DecisionsPanel.comment"), DecisionDto.F_COMMENT));
      columns.add(new PropertyColumn<>(createStringResource("DecisionsPanel.when"), DecisionDto.F_TIME));
      columns.add(new PropertyColumn<>(createStringResource("DecisionsPanel.escalation"), DecisionDto.F_ESCALATION_LEVEL_NUMBER));

      ISortableDataProvider provider = new ListDataProvider<>(this, getModel());
      BoxedTablePanel decisionsTable = new BoxedTablePanel<>(ID_DECISIONS_TABLE, provider, columns, tableId, pageSize);
      add(decisionsTable);
  }
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:15,代码来源:DecisionsPanel.java


注:本文中的org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。