我有一个配置如下的数据表
function handleTabChange(e){
var errDataSource = new YAHOO.util.DataSource("/webapp/somecontroller");
errDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
errDataSource.responseSchema = {
fields: [
"id","name","err_msg","err_sugg","created_at","created_by","rev"
]
};
var errColDef = [
{key:"error_id", sortable:true},
{key:"created_at", formatter:YAHOO.widget.DataTable.formatDate, sortable:true, sortOptions:{defaultDir:YAHOO.widget.DataTable.CLASS_DESC}},
{key:"name", sortable:true},
{key:"rev", sortable:true},
{key:"err_msg"},
{key:"err_sugg" },
{key:"created_by"}
];
var errorDataTable = new YAHOO.widget.Datatable("errorDataTable",errColDef, errDataSource,{scrollable:true,width:"100%"});
errorDataTable.render();
}
在我要填充此数据表的选项卡中,添加以下行
tab3.addListener('click', handleTabChange);
当我调试这个时,我可以看到控制流过
处理选项卡更改
但我的网络显示数据源没有进行任何调用。
如果我正确地将数据表集成到选项卡视图中,您能帮帮我吗?