Menu

#891 Doc err:ComponentInfo.applyProperties omit custom-attributes

3.0.3
closed
nobody
None
5
2014-03-07
2008-02-27
No

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();

}
}

Discussion

  • Tom M. Yeh

    Tom M. Yeh - 2008-03-05
    • summary: ComponentInfo.applyProperties() omits custom-attributes --> Doc err:ComponentInfo.applyProperties omit custom-attributes
    • status: open --> closed
     
  • Tom M. Yeh

    Tom M. Yeh - 2008-03-05

    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).

     

Log in to post a comment.