First page Back Continue Last page Graphics


Notes:

Declarative PPR Example (continued)

<af:table value="#{bindings.ShoppingCartItem1.collectionModel}"

var="row" rows="#{bindings.ShoppingCartItem1.rangeSize}"

first="#{bindings.ShoppingCartItem1.rangeStart}"

emptyText="#{bindings.ShoppingCartItem1.viewable ? 'No rows yet.' : 'Access Denied.'}"

fetchSize="#{bindings.ShoppingCartItem1.rangeSize}“ selectedRowKeys= "#{bindings.ShoppingCartItem1.collectionModel.selectedRow}"

selectionListener= "#{bindings.ShoppingCartItem1.collectionModel.makeCurrent}"

rowSelection="single" id="table1" inlineStyle="width:100%"

contextMenuId="tablePopup"

partialTriggers="deleteToolbarButton menuDelete updateToolbarButton">

//list of columns //... //...

</af:table>

<af:popup id="tablePopup">

<af:menu text="menu 1" id="tablePopupMenu">

<af:commandMenuItem text="Delete"

actionListener="#{FODShoppingCartBean.onDeleteRow}"

id="menuDelete" partialSubmit="true">

<af:setActionListener from="#{'Modified'}"

to="#{requestScope.cartStatus}"/>

</af:commandMenuItem>

</af:menu>

</af:popup>

</af:panelCollection>

This example illustrates setting partialTriggers on a table to the IDs of three components. You can see that it is not necessary to explicitly set partialSubmit on the toolbar buttons, because it is set to true by default on this type of component. However, partialSubmit has been explicitly set to true on the command menu item, even though it was not necessary to explicitly do so because it is also set to true by default on this type of component.