Project

General

Profile

Bug #974

Prevent user of double-click on save button

Added by Ricardo Memoria over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Start date:
11/28/2013
Due date:
% Done:

0%


Description

In all forms in the case management module, check if the "save" or "ok" button are protected against user double-clicking on that.

For example, case edit page, if the user double clicks on the save button, an error happens in the server side:

org.jboss.seam.RequiredException 
@In attribute requires non-null value: caseBDHome.caseHome 
org.jboss.seam.RequiredException: @In attribute requires non-null value: caseBDHome.caseHome 
at org.jboss.seam.Component.getValueToInject(Component.java:2361) 
at org.jboss.seam.Component.injectAttributes(Component.java:1739) 
at org.jboss.seam.Component.inject(Component.java:1557) 
at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61) 
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) 
at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:97) 

Solution:

Check all forms and for all command button, implement the java script bellow:

Save button:

onclick="if (!disableButton(this)) return false;" 

Cancel button

onclick="disableButton(this)" 

History

#1 Updated by Maurício Dos Santos over 11 years ago

  • Status changed from New to In Progress

#2 Updated by Maurício Dos Santos over 11 years ago

  • Status changed from In Progress to Resolved

#3 Updated by Luis Gustavo do Valle Bastos over 11 years ago

  • Status changed from Resolved to Closed

Tested and adequate.

Also available in: Atom PDF