我想传递i的值来创建.gsp页面,该怎么做
def save = {
def billingPeriodInstance = new BillingPeriod(params)
DatabaseImpController obj= new DatabaseImpController()
int i = obj.setbillPeriod()
if(i== 1){
render(view: "create")
}
}
答案 0 :(得分:8)
只需使用
render(view: "create", model:[i: i])