} catch (ClassCastException ex) {
throw UiException.Aide.wrap(ex);
} catch (NoSuchMethodException ex) {
//Bug #1813278, Annotations do not work with xhtml tags
if (comp instanceof DynamicPropertied) {
final DynamicPropertied dpcomp = (DynamicPropertied) comp;
if (dpcomp.hasDynamicProperty(_attr)) {
//no way to know destination type of the property, use bean as is
dpcomp.setDynamicProperty(_attr, bean);
} else {
throw UiException.Aide.wrap(ex);
}
} else { //Feature# 2855116. Save into component custom-attribute(also a variable in ZK5).
comp.setAttribute(_attr, bean);