Showing posts with label af:panelCollection. Show all posts
Showing posts with label af:panelCollection. Show all posts

Tuesday, November 2, 2010

ADF UI - How to get 'Format' menu for table in af:panelCollection?

TO get the 'Format' menu in af:panelCollection, set columnSelection="multiple" for the af:table inside panelCollection. Actually, setting columnSelection="multiple" will allow user to select multiple table columns at once and apply formatting (Like resizing columns, wrapping the content in the columns, etc.,) and it'll also render a footer for the table which will show status messages like 'columnsHidden'.
<af:table value="#{bindings.EmpDeptVO.collectionModel}" var="row" rows="#{bindings.EmpDeptVO.rangeSize}" emptyText="#{bindings.EmpDeptVO.viewable ? 'No data to display.' : 'Access Denied.'}" fetchSize="#{bindings.EmpDeptVO.rangeSize}" rowBandingInterval="0" selectedRowKeys="#{bindings.EmpDeptVO.collectionModel.selectedRow}" selectionListener="#{bindings.EmpDeptVO.collectionModel.makeCurrent}" rowSelection="single" id="t1" styleClass="AFStretchWidth" columnSelection="multiple" first="0" contentDelivery="immediate" autoHeightRows="10">

Format menu in panelCollection:
Status bar showing 'Columns Hidden':

ADF UI - Hiding 'Detach', 'Wrap' and 'Freeze' icons from af:panelCollection

If you dropped af:table inside af:panelCollection, then by default the buttons 'Datach' button icon will be rendered. Similarly, if you specify columnSelction="multiple", the buttons 'Wrap' and 'Freeze' will be rendered by default. So, if you want to hide those buttons, just specify featuresOff="detach freeze wrap" for af:panelCollection.

Sample code below:
<af:panelCollection id="pc1" styleClass="AFStretchWidth" featuresOff="detach freeze wrap">

PanelCollection without "featuresOff" set:

After setting featuresOff="detach freeze wrap":

As you can see, the panelCollection is clean without 'Detach', 'Freeze' and 'Wrap' icons after setting featuresOff="detach freeze wrap" .
Related Posts with Thumbnails