try {
if (null == thisObj) {
return null;
}
if ("com.ibm.xsp.component.xp.XspEventHandler".equals(thisObj.getClass().getName())) {
XspEventHandler handler = (XspEventHandler) thisObj;
return handler.getParent();
} else {
return (UIComponent) thisObj;
}
} catch (Exception e) {
// We've got something I wasn't expecting, an exception