我需要在 CustomPagingPanel DropDownChoice 中更改我收集有关分页的信息(如 [1-50]、[51-100])到 ListView。所以我有一个代码:
// Ajax DropDownChoice used as Page navigator
pagingDropDownChoice = new DropDownChoice("pagesDropDown", new PropertyModel(this, "currentPage"), new PropertyModel(this, "pages"), new ChoiceRenderer("period", "pageNum"));
pagingDropDownChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
criteria.setPageNum((int)currentPage.getPageNum());
updatePagingList(target);
setLinkVisibility();
target.add(pagingSizeLabel);
target.add(pagingDropDownChoice);
target.add(nextLink);
target.add(previousLink);
}
});
add(pagingDropDownChoice.setOutputMarkupId(true));
问题是 Wicket 中的 DropDownChoice 生成<select>
标签,我需要<ul><li>
HTML 标记中的标签。