code: public static UIContext getCurrent() {
  		Stack<UIContext> stack = CONTEXT_STACK.get();
  
  		if (stack == null || stack.isEmpty()) {
  			return null;
  		}
  
  		return getStack().peek();
  	}
docs: Retrieves the current effective UIContext. Note that this method will return null if called from outside normal
  request processing, for example during the intial application UI construction.
  
  @return the current effective UIContext.