概述: RadioGroup內(nèi)含多個Radio,每個Radio.name必須相同,選中事件RadioGroup不提供,Radio子組件自行處理
功能: 選擇一個Radio,動態(tài)加載GridPanel.
new Ext.form.RadioGroup({
//fieldLabel : "資料選擇", //RadioGroup.fieldLabel 標(biāo)簽與 Radio.boxLabel 標(biāo)簽區(qū)別
hideLabel : true, //隱藏RadioGroup標(biāo)簽
items : [
new ({ //三個必須項
checked : true, //設(shè)置當(dāng)前為選中狀態(tài),僅且一個為選中.
boxLabel : "書籍借閱", //Radio標(biāo)簽
name : "borrow", //用于form提交時傳送的參數(shù)名
inputValue : "book", //提交時傳送的參數(shù)值
listeners : {
check : function(checkbox, checked) { //選中時,調(diào)用的事件
if (checked) {
borrow_grid.reconfigure(book_store,book_cm); //動態(tài)重新加載GridPanel
book_store.load();
}
}
}
}),
new Ext.form.Radio({ //以上相同
boxLabel : "期刊借閱",
name : "borrow",
inputValue : "magazine",
listeners : {
check : function(checkbox, checked) {
if (checked) {
borrow_grid.reconfigure(magazine_store,magazine_cm);
magazine_store.load()
}
}
}
}), new Ext.form.Radio({
boxLabel : "標(biāo)準(zhǔn)借閱",
name : "borrow",
inputValue : "standard",
listeners : {
check : function(checkbox, checked) {
if (checked) {
borrow_grid.reconfigure(
standard_store,
standard_cm);
standard_store.load();
}
}
}
})]
})