FW/1 ColdFusion 找到 0 个与提供的参数匹配的方法
FW/1 ColdFusion found 0 methods that match the provided arguments
您好,我在下面收到此错误,但不确定如何解决。
Detail:
Either there are no methods with the specified method name and
argument types or the leaseService method is overloaded with argument
types that ColdFusion cannot decipher reliably. ColdFusion found 0
methods that match the provided arguments. If this is a Java object
and you verified that the method exists, use the javacast function to
reduce ambiguity.
Message:
The leaseService method was not found.
我在 IIS 7 Windows 7 运行 上使用 fw1 3.1.1 和 Adobe CF 9。
我的Framework-一个结构(简体)
控制器
-property.cfc
-lease.cfc
Model/Beans
-property.cfc
-lease.cfc
服务
-property.cfc
-lease.cfc
Views/property
-detail.cfm
在我的 属性 控制器中,我像这样调用租约列表函数。
property propertyService;
property leaseService;
function detail(rc) {
rc.property = variables.propertyService.detail(id=rc.id);
rc.leases = variables.leaseService().list(propertyID=rc.id);
}
这是我的租赁服务:
component accessors=true {
function init( beanFactory ) {
variables.beanFactory = beanFactory;
return this;
}
function list(propertyID) {
var qData = new query();
qData.setDatasource(application.dsn);
qData.setName("qLease");
qData.addParam(name="propertyID", value="#rc.propertyID#", CFSQLTYPE="cf_sql_numeric");
qData.setSQL("
select l.id, l.fName, l.lName, l.leaseActive, l.leaseFrom, l.leaseTo, CONCAT(u.fname,' ',u.lname) pmName
from leases l inner join users u on l.pmID = u.id
where propertyID = :propertyID
order by LeaseTo DESC
");
qReturn = qData.execute();
result = qReturn.getResult();
return result;
}
}
如有任何建议,我们将不胜感激。
谢谢!
您正在调用 leaseService
作为方法。这是一个变量。所以不是这个:
rc.property = variables.propertyService.detail(id=rc.id);
rc.leases = variables.leaseService().list(propertyID=rc.id);
这样做:
rc.property = variables.propertyService.detail(id=rc.id);
rc.leases = variables.leaseService.list(propertyID=rc.id);
请注意,我删除了 ()
HTH
您好,我在下面收到此错误,但不确定如何解决。
Detail:
Either there are no methods with the specified method name and argument types or the leaseService method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity.
Message:
The leaseService method was not found.
我在 IIS 7 Windows 7 运行 上使用 fw1 3.1.1 和 Adobe CF 9。
我的Framework-一个结构(简体)
控制器
-property.cfc
-lease.cfc
Model/Beans
-property.cfc
-lease.cfc
服务
-property.cfc
-lease.cfc
Views/property
-detail.cfm
在我的 属性 控制器中,我像这样调用租约列表函数。
property propertyService;
property leaseService;
function detail(rc) {
rc.property = variables.propertyService.detail(id=rc.id);
rc.leases = variables.leaseService().list(propertyID=rc.id);
}
这是我的租赁服务:
component accessors=true {
function init( beanFactory ) {
variables.beanFactory = beanFactory;
return this;
}
function list(propertyID) {
var qData = new query();
qData.setDatasource(application.dsn);
qData.setName("qLease");
qData.addParam(name="propertyID", value="#rc.propertyID#", CFSQLTYPE="cf_sql_numeric");
qData.setSQL("
select l.id, l.fName, l.lName, l.leaseActive, l.leaseFrom, l.leaseTo, CONCAT(u.fname,' ',u.lname) pmName
from leases l inner join users u on l.pmID = u.id
where propertyID = :propertyID
order by LeaseTo DESC
");
qReturn = qData.execute();
result = qReturn.getResult();
return result;
}
}
如有任何建议,我们将不胜感激。
谢谢!
您正在调用 leaseService
作为方法。这是一个变量。所以不是这个:
rc.property = variables.propertyService.detail(id=rc.id);
rc.leases = variables.leaseService().list(propertyID=rc.id);
这样做:
rc.property = variables.propertyService.detail(id=rc.id);
rc.leases = variables.leaseService.list(propertyID=rc.id);
请注意,我删除了 ()
HTH