3
我試圖從doc運行hello world app。Play Framework 2.0 - views.render拋出異常
我得到以下錯誤:
render(java.lang.String) in views.html.index cannot be applied to (play.data.Form<controllers.Application.Hello>)
指着下面的代碼塊:
/**
* Home page
*/
public static Result index() {
return ok(index.render(form(Hello.class)));
}
同樣的Eclipse不能解決索引對象的.render方法。
the method render(String) in the type index is not applicable for the arguments (Form<Application.Hello>)
我定義瞭如下進口:
package controllers;
import play.*;
import play.mvc.*;
import play.data.*;
import play.data.validation.Constraints.*;
import java.util.*;
import views.html.*;
另外,hello.scala.html和index.scala.html所在的文件夾的應用程序/視圖/可
任何想法我做錯了?
感謝您的幫助。明白了,它現在起作用了! – 2012-04-05 15:57:54