我有一个下拉列表:
<s:DropDownList id="cad" width="100%" dataProvider="{model.referenceList.refPatientResponseLists}"
labelFunction="myFunction" selectedIndex="{model.cd.code}"/>
现在 refPatientResponseLists 返回 3 行数据,我需要在下拉列表中显示 3 个值。所以我有标签功能:
public function myFunction(item:Object):String {
return item['refPatientResponses'] [cad.dataProvider.getItemIndex(item)]['responseDesc']+'';
}
但这在下拉列表中仅显示 1 个值。所以它返回类似:
return item['refPatientResponses'] [0] ['responseDesc']+''
如何获取下拉列表中的所有 3 个值。希望我的问题可以理解并期待答复。
谢谢
哈里什
日志中的对象结构:
(Typed Object #1 'datacollection.model.ReferenceList')
(Array #3)
refPatientResponseLists = (Externalizable Object #4 'flex.messaging.io.ArrayCollection')
(Array #5)
[0] = (Typed Object #6 'datacollection.model.RefPatientResponseList')
refPatientResponses = (Externalizable Object #7 'flex.messaging.io.ArrayCollection')
(Array #8)
[0] = (Typed Object #9 'datacollection.model.RefPatientResponse')
responseSequence = 1
responseDesc = "No"
responseCode = 28
responseTypeCode = 10
[1] = (Typed Object #10 'datacollection.model.RefPatientResponse')
responseSequence = 2
responseDesc = "Yes"
responseCode = 29
responseTypeCode = 10
[2] = (Typed Object #11 'datacollection.model.RefPatientResponse')
responseSequence = 3
responseDesc = "Claim Not Found"
responseCode = 30
responseTypeCode = 10