use of org.eclipse.scout.rt.client.ui.basic.table.columns.AbstractStringColumnTest.TestTable.TestStringColumn in project scout.rt by eclipse.
the class AbstractStringColumnTest method testCustomValidation.
@Test
public void testCustomValidation() {
TestTable table = new TestTable();
TestStringColumn col = table.getTestStringColumn();
ITableRow row = table.addRowByArray(new Object[] { "valid" });
IStringField editor = (IStringField) col.prepareEdit(row);
editor.setValue("invalid");
col.completeEdit(row, editor);
assertFalse(table.getCell(0, 0).isContentValid());
}
use of org.eclipse.scout.rt.client.ui.basic.table.columns.AbstractStringColumnTest.TestTable.TestStringColumn in project scout.rt by eclipse.
the class AbstractStringColumnTest method testMaxLengthValidation.
@Test
public void testMaxLengthValidation() {
TestTable table = new TestTable();
TestStringColumn col = table.getTestStringColumn();
col.setMaxLength(1);
table.addRowByArray(new Object[] { "text" });
assertEquals("t", table.getCell(0, 0).getValue());
}
Aggregations