我有两个对象书签,书签,我想将对象作为参数传递给 Scala 模板,例如
return ok(views.html.bookmarks.list.render(bookmark, bookmarks));
在 F.Promise 中,
public static F.Promise<Result> get(final String id) {
F.Promise<Bookmark> bookmark = Bookmark.findById(id);
F.Promise<Collection<Bookmark>> bookmarks = Bookmark.findAll();
// here how to write the code that should pass both objects to scala template
}
如何编写return语句以在没有Json Result的情况下在F.Promise中传递这两个对象?