Component's behaviors, metadata, listeners

Hi,
is there any possibility to add metadata to a component which can be analysed by some kind of global listener? What we want to do is adding metadata which contains role-information. The listener should then enable/disable or show/hide the component if the user has or hasn’t that role. In Wicket something like that can be achieved by the component’s MetaData, by adding a Behavior and/or by the use of a globally registered ComponentInstanciationListener. Is there anything similar for Vaadin?
Thanks and regards
Johnny

You can use ComponentUtil.setData(component, key, value) and ComponentUtil.getData(component, key) to associate any data with a component. Would that work in this case?

Hi Marcus,
thanks for the quick reply. Yes, that works for storing metadata in the component. Now I need a generic way to read from the metadata and perform an action to the component based on that metadata which in our case would be disabling or hiding the component. Is it possible to register a kind of global OnAfterAttachListener which would fire for every component?