Skip to content

Instantly share code, notes, and snippets.

@CedricL46
Last active March 13, 2019 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CedricL46/014c4b7407b0fe34eb44a38ace55060d to your computer and use it in GitHub Desktop.
Save CedricL46/014c4b7407b0fe34eb44a38ace55060d to your computer and use it in GitHub Desktop.
EL Expression to check and hide if an ADF rich table is empty with no data to display
<!--
Add visble or rendered attribute :
rendered="#{bindings.YOUR_TABLE_ITERATOR.estimatedRowCount gt 0}"
to your table OR to it's parent layout element
-->
<af:table value="#{bindings.YOUR_TABLE_ITERATOR.collectionModel}" var="row" rows="#{bindings.YOUR_TABLE_ITERATOR.rangeSize}" fetchSize="#{bindings.YOUR_TABLE_ITERATOR.rangeSize}"
varStatus="vs" styleClass="AFStretchWidth"
selectedRowKeys="#{bindings.YOUR_TABLE_ITERATOR.collectionModel.selectedRow}" selectionListener="#{bindings.YOUR_TABLE_ITERATOR.collectionModel.makeCurrent}"
immediate="true" emptyText="#{bindings.YOUR_TABLE_ITERATOR.viewable ? 'No data to display.' : 'Access Denied.'}" id="tableID"
contentDelivery="immediate"
rendered="#{bindings.YOUR_TABLE_ITERATOR.estimatedRowCount gt 0}"
>
<af:column sortProperty="#{bindings.YOUR_TABLE_ITERATOR.hints.NomFile.name}" filterable="true" sortable="false" id="dc_c1" width="60" headerText="">
<!-- -->
</af:column>
<!-- -->
</af:table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment