[
https://issues.apache.org/jira/browse/TOMAHAWK-971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495742
]
Eduard Martinescu commented on TOMAHAWK-971:
--------------------------------------------
The problem is NOT with the inner class.
The problem is actually with the 'restoreState()' method.
Currently, at the end of restorState, there is a call to
addActionListener(scheduleListener);
This duplicates work done in the constructor itself, causing 2 instance of the
listener to be added.
If you make the fix suggested above, this will continue to add extra entries to
the listener array list, and not be correct behavior.
The real fix is to NOT do the call above in the restoreState() method, and just
let it be taken care of in the constructor.
> Schedule throws a java.lang.IllegalStateException if more than one post back
> is made consecitively when using the jsf 1.1 ri
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: TOMAHAWK-971
> URL: https://issues.apache.org/jira/browse/TOMAHAWK-971
> Project: MyFaces Tomahawk
> Issue Type: Bug
> Components: Schedule
> Affects Versions: 1.1.5, 1.1.6-SNAPSHOT
> Environment: Sun 1.5.0_11-b03
> apache-tomcat-5.5.23
> Sun jsf-1.1_02-b08
> Microsoft Windows XP [Version 5.1.2600]
> Reporter: Kem Elbrader
> Assigned To: Jurgen Lust
>
> Deploying the myfaces-example-simple-1.1.5.war on a default installation of
> tomcat the schedule1.jsf page works fine. Switching to the reference
> implementation of jsf the schedule1.jsf page comes up and I'm able to make
> one post back to the page but I get the following exception after more than
> one post back of any kind.
> java.lang.IllegalStateException:
> org.apache.myfaces.custom.schedule.UISchedule$ScheduleActionListener
> at
> javax.faces.component.StateHolderSaver.restore(StateHolderSaver.java:100)
> at
> javax.faces.component.UIComponentBase.restoreAttachedState(UIComponentBase.java:1299)
> at
> javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1151)
> at
> org.apache.myfaces.custom.schedule.UISchedule.restoreState(UISchedule.java:378)
> at
> org.apache.myfaces.custom.schedule.HtmlSchedule.restoreState(HtmlSchedule.java:189)
> at
> javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1032)
> at
> javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1044)
> at
> javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1044)
> at
> javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1044)
> at
> com.sun.faces.application.StateManagerImpl.restoreComponentState(StateManagerImpl.java:359)
> at
> com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:262)
> at
> com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:250)
> at
> com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:177)
> at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
> at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> at
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
> at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
> at java.lang.Thread.run(Thread.java:595)
> For example on the schedule1.jsf page click "add sample entries" twice.
> To isolate that this happens on any post back I added the following to the
> same page
> <h:form>
> <h:commandButton value="test"/>
> </h:form>
> and then clicked the test button twice.
> I've also found the same result on the following environments.
> - apache-tomcat-5.5.23, jsf-1.1_02-b08, and tomahawk-1.1.5
> - apache-tomcat-5.5.23, jsf-1.1_02-b08, and tomahawk-1.1.6-SNAPSHOT
> - apache-tomcat-6.0.10, jsf-1.1_02-b08, and tomahawk-1.1.5
> - apache-tomcat-6.0.10, jsf-1.1_02-b08, and tomahawk-1.1.6-SNAPSHOT
> - apache-tomcat-6.0.10, jsf-1.2_04-b07-FCS, and tomahawk-1.1.5
> - apache-tomcat-6.0.10, jsf-1.2_04-b07-FCS, tomahawk-1.1.6-SNAPSHOT
> the MyFaces implementation seems to work fine in all of these environments.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.