When to use markAsDirty()?

We have noticed that sometimes a call to markAsDirty is needed in order to get component updated on screen. Though we’re not clear when this is required, we are suspicious on BeanItem connected ComboBoxes and on readonly TextFields.

So the question is: In wich cases a call to a component’s markAsDirty() method is needed?

Regards,
pablo.

It should never be necessary to call markAsDirty() from application code and only in very few cases in implementations of custom components as long as Vaadin components are used correctly and data is updated via the Vaadin data model APIs.

Based on the minimal information in the question, I’d guess that your application modifies a bean directly rather than via the BeanItem. Thus, Vaadin components cannot know that something has changed.