我已经设置了一个名为 cmbCopyFrom 的组合框,它的可见性基于是否从另一个组合框 cmbBoundary 中选择了一个项目“定价区域”,即使选择了定价区域,它有时也不会使 cmbCopyFrom 可见。不确定是什么原因造成的。有什么建议么?
<s:ComboBox id="cmbBoundary" prompt="Select a Boundary"
labelFunction="codeLabel" />
<s:ComboBox id="cmbCopyFrom" prompt="Copy From" labelFunction="codeLabelKey"
dataProvider="{model.arrOfLOB}"
includeInLayout="{model.isCopyFromVisible}"
visible="{model.isCopyFromVisible}" />
cmbBoundary.addEventListener(IndexChangeEvent.CHANGE,boundarySelected);
protected function boundarySelected(evt:IndexChangeEvent):void {
trace("Index change event fired..."+this.cmbBoundary.selectedItem.name);
if (this.cmbBoundary.selectedItem && this.cmbBoundary.selectedItem.name == "Pricing Zones" ) {
model.isCopyFromVisible = true;
}
else {
model.isCopyFromVisible = false;
}
}