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

findSubmittingButton will fail when button without form is added before form

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.3.3
    • Component/s: wicket
    • Labels:
      None

      Description

      Form submitting button is not found when page contains another button, which is not part of form and is added to the page hierarchy before form. When it is added after the form, it is working. The problem is in the method of Form class:

      public final IFormSubmittingComponent findSubmittingButton()
      {
      IFormSubmittingComponent submittingComponent = (IFormSubmittingComponent) getPage().visitChildren(
      IFormSubmittingComponent.class, new IVisitor()

      which is serching for the submitting button in the whole page instead of the form only. I think correctly should be

      public final IFormSubmittingComponent findSubmittingButton()
      {
      IFormSubmittingComponent submittingComponent = (IFormSubmittingComponent)visitChildren(
      IFormSubmittingComponent.class, new IVisitor()

        Attachments

        1. myproject.zip
          10 kB
          Petr Sakar
        2. myproject.zip
          0.1 kB
          Petr Sakar

          Activity

            People

            • Assignee:
              jcompagner Johan Compagner
              Reporter:
              saki Petr Sakar
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: