public static UIContext findClosestContext ( final String id ) { UIContext uic = UIContextHolder . getCurrent ( ) ; WComponent root = uic . getUI ( ) ; UIContext closest = TreeUtil . getClosestContextForId ( root , id ) ; return closest ; }
Finds the closest context for the given component id . This handles the case where the component no longer exists due to having been removed from the UI or having a SubUIContext removed .