Open mvysny opened 4 years ago
Workaround is to find all LegacyWrappers attached to V14 UI by iterating UI's descendants, and find LegacyWrapper with getLegacyComponent() pointing to the component in question. Optimization: only a component with AbstractMprUIContent as its parent is wrapped in a LegacyWrapper.
Sometimes e.g. a security framework may require one to traverse the component tree, collect all security annotations and evaluate them.
However, with mixed V8-V14 code, it's not possible to cross the boundary to the containing V14 LegacyWrapper from a Vaadin8 Component: the getParent() will eventually lead us to
MprUIContent
, then toMprUI
which hasnull
parent.It would be great to have a possibility to get the owning LegacyWrapper from a V8 Component.