Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-7123

Form.setDefaultButton() supports only one button per form hierarchy

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 10.1.0
    • None
    • wicket-core
    • None

    Description

      Currently Form.setDefaultButton() support only one button per whole form hierarchy, which is a problem when there are multiple forms on page of for example popup. It complicates even further when those default submit buttons have custom visibility/enabled state.

      Current implementation puts hidden field in root form which stores name of submit button and then creates client JS click() via jquery.

      This should be easy doable directly on form where the default button is located without the need to pass it to root form.

      What do you think about this?

      PR available here https://github.com/apache/wicket/pull/968

      Attachments

        Activity

          People

            Unassigned Unassigned
            viliam.repan Viliam Repan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: