validating a table cell [message #209507] |
Tue, 08 May 2007 11:33 |
Eclipse User |
|
|
|
Originally posted by: brahim.zemmit.thalesgroup.com
Hi,
i have a big problem on validating a cell of a table. Has anyone an idea
how to resolve this problem?
the following lines describe what i want to achieve:
Thank you in advance.
====>
// Assign the cell editors to the viewer
editors = ...;
viewer.setCellEditors(editors);
// Set the cell modifier for the viewer
viewer.setCellModifier(new ICellModifier() {
public boolean canModify(Object element, String property) {
return true;
}
public Object getValue(Object element, String property) {
...
}
public void modify(Object element, String property, Object value)
{
TableItem ti = (TableItem)element;
String data = value.toString();
....
if (property.equals("someproperty") {
if (validateData (data) == false) {
// my question:
// how to set back the input focus into this cell ?
}
}
}
<========
|
|
|
Powered by
FUDForum. Page generated in 0.07347 seconds