Where has RepaintRequestEvent has gone?

Some methods in com.vaadin.ui.Component, like setEnabled, setReadOnly, setCaption etc. state in their javadoc comments something like that. “This method will trigger a RepaintRequestEvent”. However, I could not find such a class among vaadin 7.4.8 release jars.

Where has this class gone though it is still mentioned in Component class?

Thanks in advance

JavaDocs seem to contain depricated information. To my knowledge, the RepaintRequestEvent hasn’t existed since the Vaadin 6.x series. I’ve filed a
ticket
about this.

What are you trying to achieve?

Thanks for the quick response!

We need to know when a Component is made visible, enabled, or readOnly in order to execute our permission checking mechanism to decide if such a state change is really possible or not according to current user’s priviledges.

Typically, this kind of use case is handled in the UI logic rather than on a component level.

In Vaadin 7, there are no equivalent events to my knowledge. The state of these properties are stored in the state object. When the component internally requests getState(), the component will assume you’ll be doing a modification to the state object and thus will mark your component as dirty. The framework will the at the end of the request check which all components are dirty and send the changed states to the client-side.

As for your use case, what you could do, is simply extend the component and override the setter methods and do the checking there.

Another solution (which might already be over-engineering :)) is to override getState methods and make a proxy of the state object and in the proxy check when the visible/enabled/readOnly states are being modified. The benefit of this approach is that you can write the logic once and use the same proxy implementation in all components - you only need to override the get state methods.