3
使用LazyDataModel多排序我得到NullPointerException。當我使用sortMode = 「多」,Load方法是在屬性 列表multiSortMetaLazy DataModel多列排序不起作用
我XHTML取空值
<h:panelGroup id="processPanel">
<p:dataTable id="processTable" value="#{hubProcessBean.processModel}"
var="process" paginator="true" paginatorAlwaysVisible="false"
rows="5" lazy="true" sortBy="#{process.transactionId}" sortOrder="ascending" rows="5" lazy="true" sortMode="multiple" resizableColumns="true">
,並在bean我打電話
processModel_ = new TransactionLazyDataModel(criteria);
和我的LazyDataModel是
@Override
public List<Transaction> load(int first, int pageSize, List<SortMeta> multiSortMeta, Map<String,String> filters) {
try {
HibernateUtil.beginTransaction();
transactionList = transactionHome.loadByCriterion(criterias_,first, pageSize, multiSortMeta);
for (Transaction tr : transactionList) {
Hibernate.initialize(tr.getAgency());
Hibernate.initialize(tr.getClient().getId().getClientName());
Hibernate.initialize(tr.getDecisionrule().getId());
//Hibernate.initialize(tr.getEscalationhistory().getEscalationtype().getEscalationTypeId());
Hibernate.initialize(tr.getUserByBuyer());
//Hibernate.initialize(tr.getDecisionrule().getId());
}
HibernateUtil.commitTransaction();
您正在使用哪個版本的Primefaces? – partlov 2013-03-04 10:35:54
@partlov:我正在使用Primefaces 3.5 – Sagar 2013-03-04 10:38:18
您的數據表和託管bean的郵政編碼。 – partlov 2013-03-04 10:42:12