我将ColdBox与ColdFusion 10一起使用。我想用setView()传递一个参数说 id=1000 。我找不到任何传递参数的示例。
这是代码:
component {
// Dependency Injection
property name="requestService" inject="RequestService";
function index(event, rc, prc) {
var response = requestService.save(rc);
if(response.Success EQ true) {
event.setView(view="requests/success"); //Want to pass a param(int)
} else {
event.setView("requests/failure");
}
}
}