public static UIContext getContextForComponent ( final WComponent component ) { // Start with the current Context UIContext result = UIContextHolder . getCurrent ( ) ; // Go through the contexts until we find the component while ( result instanceof SubUIContext && ! ( ( SubUIContext ) result ) . isInContext ( component ) ) { result = ( ( SubUIContext ) result ) . getBacking ( ) ; } return result ; }
Returns the context for this component . The component may not be in the current context .