handlePartialResponseError主要面孔数据模型

时间:2018-11-10 22:57:50

标签: primefaces jsf-2.2 partial-response

我有一个JSF页面,它的数据表带有全局过滤器,而单选则带有SelectEvent。 该数据表位于由backbean“ renderTable = true”中的布尔值表示的面板中。

<p:ajax event="rowSelect" update=":opl01"
                                listener="#{backbean.RerenderTable()}" />


public void RerenderTable() {
            this.setrenderTable (false);
    }

我详细介绍了该行的第二个面板是“!renderTable”。
这样,当我选择表格的行消失时,行详细信息将显示在secend面板中。

在第二个面板“ goback”中有一个p:commandLink,其中包含一个actionListener,该方法调用backbean返回数据表。

<p:commandLink actionListener="#{backBean.goBack}"
                                    update=":opl01">    
public void goBack() {
            this.setrenderTable (True);
    }

直到那时,一切都进展顺利! 当我使用全局过滤器过滤并选择一行时,就会发生问题。包含数据库desapear的面板和包含详细信息apear的面板,如果我单击该链接可以返回,则可以正常工作,但是如果我之前重新加载页面,然后尝试通过单击该链接进行返回,则会出现异常:

nov. 10, 2018 11:26:57 PM com.sun.faces.context.AjaxExceptionHandlerImpl handlePartialResponseError
GRAVE: java.lang.IllegalStateException: java.lang.InstantiationException: org.primefaces.model.SelectableDataModelWrapper
    at javax.faces.component.StateHolderSaver.restore(Unknown Source)
    at javax.faces.component.ComponentStateHelper.restoreState(Unknown Source)
    at javax.faces.component.UIComponentBase.restoreState(Unknown Source)
    at javax.faces.component.UIData.restoreState(Unknown Source)
    at org.primefaces.component.api.UIData.restoreState(UIData.java:1293)
    at com.sun.faces.application.view.FaceletPartialStateManagementStrategy$2.visit(Unknown Source)
    at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(Unknown Source)
    at org.primefaces.component.api.UIData.visitTree(UIData.java:850)
    at javax.faces.component.UIComponent.visitTree(Unknown Source)
    at javax.faces.component.UIForm.visitTree(Unknown Source)
    at javax.faces.component.UIComponent.visitTree(Unknown Source)
    at javax.faces.component.UIComponent.visitTree(Unknown Source)
    at javax.faces.component.UIComponent.visitTree(Unknown Source)
    at javax.faces.component.UIComponent.visitTree(Unknown Source)
    at com.sun.faces.application.view.FaceletPartialStateManagementStrategy.restoreView(Unknown Source)
    at com.sun.faces.application.StateManagerImpl.restoreView(Unknown Source)
    at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(Unknown Source)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(Unknown Source)
    at com.sun.faces.application.view.MultiViewHandler.restoreView(Unknown Source)
    at com.sun.faces.lifecycle.RestoreViewPhase.execute(Unknown Source)
    at com.sun.faces.lifecycle.Phase.doPhase(Unknown Source)
    at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(Unknown Source)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
    at javax.faces.webapp.FacesServlet.service(Unknown Source)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.InstantiationException: org.primefaces.model.SelectableDataModelWrapper
    at java.lang.Class.newInstance(Unknown Source)
    ... 45 more
Caused by: java.lang.NoSuchMethodException: org.primefaces.model.SelectableDataModelWrapper.<init>()
    at java.lang.Class.getConstructor0(Unknown Source)
    ... 46 more

我认为这是因为backbean是会话作用域的。如何在不更改bean范围的情况下解决此异常?

0 个答案:

没有答案