What Happens at Runtime: How Create and Partial Page Refresh Work What You May Need to Know About Creating a Row and Sorting Columns

Creating ADF Databound Tables 4-17 selectedRowKeys= {bindings.suppliersFindAll.collectionModel.selectedRow} selectionListener= {bindings.suppliersFindAll.collectionModel.makeCurrent} rowSelection=single id=t1 partialTriggers=::ctb1 ::ctb2 af:column sortProperty=supplierId sortable=false headerText= {bindings.suppliersFindAll.hints.supplierId.label} id=c6 af:inputText value={row.bindings.supplierId.inputValue} label={bindings.suppliersFindAll.hints.supplierId.label} required={bindings.suppliersFindAll.hints.supplierId.mandatory} columns={bindings.suppliersFindAll.hints.supplierId.displayWidth} maximumLength={bindings.suppliersFindAll.hints.supplierId.precision} shortDesc={bindings.suppliersFindAll.hints.supplierId.tooltip} id=it4 f:validator binding={row.bindings.supplierId.validator} af:convertNumber groupingUsed=false pattern={bindings.suppliersFindAll.hints.supplierId.format} af:inputText af:column . . . af:table af:panelCollection af:form

4.4.3 What Happens at Runtime: How Create and Partial Page Refresh Work

When the button bound to the create operation is invoked, the action executes, and a new instance for the collection is created as the page is rerendered. Because the button was configured to be a trigger that causes the table to refresh, the table redraws with the new empty row shown at the top. When the user clicks the button bound to the merge method, the newly created rows in the row set are inserted into the database. For more information about partial page refresh, see the Rendering Partial Page Content chapter in the Oracle Fusion Middleware Web User Interface Developers Guide for Oracle Application Development Framework.

4.4.4 What You May Need to Know About Creating a Row and Sorting Columns

If your table columns allow sorting, and the user has sorted on a column before inserting a new row, then that new row will not be sorted. To have the column sort with the new row, the user must first sort the column opposite to the desired sort, and then re-sort. This is because the table assumes the column is already sorted, so clicking on the desired sort order first will have no effect on the column. For example, say a user had sorted a column in ascending order, and then added a new row. Initially, that row appears at the top. If the user first clicks to sort the column again in ascending order, the table will not re-sort, as it assumes the column is already in ascending order. The user must first sort on descending order and then ascending order. If you want the data to automatically sort on a specific column in a specific order after inserting a row, then programmatically queue a SortEvent after the commit, and implement a handler to execute the sort. 4-18 Java EE Developers Guide for Oracle Application Development Framework

4.5 Modifying the Attributes Displayed in the Table

Once you use the Data Controls panel to create a table, you can then delete attributes, change the order in which they are displayed, change the component used to display them, and change the attribute binding for the component. You can also add new attributes, or rebind the table to a new data control. For more information about modifying existing UI components and bindings, see the Modifying the Attributes Displayed in the Table section of the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework.