Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
Table edit date value with formatting
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;
}
});
Last updated on
anyone?
I'm not sure if I'm doing something wrong or it is some kind of bug.
Last updated on
You cannot reply to this thread.