FullAjaxExceptionHandler with datatable and lazydatamodel

纵饮孤独 提交于 2020-01-24 01:48:48

问题


I'm building a search page with primefaces 3.4 and omnifaces 1.3. Managed bean is SessionScoped.

I have a xhtml page with a:

<p:autoComplete id="searchBox" value="#{searchBean.queryText}"... />
<p:commandButton action="#{searchBean.search()}" value="search" ajax="false" .../>

 <p:dataTable id="docuList" var="doc"
                                     binding="#{searchBean.resultDataTable}"
                                     value="#{searchBean.lazyModel}" lazy="true"
                                     styleClass="noBorder" paginator="true" rows="10"
                                     paginatorPosition="bottom" 
                                     paginatorTemplate="{PreviousPageLink} {CurrentPageReport} {NextPageLink}">
...
</p:dataTable>

SearchBean have a method search that initialize query and lazyDataModel.

LazyDataModel do a real query on db.

When session timeout I have an exception on lazyDataModel load method but FullAjaxExceptionHandler can't intercept that...

How can I manage exception in lazyDataModel to redirect to expired session page?

Thank you for any response.

来源:https://stackoverflow.com/questions/14836325/fullajaxexceptionhandler-with-datatable-and-lazydatamodel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!