您的位置:首页 > 其它

【SENCHA TOUCH】picker的使用

2013-08-07 17:27 316 查看
这里的年我是从数据库读取绑定的。格式如月格式。

picker = Ext.create('Ext.Picker', {
doneButton : '确认',
cancelButton : '取消',
useTitles : false,
slots : [{
name : 'year',
title : '年份',
align : "center",
data : records

}, {
name : 'month',
title : '月份',
align : "center",
data : storeMonth
}],
listeners : {
change : function(picker, value, eOpts) {
var returnStr = tongpuHttpRequest("text",
"./file!fileUrl.do?", "year="
+ value.year + "&month="
+ value.month + "&rand="
+ Math.random());
if (returnStr != null && returnStr.length > 0) {
window.open(returnStr);
} else {
alert('暂无数据!');
}
// 写入日志
Ext.Ajax.request({
url : "./util/weblog!addWebMisLog.do?id="
+ bbid,
success : function(result) {
},
failure : function(result) {
}
});
}
}
});
Ext.Viewport.add(picker);
picker.show();


var storeMonth = [{
text : '1月',
value : '1'
}, {
text : '2月',
value : '2'
}, {
text : '3月',
value : '3'
}, {
text : '4月',
value : '4'
}, {
text : '5月',
value : '5'
}, {
text : '6月',
value : '6'
}, {
text : '7月',
value : '7'
}, {
text : '8月',
value : '8'
}, {
text : '9月',
value : '9'
}, {
text : '10月',
value : '10'
}, {
text : '11月',
value : '11'
}, {
text : '12月',
value : '12'
}];


原帖地址:/article/11106992.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: