19 package org.turro.elephant.util;
21 import org.turro.reflection.Reflections;
22 import org.zkoss.zk.ui.Component;
23 import org.zkoss.zk.ui.impl.PageImpl;
31 public <T> T parent(Class<T> jClass) {
32 if(component instanceof PageImpl page) {
34 }
else if(component instanceof Component comp) {
35 while((comp = comp.getParent()) !=
null) {
36 if(Reflections.of(comp).representsClass(jClass)) {
50 private Object component;
53 this.component = component;
static Components from(Object component)