2
我最近完成了遊戲教程..在CRUD管理區域中,有一個搜索工具,您可以在其中搜索Posts標題中的關鍵字。在哪裏可以找到代碼那個特殊的功能?(搜索)。我通過CRUD模塊代碼,但找不到它。有人可以幫忙嗎?用於在playframework中的CRUD區域搜索的代碼
我最近完成了遊戲教程..在CRUD管理區域中,有一個搜索工具,您可以在其中搜索Posts標題中的關鍵字。在哪裏可以找到代碼那個特殊的功能?(搜索)。我通過CRUD模塊代碼,但找不到它。有人可以幫忙嗎?用於在playframework中的CRUD區域搜索的代碼
在這裏搜索?
代碼的相關部分(在CRUD.java [見modules/crud/app/controller
在你的遊戲安裝目錄。):
@SuppressWarnings("unchecked")
public List<Model> findPage(int page, String search, String searchFields,
String orderBy, String order, String where)
{
return Model.Manager.factoryFor(entityClass).fetch((page - 1) * getPageSize(),
getPageSize(), orderBy, order, searchFields == null ?
new ArrayList<String>() : Arrays.asList(searchFields.split("[ ]")),
search, where);
}
感謝快速響應 – jimgardener