code: 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;
  	}
docs: Returns the context for this component. The component may not be in the current context.
  
  @param component the component to find the context it belongs to
  @return the component's context