我在ExtJS和容器中使用了两个按钮,我在选中的单选按钮上显示。但是当我打开表单时再次按“取消”按钮时,按钮会自动重复。这是xds:
{
"id": "MyContainer39",
"cid": "container",
"jsClass": "MyContainer39",
"snapToGrid": 10,
"userConfig": {
"flex": "-ext-undefined-",
"autoRef": "SelectContainer",
"id": "SelectContainer"
},
"cn": [{
"id": "MyButton20",
"cid": "button",
"jsClass": "MyButton20",
"snapToGrid": 10,
"userConfig": {
"text": "MCW.lr.s_btn_selectAll",
"style": "float:left; display:inline-block; margin-left:10px;",
"flex": "-ext-undefined-",
"autoRef": "SelectAll"
}
}, {
"id": "MyButton21",
"cid": "button",
"jsClass": "MyButton21",
"snapToGrid": 10,
"userConfig": {
"text": "MCW.lr.s_btn_deselectAll",
"iconAlign": "right",
"style": "float:left; display:inline-block; margin-left:15px;",
"flex": "-ext-undefined-",
"autoRef": "DeSelectAll"
}
}]
}
单选按钮已检查条件:
if (card.internalServerDowloadLocation.checked == true) {
Ext.getCmp('SelectContainer').show();
} else {
Ext.getCmp('SelectContainer').hide();
}
有没有办法,所以在取消时我可以从容器中删除按钮,然后再次将其添加到容器中。
答案 0 :(得分:0)
"userConfig": {
"flex": "-ext-undefined-",
"autoRef": "SelectContainer",
"id": "SelectContainer"
}
所以我删除了autoref及其'现在工作正常。