The first thought that occurs to me is, how about binding the button's JSF 'disabled' attribute to a boolean property on your backing bean? As part of the button's action method, you could set the boolean to true, thereby disabling the button when the page reloads.
-----Original Message----- From: Jason Vincent [mailto:[EMAIL PROTECTED] Sent: Thursday, May 11, 2006 10:42 AM To: user@struts.apache.org Subject: Shale: onclick="disabled='true';" not calling Action Method. (stopping double click) 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]