When calling applyProperties(comp) on a ComponentInfo event-handlers and properties are applied to the given component, but not the custom attributes defined for this component-info. See javadoc and code-snippet below.
Regards Alex.
--- from /javadoc/3.0.3/zk/ -----
public void applyProperties(Component comp)
Applies the event handlers, annotations, properties and custom attributes to the specified component.
It also invokes ....
--- from org.zkoss.zk.ui.metainfo.ComponentInfo -----
public void applyProperties(Component comp)
{
/* 563*/ _compdef.applyProperties(comp);
/* 565*/ if(_evthds != null)
/* 566*/ ((ComponentCtrl)comp).addSharedEventHandlerMap(_evthds);
/* 568*/ if(_props != null)
{
Property prop;
/* 569*/ for(Iterator it = _props.iterator(); it.hasNext(); prop.assign(comp))
/* 570*/ prop = (Property)it.next();
}
}
Logged In: YES
user_id=91099
Originator: NO
It is JavaDoc error. Custom attributes are not part of ComponentInfo (but it is part of ComponentDefinition). They are actually instances of AttributesInfo (after all, they have their own if/unless condition).