Display selected table row number and total rows
example used below, the format is
row no. [<row index>] of max rows [<total numbers of rows>]
For this example, I used an af:outputText component to
display the information on the page. The value of the af:outputText component is calculated from expression language (EL)
accessing the ADF binding layer as shown below. Note that for better readability the EL includes line breaks, which in your application you should not add.
display the information on the page. The value of the af:outputText component is calculated from expression language (EL)
accessing the ADF binding layer as shown below. Note that for better readability the EL includes line breaks, which in your application you should not add.
row no. [
#{(bindings.allDepartmentsIterator.rangeStart< 0 ?
1 : bindings.allDepartmentsIterator.rangeStart+1) +
(
bindings.allDepartmentsIterator.currentRowIndexInRange == -1 ?
0 :
bindings.allDepartmentsIterator.currentRowIndexInRange)}]
of max rows[
#{bindings.allDepartmentsIterator.estimatedRowCount}]
Note
how the expression uses the iterator binding in the ADF binding layer to determine
the maximum number of table rows. It then uses the same iterator to determine
the current row. Because iterators are zero based, the EL uses additional logic
to compensate this.
how the expression uses the iterator binding in the ADF binding layer to determine
the maximum number of table rows. It then uses the same iterator to determine
the current row. Because iterators are zero based, the EL uses additional logic
to compensate this.
The af:outputText component needs to have its PartialTriggers property pointing the the af:table component ID to ensure the displayed information is refreshed when the table row currency changes.
<af:outputText value="row no. [#{(bindings.allDepartmentsIterator.rangeStart < 0 ? 1 : bindings.allDepartmentsIterator.rangeStart+1) +( bindings.allDepartmentsIterator.currentRowIndexInRange == -1 ? 0 : bindings.allDepartmentsIterator.currentRowIndexInRange)}] of max rows [#{bindings.allDepartmentsIterator.estimatedRowCount}]" id="ot1" partialTriggers="pc1:t1"/>
No comments:
Post a Comment