本文整理匯總了Java中org.apache.wicket.markup.repeater.AbstractPageableView類的典型用法代碼示例。如果您正苦於以下問題:Java AbstractPageableView類的具體用法?Java AbstractPageableView怎麽用?Java AbstractPageableView使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
AbstractPageableView類屬於org.apache.wicket.markup.repeater包,在下文中一共展示了AbstractPageableView類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: SearchResultsHeaderPanel
import org.apache.wicket.markup.repeater.AbstractPageableView; //導入依賴的package包/類
public SearchResultsHeaderPanel(String id, IModel<QueryFacetsSelection> model, AbstractPageableView<SolrDocument> resultsView, IDataProvider<SolrDocument> solrDocumentProvider) {
super(id, model);
this.solrDocumentProvider = solrDocumentProvider;
this.resultsView = resultsView;
add(createSearchInfoLabel("searchInfo"));
add(createQuerySelectionItems("querySelection"));
// form to select number of results per page
add(createResultPageSizeForm("resultPageSizeForm", resultsView));
//For Ajax updating of search results
setOutputMarkupId(true);
}
示例2: addComponents
import org.apache.wicket.markup.repeater.AbstractPageableView; //導入依賴的package包/類
private void addComponents() {
searchContainer = new WebMarkupContainer("searchContainer");
searchContainer.add(new AttributeModifier("class", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return simpleModeModel.getObject() ? "simple" : "";
}
}));
searchContainer.setOutputMarkupId(true);
add(searchContainer);
final IDataProvider<SolrDocument> solrDocumentProvider = new SolrDocumentProvider(getModel());
navigation = createNavigation("navigation");
searchContainer.add(navigation);
searchForm = createSearchForm("search");
searchContainer.add(searchForm);
//selections panel (facets and options)
selections = new WebMarkupContainer("selections") {
@Override
protected void onConfigure() {
final Map<String, FacetSelection> facetSelection = FacetedSearchPage.this.getModel().getObject().getSelection();
setVisible(solrDocumentProvider.size() > 0
|| (facetSelection != null && !facetSelection.isEmpty()));
}
};
facetsPanel = createFacetsPanel("facets");
availabilityFacetPanel = createAvailabilityPanel("availability");
optionsPanel = createOptionsPanel("options");
searchContainer.add(selections
.add(facetsPanel)
.add(availabilityFacetPanel)
.add(optionsPanel)
.setOutputMarkupPlaceholderTag(true)
);
// make "selections" panel collapsable on smaller screens
final IModel<Boolean> selectionsExpandedModel = Model.of(false);
searchContainer.add(new IndicatingAjaxFallbackLink("toggleSelections") {
@Override
public void onClick(AjaxRequestTarget target) {
selectionsExpandedModel.setObject(!selectionsExpandedModel.getObject());
if (target != null) {
target.add(selections);
target.add(this);
}
}
}
.add(new Label("toggleSelectionsLabel", // dynamic button label
new BooleanOptionsModel<>(selectionsExpandedModel,
Model.of("Hide facets and search options"),
Model.of("Show facets and search options"))))
.setOutputMarkupId(true)
);
selections.add(new AttributeAppender("class", // set style for collapsed
new BooleanOptionsModel<>(selectionsExpandedModel,
Model.of(""),
Model.of("collapsed-xs-sm")),
" "));
//search results panel and header
searchResultsPanel = new SearchResultsPanel("searchResults", getModel(), solrDocumentProvider) {
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(solrDocumentProvider.size() > 0);
}
};
searchContainer.add(searchResultsPanel.setOutputMarkupPlaceholderTag(true));
final AbstractPageableView<SolrDocument> resultsView = searchResultsPanel.getResultsView();
resultsHeader = createResultsHeader("searchresultsheader", getModel(), resultsView, solrDocumentProvider);
searchContainer.add(resultsHeader.setOutputMarkupId(true));
}
示例3: getResultsView
import org.apache.wicket.markup.repeater.AbstractPageableView; //導入依賴的package包/類
public AbstractPageableView<SolrDocument> getResultsView() {
return resultsView;
}