在SAPUI5的下拉框中设置默认值时遇到问题。
目前,我正在使用以下代码:
fields : [ new sap.ui.commons.DropdownBox("Cities", {
selectedKey: "City3",
items : [ new sap.ui.core.ListItem("City1", {
text : "DE (Germany)"
}), new sap.ui.core.ListItem("City2", {
text : "GB (United Kingdom)"
}), new sap.ui.core.ListItem("City3", {
text : "IN (India)"
}), new sap.ui.core.ListItem("City4", {
text : "US (United States)"
}) ]
})
}) ]
但是在“列表”框中始终显示DE (Germany)
值,但我想默认设置其他值。
怎么做?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句