code: public static ComponentWithContext getComponentById(final String id, final boolean visibleOnly) {
  		UIContext uic = UIContextHolder.getCurrent();
  		WComponent root = uic.getUI();
  		ComponentWithContext comp = TreeUtil.getComponentWithContextForId(root, id, visibleOnly);
  		return comp;
  	}
docs: Finds a component by its id.
  
  @param id the id of the component to search for.
  @param visibleOnly true if process visible only
  @return the component and context for the given id, or null if not found.