Hi,
I have table component with editable column “Date” . I used ColumnGenerator to change date editor format and resolution.
My Problem: Editor opens window with dates where I can choose date. After choose it puts the date to text field. The problem is that it doesn’t save/commit/remember choosen value (for examlpe after filtering table).
Everything works fine with default editor. Do I have to add anything else to my code?
tabelaZadan.addGeneratedColumn("Date", new ColumnGenerator() {
@Override
public Object generateCell(Table source, final Object itemId, Object columnId) {
Property prop = source.getItem(itemId).getItemProperty(columnId);
if (prop.getType().equals(Date.class)) {
DateField df = new DateField();
df.setValue((Date) prop.getValue());
df.setResolution(DateField.RESOLUTION_MIN);
df.setDateFormat("dd-MM-yyyy HH:mm");
return df;
}
return null;
}
});