我的显示信息有问题。 我需要设置Drop box.
中的值来自clothing.json
的代码
{
"catalog": {
"clothing": {
"categories": [
{"name": "Women", "categories": [
{"name":"Clothing", "categories": [
{"name": "Dresses", "categories": [
{"name": "Casual Red Dress", "amount": 16.99, "currency": "EUR", "size": "S"},
{"name": "Short Black Dress", "amount": 47.99, "currency": "EUR", "size": "M"},
{"name": "Long Blue Dinner Dress", "amount": 103.99, "currency": "USD", "size": "L"}
]},
来自View.xml
的代码
<Column id="colSize" width="11rem">
<m:Label text="Size"/>
<template>
<m:Select
id = "selSize"
selectedKey="{size}"
items="{path: '/sizes', templateShareable: true}"
visible="{= !!${size}}"
forceSelection="false">
<core:Item key="{key}" text="{value}"/>
</m:Select>
</template>
</Column>
并将Controller.js
onPressBtnSetSize: function() {
var oComboBox = this.byId("cbxSelectSize"),
sKey = oComboBox.getSelectedItem().getKey(),
oSelect = this.byId("selSize");
oSelect.setSelectedKey(sKey);
}
现在,当我调用方法getSelectedKey()
时。我理解了sKey
的含义。
但表中的显示不会改变。
我认为您需要更新或刷新表格。但我所有的尝试都失败了。请帮助!
答案 0 :(得分:-1)
-webkit-transition: transform 2s ease-in-out;
transition: transform 2s ease-in-out;