summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-08-07 02:05:31 (EDT)
committerStephan Born2013-09-23 04:58:30 (EDT)
commitbdffdd3a5ac5c1d0c15e89441655ce4187100533 (patch)
treea723ff8f4f7ba57f9d588c7a1bdf4884afaebb7d
parentec1e12e64b60609a37d310d46c3f28118c2b1810 (diff)
downloadorg.eclipse.stardust.ui.web-bdffdd3a5ac5c1d0c15e89441655ce4187100533.zip
org.eclipse.stardust.ui.web-bdffdd3a5ac5c1d0c15e89441655ce4187100533.tar.gz
org.eclipse.stardust.ui.web-bdffdd3a5ac5c1d0c15e89441655ce4187100533.tar.bz2
Jira-ID: CRNT-29526
Added displayTotalCount flag variable for genericDataTable.xhtml to display totalCount when 1page available for paginator table. Added I18N message bundle entry common.genericDataTable.paginationInfo.noPaginator.totalCount for displaying totalcount. git-svn-id: https://svn.csa.sungard.com/repos/ipp2/product/trunk/stardust/ui.web@66523 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b Signed-off-by: Sidharth Singh <sidharth.singh@sungard.com>
-rw-r--r--portal-common/src/main/resources/META-INF/tags/genericDataTable.xhtml16
-rw-r--r--portal-common/src/main/resources/portal-common-messages_en.properties5
2 files changed, 14 insertions, 7 deletions
diff --git a/portal-common/src/main/resources/META-INF/tags/genericDataTable.xhtml b/portal-common/src/main/resources/META-INF/tags/genericDataTable.xhtml
index cfba1b6..9bf551a 100644
--- a/portal-common/src/main/resources/META-INF/tags/genericDataTable.xhtml
+++ b/portal-common/src/main/resources/META-INF/tags/genericDataTable.xhtml
@@ -100,8 +100,10 @@
<c:set var="displayPaginator"
value="#{paginatorTable ? (table.rowCount > table.pageSize ? true : false) : false}" />
-
- <c:if test="#{sortSupported}">
+ <!-- displayTotalCount :flag used to display totalCount for paginatorTable if only 1 page is available -->
+ <c:set var="displayTotalCount"
+ value="#{paginatorTable ? ((table.rowCount > 0 and (table.rowCount lt table.pageSize)) ? true : false) : false}" />
+ <c:if test="#{sortSupported}">
<c:set var="sortModel" value="#{paginatorTable ? table.sortModel : table.comparator}" />
<c:set var="sortColumn" value="#{sortModel.sortColumnProperty}" />
<c:set var="sortAscending" value="#{sortModel.ascending}" />
@@ -183,9 +185,9 @@
</ice:panelGroup>
<!-- ********** DATA TABLE PAGIANTION INFO ********** -->
- <c:if test="#{displayPaginator}">
+ <c:if test="#{displayPaginator or displayTotalCount}">
<ice:panelGroup
- rendered="#{displayPaginator}"
+ rendered="#{displayPaginator or displayTotalCount}"
styleClass="#{styleClass}PaginatorInfoSection"
style="width:100%; margin-top: 2px;">
@@ -200,7 +202,7 @@
pageCountVar="pageCount"
pageIndexVar="pageIndex">
<ice:outputFormat styleClass="#{styleClass}PaginatorInfo"
- value="#{common_msgPropsBean['common.genericDataTable.paginationInfo']}">
+ value="#{common_msgPropsBean['common.genericDataTable.paginationInfo']}" rendered="#{displayPaginator}" >
<f:param value="#{rowsCount}"/>
<f:param value="#{displayedRowsCountVar}"/>
<f:param value="#{firstRowIndex}"/>
@@ -208,6 +210,10 @@
<f:param value="#{pageIndex}"/>
<f:param value="#{pageCount}"/>
</ice:outputFormat>
+ <ice:outputFormat styleClass="#{styleClass}PaginatorInfo"
+ value="#{common_msgPropsBean['common.genericDataTable.paginationInfo.noPaginator.totalCount']}" rendered="#{displayTotalCount}" >
+ <f:param value="#{rowsCount}"/>
+ </ice:outputFormat>
</ice:dataPaginator>
</c:if>
<c:if test="#{not table.totalCountSuported}">
diff --git a/portal-common/src/main/resources/portal-common-messages_en.properties b/portal-common/src/main/resources/portal-common-messages_en.properties
index 2b32ea7..0bc73fd 100644
--- a/portal-common/src/main/resources/portal-common-messages_en.properties
+++ b/portal-common/src/main/resources/portal-common-messages_en.properties
@@ -154,8 +154,9 @@ common.genericDataTable.checkAll=Check
common.genericDataTable.checkAll.title=Select All
common.genericDataTable.uncheckAll=Uncheck
common.genericDataTable.uncheckAll.title=Select None
-common.genericDataTable.paginationInfo={0} records(s) found, displaying {1} records(s), from {2} to {3}. Page {4} / {5}.
-common.genericDataTable.paginationInfo.noTotalCount=Many records(s) found, displaying Page {0}.
+common.genericDataTable.paginationInfo={0} records(s) found, displaying {1} record(s), from {2} to {3}. Page {4} / {5}.
+common.genericDataTable.paginationInfo.noPaginator.totalCount={0} record(s) found.
+common.genericDataTable.paginationInfo.noTotalCount=Many record(s) found, displaying Page {0}.
common.genericDataTable.noRecordsFoundLabel=No Records Found
common.genericDataTable.paginator.first.title=First Page
common.genericDataTable.paginator.last.title=Last Page