Changeset 4556
- Timestamp:
- 02/25/14 12:42:33 (10 years ago)
- Location:
- vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/components
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/components/SearchResultsPanel.html
r4554 r4556 30 30 31 31 <div class="searchresultpagination"> 32 < wicket:container wicket:id="pagingTop">[PAGING]</wicket:container>32 <div wicket:id="pagingTop">[PAGING]</div> 33 33 </div> 34 34 … … 113 113 </ul> 114 114 <div id="searchresultpagination"> 115 < wicket:container wicket:id="pagingBottom">[PAGING]</wicket:container>115 <div wicket:id="pagingBottom">[PAGING]</div> 116 116 117 117 <form wicket:id="resultPageSizeForm" id="resultpagesizeform"> -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/components/SearchResultsPanel.java
r4554 r4556 54 54 private SolrDocumentService documentService; 55 55 private final IDataProvider<SolrDocument> solrDocumentProvider; 56 56 private final DataView<SolrDocument> resultsView; 57 57 58 public SearchResultsPanel(String id, IModel<QueryFacetsSelection> model) { 58 59 super(id, model); 59 60 solrDocumentProvider = new SolrDocumentProvider(documentService, model); 60 61 // dynamic results view 62 final DataView<SolrDocument> resultsView = createResultsView("resultItem"); 63 add(resultsView); 61 62 add(resultsView = createResultsView("resultItem")); 64 63 65 64 // pagination navigators … … 80 79 } 81 80 81 @Override 82 protected void onConfigure() { 83 // only show pagination navigators if there's more than one page 84 final boolean showPaging = resultsView.getPageCount() > 1; 85 this.get("pagingTop").setVisible(showPaging); 86 this.get("pagingBottom").setVisible(showPaging); 87 } 88 82 89 private DataView<SolrDocument> createResultsView(String id) { 83 final DataView<SolrDocument> resultsView =new DataView<SolrDocument>(id, solrDocumentProvider, 10) {90 return new DataView<SolrDocument>(id, solrDocumentProvider, 10) { 84 91 85 92 @Override … … 91 98 } 92 99 }; 93 return resultsView;94 100 } 95 101
Note: See TracChangeset
for help on using the changeset viewer.