You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alex Grant (JIRA)" <ji...@apache.org> on 2014/02/02 23:04:08 UTC

[jira] [Commented] (WICKET-5495) Form.findSubmittingButton() throws a WicketRuntimeException if the relevant button is now disabled

    [ https://issues.apache.org/jira/browse/WICKET-5495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13889080#comment-13889080 ] 

Alex Grant commented on WICKET-5495:
------------------------------------

Thank you for your help; sorry to have wasted your time.

> Form.findSubmittingButton() throws a WicketRuntimeException if the relevant button is now disabled
> --------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-5495
>                 URL: https://issues.apache.org/jira/browse/WICKET-5495
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.13.0
>            Reporter: Alex Grant
>
> In Form.findSubmittingButton(), there is a test to ensure the relevant button is both visible and enabled.
> However, this means that is no longer possible to determine which button is clicked if it has become disabled.
> A simple example of this is if you are on the second step of a wizard and you click the Previous button. That button is now disabled so invoking this method throws an Exception.
> I want to be able to use this method in a wizard that also renders tabs at the top (to allow the user to jump between steps), because I only want the required field validation to fire if the user clicks Finish so all my mandatory fields have the isRequired() method overridden to check if the submitting button is the Finish button. This has the side-effect that Form.findSubmittingButton() is invoked when rendering the page (rather than just when processing the submit), by which time the button is now disabled.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)