Search in sources :

Example 1 with AbstractTableFieldBeanData

use of org.eclipse.scout.rt.shared.data.form.fields.tablefield.AbstractTableFieldBeanData in project scout.rt by eclipse.

the class AbstractTableField method exportFormFieldData.

@Override
public void exportFormFieldData(AbstractFormFieldData target) {
    if (m_table != null && target instanceof AbstractTableFieldBeanData) {
        AbstractTableFieldBeanData tableBeanData = (AbstractTableFieldBeanData) target;
        m_table.exportToTableBeanData(tableBeanData);
        target.setValueSet(true);
    }
}
Also used : AbstractTableFieldBeanData(org.eclipse.scout.rt.shared.data.form.fields.tablefield.AbstractTableFieldBeanData)

Example 2 with AbstractTableFieldBeanData

use of org.eclipse.scout.rt.shared.data.form.fields.tablefield.AbstractTableFieldBeanData in project scout.rt by eclipse.

the class AbstractTableField method importFormFieldData.

@Override
public void importFormFieldData(AbstractFormFieldData source, boolean valueChangeTriggersEnabled) {
    Assertions.assertNotNull(source);
    if (source.isValueSet() && m_table != null) {
        try {
            if (!valueChangeTriggersEnabled) {
                setValueChangeTriggerEnabled(false);
            }
            if (source instanceof AbstractTableFieldBeanData) {
                AbstractTableFieldBeanData tableBeanData = (AbstractTableFieldBeanData) source;
                m_table.importFromTableBeanData(tableBeanData);
            }
            if (m_table.isCheckable() && m_table.getCheckableColumn() != null) {
                for (ITableRow row : m_table.getRows()) {
                    row.setChecked(BooleanUtility.nvl(m_table.getCheckableColumn().getValue(row)));
                }
            }
        } finally {
            if (!valueChangeTriggersEnabled) {
                setValueChangeTriggerEnabled(true);
            }
        }
    }
}
Also used : AbstractTableFieldBeanData(org.eclipse.scout.rt.shared.data.form.fields.tablefield.AbstractTableFieldBeanData) ITableRow(org.eclipse.scout.rt.client.ui.basic.table.ITableRow)

Aggregations

AbstractTableFieldBeanData (org.eclipse.scout.rt.shared.data.form.fields.tablefield.AbstractTableFieldBeanData)2 ITableRow (org.eclipse.scout.rt.client.ui.basic.table.ITableRow)1