Skip to content

Commit

Permalink
Added All Rows auto-disable based on Paginator.maxItemsPerPage inject…
Browse files Browse the repository at this point in the history
…able setting.
  • Loading branch information
taboraz committed Jan 24, 2008
1 parent 48b1704 commit e29a0f5
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,27 @@
<h:graphicImage value="${pageLastImg}" border="0" styleClass="${paginatorImageButtonClass}"/>
</crank:commandLink>
<h:graphicImage value="${pageLastDisabledImg}" border="0" rendered="#{not paginator.moveToEndPageEnabled}" styleClass="${paginatorImageButtonClass}"/>

<c:if test="${ paginator.allowAllRows }">
<h:selectOneMenu value="#{paginator.itemsPerPage}" styleClass="dropdownSmall" title="Click to select the number of items per page">
<f:selectItem itemLabel="10 rows" itemValue="10"/>
<f:selectItem itemLabel="20 rows" itemValue="20"/>
<f:selectItem itemLabel="50 rows" itemValue="50"/>
<f:selectItem itemLabel="100 rows" itemValue="100"/>
<f:selectItem itemLabel="All rows" itemValue="${paginator.maxItemsPerPage}"/>
<a4j:support action="#{paginator.reset}" event="onchange" ajaxSingle="true" reRender="${refreshPaginator}" />
</h:selectOneMenu>
</c:if>
<c:if test="${ not paginator.allowAllRows }">
<h:selectOneMenu value="#{paginator.itemsPerPage}" styleClass="dropdownSmall" title="Click to select the number of items per page">
<f:selectItem itemLabel="10 rows" itemValue="10"/>
<f:selectItem itemLabel="20 rows" itemValue="20"/>
<f:selectItem itemLabel="50 rows" itemValue="50"/>
<f:selectItem itemLabel="100 rows" itemValue="100"/>
<a4j:support action="#{paginator.reset}" event="onchange" ajaxSingle="true" reRender="${refreshPaginator}" />
</h:selectOneMenu>
</c:if>

<h:selectOneMenu value="#{paginator.itemsPerPage}" styleClass="dropdownSmall" title="Click to select the number of items per page">
<f:selectItem itemLabel="10 rows" itemValue="10"/>
<f:selectItem itemLabel="20 rows" itemValue="20"/>
<f:selectItem itemLabel="50 rows" itemValue="50"/>
<f:selectItem itemLabel="100 rows" itemValue="100"/>
<f:selectItem itemLabel="All rows" itemValue="100000"/>
<a4j:support action="#{paginator.reset}" event="onchange" ajaxSingle="true" reRender="${refreshPaginator}" />
</h:selectOneMenu>
<a4j:status startText="Paginating..." stopText="" for="paginatorRegion${id}"
startStyleClass="statusStartStyleClass" stopStyleClass="statusStopStyleClass" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,18 +368,26 @@
<h:graphicImage value="${pageLastImg}" border="0" styleClass="${paginatorImageButtonClass}"/>
</crank:commandLink>
<h:graphicImage value="${pageLastDisabledImg}" border="0" rendered="#{not paginator.moveToEndPageEnabled}" styleClass="${paginatorImageButtonClass}"/>

<h:selectOneMenu value="#{paginator.itemsPerPage}" styleClass="dropdownSmall" title="Click to select the number of items per page"
immediate="${immediate}">
<f:selectItem itemLabel="10 rows" itemValue="10"/>
<f:selectItem itemLabel="20 rows" itemValue="20"/>
<f:selectItem itemLabel="50 rows" itemValue="50"/>
<f:selectItem itemLabel="100 rows" itemValue="100"/>
<f:selectItem itemLabel="All rows" itemValue="100000"/>
<a4j:support action="#{paginator.reset}" event="onchange" ajaxSingle="true" reRender="${refreshPaginator}" />
</h:selectOneMenu>



<c:if test="${ paginator.allowAllRows }">
<h:selectOneMenu value="#{paginator.itemsPerPage}" styleClass="dropdownSmall" title="Click to select the number of items per page">
<f:selectItem itemLabel="10 rows" itemValue="10"/>
<f:selectItem itemLabel="20 rows" itemValue="20"/>
<f:selectItem itemLabel="50 rows" itemValue="50"/>
<f:selectItem itemLabel="100 rows" itemValue="100"/>
<f:selectItem itemLabel="All rows" itemValue="${paginator.maxItemsPerPage}"/>
<a4j:support action="#{paginator.reset}" event="onchange" ajaxSingle="true" reRender="${refreshPaginator}" />
</h:selectOneMenu>
</c:if>
<c:if test="${ not paginator.allowAllRows }">
<h:selectOneMenu value="#{paginator.itemsPerPage}" styleClass="dropdownSmall" title="Click to select the number of items per page">
<f:selectItem itemLabel="10 rows" itemValue="10"/>
<f:selectItem itemLabel="20 rows" itemValue="20"/>
<f:selectItem itemLabel="50 rows" itemValue="50"/>
<f:selectItem itemLabel="100 rows" itemValue="100"/>
<a4j:support action="#{paginator.reset}" event="onchange" ajaxSingle="true" reRender="${refreshPaginator}" />
</h:selectOneMenu>
</c:if>

</h:panelGroup>
</h:panelGrid>
Expand Down

0 comments on commit e29a0f5

Please sign in to comment.