code: public static NamingContextable getParentNamingContext(final WComponent component) {
  		if (component == null) {
  			return null;
  		}
  
  		WComponent child = component;
  		NamingContextable parent = null;
  		while (true) {
  			NamingContextable naming = WebUtilities.getAncestorOfClass(NamingContextable.class,
  					child);
  			if (naming == null) {
  				break;
  			}
  			if (WebUtilities.isActiveNamingContext(naming)) {
  				parent = naming;
  				break;
  			}
  			child = naming;
  		}
  
  		return parent;
  	}
docs: Get this component's parent naming context.
  
  @param component the component to process
  @return true the parent naming context or null