You shouldn't be altering the state of the button in javascript
yourself. This will conflict with the JSF ViewState of the component
that is maintained on the server.
There are some other ways to prevent events from being processed by
the page once the form has been submitted. One way is to render a div
that covers the entire page after the button is clicked. The div could
have a message saying "Processing..." or something.

-R



On Mon, Feb 16, 2009 at 5:41 AM, Simon Kitching <[email protected]> wrote:
> SANTINI, Rafael schrieb:
>> Hi,
>>
>> Why when onclick="this.disabled=true; return true" in a commandButton
>> the action is not executed? I'm trying disable the button after a click.
>
> Disabled controls are never sent to the webserver on submit:
>  http://www.w3.org/TR/html401/interact/forms.html#h-17.12
>
> Use "readonly" instead.
>
> --
> -- Emails in "mixed" posting style will be ignored
> -- (http://en.wikipedia.org/wiki/Posting_style)
>

Reply via email to