atom feed13 messages in org.apache.struts.userShale: onclick="disabled='true';" not...
FromSent OnAttachments
Jason VincentMay 11, 2006 9:41 am 
James ReynoldsMay 11, 2006 9:49 am 
Craig McClanahanMay 11, 2006 10:59 am 
Jason VincentMay 11, 2006 12:20 pm 
Jason VincentMay 11, 2006 12:21 pm 
James ReynoldsMay 11, 2006 12:39 pm 
Michael JouravlevMay 11, 2006 1:17 pm 
Craig McClanahanMay 11, 2006 2:04 pm 
Michael JouravlevMay 11, 2006 2:17 pm 
Craig McClanahanMay 11, 2006 2:28 pm 
Michael JouravlevMay 11, 2006 2:56 pm 
Craig McClanahanMay 11, 2006 3:02 pm 
Richard WallaceMay 11, 2006 8:47 pm 
Subject:Shale: onclick="disabled='true';" not calling Action Method. (stopping double click)
From:Jason Vincent (jtvi@gmail.com)
Date:May 11, 2006 9:41:26 am
List:org.apache.struts.user

Hi all,

My project spec is asking me to disable form buttons once they are clicked. It seemed easy to me, just add onclick="disabled='true'" to the commandButton. But as anything I've found with JSF, it isn't that easy.

When I do this, the action method isn't being called after it passes validation. If I remove the onclick attribute, the form works fine; so I know it isn't a logic failure in the ViewController.

I noticed that JSF inserts some of its own onclick logic to the button too. So I thought I'd try to disable the button by using the onsubmit attribute of the form tag. This also had the same behavior.

What is going on here? Is disabling the button changing the submitted request parameters?

Thanks all, Jason