[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
clicking buttons within a poup successive leads to an error  XML
Forum Index -> Development
Author Message
kretzler

Power User

Joined: 21/11/2007 13:00:57
Messages: 73
Location: Karlsruhe
Offline

Hello,

there is a popup with two buttons.
Save and Cancel.
Both buttons are closing the popup.
ModalPopup.close()

If I click the buttons shortly after each other I got the following error message.

java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.set(ArrayList.java:339)
at org.eclnt.jsfserver.defaultscreens.ModalPopup.close(ModalPopup.java:67)
at de.vps.icms.ui.cardtypeadmin.CardTypeAdminDesigner.onCancel(CardTypeAdminDesigner.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
at org.eclnt.jsfserver.elements.MethodBindingDelegator.invoke(MethodBindingDelegator.java:55)
at org.eclnt.jsfserver.elements.BaseActionComponent.broadcast(BaseActionComponent.java:164)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.eclnt.jsfserver.util.ThreadingFilter.doFilter(ThreadingFilter.java:110)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.eclnt.jsfserver.util.CompressionFilter.doFilter(CompressionFilter.java:33)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)

CardTypeAdminDesigner.java
104 public void onCancel(final ActionEvent event) {
105 m_command = "CloseLayout(" + layoutId + ")";
106 ModalPopup.close();
107 }

The problem seams to be that both actionListeners are called and each actionListener is trying to close the popup but i am not sure about it.

What is the solution for this problem. A workaround could be to disable e.g. the cancel button when the user clicks the save button. Another possibility is that the popup closes fast enough so the user has no chance to click the other button.

Thanks,
Ralph
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

Hi Ralph,

I cannot reproduce: when I click one button then the mouse is blocked and I cannot click the other button anymore. No chance for me to step in between...
Then, when the one button receives the response from the server the popup is immediately closed. Again, no chance to step in...

Please tell me: version, environment (started as applet/webstart/application).

Thanks! Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team