comparison src/main/webapp/home/searchPage.xhtml @ 5:5316e79f9a27

Implementation of search pagination and lazy loading to display the result set of a search.
author "jurzua <jurzua@mpiwg-berlin.mpg.de>"
date Mon, 16 Mar 2015 11:25:36 +0100
parents 7682c04c63a8
children
comparison
equal deleted inserted replaced
4:af1f13b60a3c 5:5316e79f9a27
32 image="#{appBean.searchImage}"/> 32 image="#{appBean.searchImage}"/>
33 </h:panelGrid> 33 </h:panelGrid>
34 34
35 <h:outputLabel value="#{sessionBean.searchPage.message}"/> 35 <h:outputLabel value="#{sessionBean.searchPage.message}"/>
36 36
37 <h:panelGrid columns="1" rendered="#{!empty sessionBean.searchPage.sectionList}" style="width: 90%; margin-left: auto;margin-right: auto;"> 37 <h:panelGrid columns="1" rendered="#{!empty sessionBean.searchPage.completeSectionList}"
38 <ace:dataTable var="section" value="#{sessionBean.searchPage.sectionList}"> 38 style="width: 90%; margin-left: auto;margin-right: auto;text-align: center;" styleClass="centerTable">
39 <ace:column headerText="Book Id"> 39
40 <h:panelGroup >
41 <h:commandButton image="#{appBean.paginatorFirst}"
42 style="border:none;" title="First Page"
43 action="#{sessionBean.searchPage.advancedFirst}"/>
44
45 <h:commandButton image="#{appBean.paginatorFr}"
46 style="border:none;" title="Fast Backwards"
47 action="#{sessionBean.searchPage.advancedFastRewind}"/>
48
49 <h:commandButton image="#{appBean.paginatorPrevious}"
50 style="border:none;" title="Previous Page"
51 action="#{sessionBean.searchPage.advancedPrevious}"/>
52
53 <h:outputLabel value="#{sessionBean.searchPage.advancedPaginator.recordStatus}"/>
54
55 <h:commandButton image="#{appBean.paginatorNext}"
56 style="border:none;" title="Next Page"
57 action="#{sessionBean.searchPage.advancedNext}"/>
58
59 <h:commandButton image="#{appBean.paginatorFf}"
60 style="border:none;" title="Fast Forward"
61 action="#{sessionBean.searchPage.advancedFastForward}"/>
62
63 <h:commandButton image="#{appBean.paginatorLast}"
64 style="border:none;" title="Last Page"
65 action="#{sessionBean.searchPage.advancedLast}"/>
66 </h:panelGroup>
67
68 <ace:dataTable
69 var="section"
70 value="#{sessionBean.searchPage.currentSectionList}">
71
72 <ace:column headerText="Book Id">
40 <h:outputText value="#{section.book.id}"/> 73 <h:outputText value="#{section.book.id}"/>
41 </ace:column> 74 </ace:column>
42 <ace:column headerText="Book Name"> 75 <ace:column headerText="Book Name">
43 <h:outputText value="#{section.book.name}"/> 76 <h:outputText value="#{section.book.name}"/>
44 </ace:column> 77 </ace:column>
60 <ace:column headerText="Edition"> 93 <ace:column headerText="Edition">
61 <h:outputText value="#{section.book.edition}"/> 94 <h:outputText value="#{section.book.edition}"/>
62 </ace:column> 95 </ace:column>
63 <ace:column headerText="Create Branch"> 96 <ace:column headerText="Create Branch">
64 <h:commandButton 97 <h:commandButton
65 value="Create Branch in Extraction Interface" 98 value="Show Section in Extraction Interface"
66 title="Create Branch in Extraction Interface" 99 title="Show Section in Extraction Interface"
67 onclick="sectionInExtractionInterface(#{section.id}, '#{section.name}', #{section.book.id}, '#{section.book.name}', #{sessionBean.user.id}, '#{appBean.extractionInterfaceUrl}');" 100 onclick="sectionInExtractionInterface(#{section.id}, '#{section.name}', #{section.book.id}, '#{section.book.name}', #{sessionBean.user.id}, '#{appBean.extractionInterfaceUrl}');"
68 image="#{appBean.newBranchImage}"/> 101 image="#{appBean.showImage}"/>
69 </ace:column> 102 </ace:column>
70 <ace:column headerText="Existing Branches"> 103 <ace:column headerText="Existing Branches">
71 <ace:dataTable value="#{section.branches}" var="branch" rendered="#{!empty section.branches}"> 104 <ace:dataTable value="#{section.branches}" var="branch" rendered="#{!empty section.branches}">
72 <ace:column> 105 <ace:column>
73 <h:outputLabel value="[#{branch.id}] #{branch.label}"/> 106 <h:outputLabel value="[#{branch.id}] #{branch.label}"/>
83 styleClass="iconLink"> 116 styleClass="iconLink">
84 <h:graphicImage value="#{appBean.branchDetailsImage}"/> 117 <h:graphicImage value="#{appBean.branchDetailsImage}"/>
85 </h:outputLink> 118 </h:outputLink>
86 </ace:column> 119 </ace:column>
87 </ace:dataTable> 120 </ace:dataTable>
88 </ace:column> 121 </ace:column>
89 </ace:dataTable> 122
123 </ace:dataTable>
124
125 <h:panelGroup >
126 <h:commandButton image="#{appBean.paginatorFirst}"
127 style="border:none;" title="First Page"
128 action="#{sessionBean.searchPage.advancedFirst}"/>
129
130 <h:commandButton image="#{appBean.paginatorFr}"
131 style="border:none;" title="Fast Backwards"
132 action="#{sessionBean.searchPage.advancedFastRewind}"/>
133
134 <h:commandButton image="#{appBean.paginatorPrevious}"
135 style="border:none;" title="Previous Page"
136 action="#{sessionBean.searchPage.advancedPrevious}"/>
137
138 <h:outputLabel value="#{sessionBean.searchPage.advancedPaginator.recordStatus}"/>
139
140 <h:commandButton image="#{appBean.paginatorNext}"
141 style="border:none;" title="Next Page"
142 action="#{sessionBean.searchPage.advancedNext}"/>
143
144 <h:commandButton image="#{appBean.paginatorFf}"
145 style="border:none;" title="Fast Forward"
146 action="#{sessionBean.searchPage.advancedFastForward}"/>
147
148 <h:commandButton image="#{appBean.paginatorLast}"
149 style="border:none;" title="Last Page"
150 action="#{sessionBean.searchPage.advancedLast}"/>
151 </h:panelGroup>
152
153
154
90 </h:panelGrid> 155 </h:panelGrid>
91 156
92 157
93 </ice:form> 158 </ice:form>
94 159