0
我正在使用檢票1.5.7,我想在DefaultDataTable的單元格中創建一個鏈接。
所以我複製this page中的示例,但我得到檢票運行時錯誤:在檢票口中使整行可點擊
最後一個原因:無法找到關聯的標記文件。 ActionPanel:[ActionPanel [組件id =電池]
這裏是我的一些代碼:
public GroupsList(final PageParameters parameters)
{
ArrayList<IColumn> columns = new ArrayList<IColumn>();
columns.add(new AbstractColumn<Group>(new Model<String>("Actions"))
{
public void populateItem(Item<ICellPopulator<Group>> cellItem, String componentId,
IModel<Group> model)
{
cellItem.add(new ActionPanel(componentId, model));
}
});
add(new DefaultDataTable("table", columns, new GroupDataProvider(), 8));
}
,這裏是我的ActionPanel
class ActionPanel extends Panel
{
public ActionPanel(String id, IModel<Group> model)
{
super(id, model);
add(new Link("select")
{
@Override
public void onClick()
{
PageParameters pp = new PageParameters();
setResponsePage(new HomePage(pp));
}
});
}
}
任何想法的根本原因?