basedatacombobox_item.lzx
<library>
<include href="lz/textlistitem.lzx"/>
<class name="basedatacombobox_item" extends="textlistitem" width="${null}">
<handler name="onmousedown">
this.parent.select(this);
</handler>
<handler name="ondata" method="handleData"/>
<method name="handleData" args="d">
var target = this.parent.attachtarget;
var t = this.datapath.xpathQuery(target.textdatapath);
var v = this.datapath.xpathQuery(target.valuedatapath);
if ($debug) {
if (typeof t == "undefined") {
Debug.warn("basedatacombobox_item textdatapath result is undefined");
}
if (typeof v == "undefined") {
Debug.warn("basedatacombobox_item valuedatapath result is undefined");
}
}
this.setAttribute('text', ( t == void(0) ? '' : t ));
this.setAttribute('value', ( v == void(0) ? null : v ));
// special case for separator string
// TODO [2005-4-01, dchung] could this be rendered as a line?
this.setAttribute('enabled', (t != '-----'));
this.setAttribute("width", target.listwidth ? target.listwidth : target.width);
</method>
</class>
</library>
Cross References
Includes
Classes