On 버튼을 클릭하면 양식 패널과 격자가있는 창이 열립니다. 양식 내에서 일부 콤보 상자, 텍스트 상자 및 제출 단추가 있습니다. 제출 버튼을 클릭하면 데이터베이스에 접속하여 값을 얻은 다음 그리드 열을 채 웁니다. 특정 작업 ID의 경우, 우리는 database.For "Ext.data.CFQueryReader"를 사용하여 데이터베이스 쿼리를 읽고 양식을 얻을 값 중 하나만 설정됩니다. 이제 "Ext.data.CFQueryReader가 생성자가 아닙니다."라는 오류 메시지가 나타납니다. 나는 다른 모듈에서 사용되는 코드를 활용하여 코드 흐름을 잘 모르고있다. 그래서 내 코드에는 약간의 차이가있을 것입니다. 제발 조언 해주세요. 아래는이 페이지에서 사용하고있는 코드입니다. 이것 이외의 쉬운 방법이 있다면 조언 해주세요. 여기에 pagingtoolbar가 필요한지 확실하지 않습니다. pagingtoolbar가 사용되지 않으면 어떻게 값을 얻을 수 있습니까?Ext.data.CFQueryReader가 생성자 오류가 아닙니다.
var filterForm = new Ext.form.FormPanel({
title : 'Filters',
floatable : false,
id : 'filterForm',
items : [
{
xtype : 'combo',
id :'Combo1',
fieldLabel :'Owner',
valueField :'ownerValue',
displayField :'ownerDisplay',
value :'ALL'
},
{
xtype : 'combo',
id :'Combo2',
fieldLabel :'Status',
valueField :'statusValue',
displayField :'statusDisplay',
value :'ALL'
},
{
xtype : 'textfield',
fieldLabel : 'job Search',
width : 200,
id :'searchText'
}
],
buttons: [
{
text : 'Apply Filter(s)',
id : 'apply',
handler : function(){
loadJobs();
}
}
]
});
var filterGrid = new Ext.grid.GridPanel({
title : 'List',
id : 'list',
store : listStore,
columns: [
{
header : 'JOBID',
width : 70,
dataIndex : 'jobid',
sortable : true
},
{
header : 'Description',
id : 'description',
dataIndex : 'description',
},
{
header : 'Category',
dataIndex : 'category',
width : 100
}
]
});
function loadJobs()
{
pagingToolBar.displayMsg = "Displaying {0} - {1} of {2}";
listStore.baseParams.jobid = '';
pagingToolBar.changePage(1);
}
var pagingToolBar = new Ext.PagingToolbar({
pageSize : 20,
id : 'pagingToolbar',
store : listStore,
displayInfo : true,
displayMsg : 'Displaying jobs {0} - {1} of {2}'
});
var listStore= new Ext.data.Store({
url : "/list.cfc",
method : 'POST',
reader : listReader,
baseParams : {
method : 'fetchList',
returnFormat : 'json',
owner : 'ALL',
status : 'ALL',
jobidSearch : '',
jobid : ''
},
listeners : {
beforeload : function(store,options){
store.baseParams.email = Ext.getCmp('Combo1').getValue();
store.baseParams.status = Ext.getCmp('Combo2').getValue();
store.baseParams.idSearch =Ext.getCmp('searchText').getValue();
}
}
});
var listReader = new Ext.data.CFQueryReader(
{
id : 'jobid',
totalProperty : 'TOTALROWCOUNT'
},
[
{ name : 'jobid',mapping : 'JOBID',type : 'string'},
{ name : 'description',mapping : 'DESCRIPTION',type : 'string'},
{ name : 'category',mapping : 'CATEGORY',type :'string'}
]
);
감사 자체가 그래서이 특정 라이브러리 – user1049057
나는 기쁘다을 추가하지 않은 내선 JS 라이브러리의 의지 부분을 다음과 같이
예를 들어, 나는 펜타 리더의 경로를 추가 한 그것은 효과가 있었다. 이 특정 오류가 발생할 때마다 extjs가 .js 파일을 찾을 수 없거나 이름이 정확하지 않다는 것을 명심하십시오. – Shekhar