code: public static Component toComponent(Object o) throws PageException {
  	if (o instanceof Component) return (Component) o;
  	else if (o instanceof ObjectWrap) {
  	    return toComponent(((ObjectWrap) o).getEmbededObject());
  	}
  	throw new CasterException(o, "Component");
      }
docs: cast a Object to a Component
  
  @param o Object to cast
  @return casted Component
  @throws PageException