@Override
	public void updateBeanValue() {
		TableModel model = getTableModel();

		// Only apply updates if table was editable
		if (!isEditable()) {
			LOG.warn("UpdateBeanValue called for table that is not editable");
			return;
		}

		int rows = model.getRowCount();
		if (rows == 0) {
			return;
		}

		int startIndex = 0;
		int endIndex = rows - 1;

		// For scrollable table model, only update the rows on the current page
		if (model instanceof ScrollableTableModel) {
			if (!isPaginated()) {
				throw new IllegalStateException(
						"UpdateBeanValue tried to update a ScrollableTableModel with no pagination.");
			}

			int rowsPerPage = getRowsPerPage();
			int currentPage = getCurrentPage();
			// Only update the rows on the current page
			startIndex = currentPage * rowsPerPage;
			endIndex = Math.min(startIndex + rowsPerPage, rows) - 1;
			LOG.warn("UpdateBeanValue only updating the current page for ScrollableTableModel");
		}

		if (endIndex < startIndex) {
			return;
		}

		// Temporarily widen the pagination on the repeater to hold all rows
		// Calling setBean with a non-null value overrides the DataTableBeanProvider
		repeater.setBean(getRowIds(startIndex, endIndex, true));
		updateBeanValueForRenderedRows();
		repeater.setBean(null);
	}
@ Override public void updateBeanValue ( ) { TableModel model = getTableModel ( ) ; if ( ! isEditable ( ) ) { LOG . warn ( "UpdateBeanValue called for table that is not editable" ) ; return ; } int rows = model . getRowCount ( ) ; if ( rows == 0 ) { return ; } int startIndex = 0 ; int endIndex = rows - 1 ; if ( model instanceof ScrollableTableModel ) { if ( ! isPaginated ( ) ) { throw new IllegalStateException ( "UpdateBeanValue tried to update a ScrollableTableModel with no pagination." ) ; } int rowsPerPage = getRowsPerPage ( ) ; int currentPage = getCurrentPage ( ) ; startIndex = currentPage * rowsPerPage ; endIndex = Math . min ( startIndex + rowsPerPage , rows ) - 1 ; LOG . warn ( "UpdateBeanValue only updating the current page for ScrollableTableModel" ) ; } if ( endIndex < startIndex ) { return ; } repeater . setBean ( getRowIds ( startIndex , endIndex , true ) ) ; updateBeanValueForRenderedRows ( ) ; repeater . setBean ( null ) ; }
Updates the bean using the table data model's {@link TableModel#setValueAt(Object, List, int)} method.
<p>
The update is only applied if the table has been set as editable via {@link #setEditable(boolean)}. Only rows
that have been rendered are updated.
</p>
<p>
For {@link ScrollableTableModel}, only the rows on the current page are updated.
</p>