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

Using an AjaxSubmitLink outside of a Form does not set the form property

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.4
    • Fix Version/s: 1.3.6, 1.4-RC2
    • Component/s: wicket
    • Labels:
      None

      Description

      When constructing an AjaxSubmitLink outside of a form using the constructor:

      public AjaxSubmitLink(String id, final Form form)

      The form argument is not set in the link. This prevents the form from seeing the link as its submitting component, which in turn means that using thing like enableDefaultFormProcessing() on the link don't work.

      Changing the constructor of AjaxSubmitLink to:

      public AjaxSubmitLink(String id, final Form form)
      {
      super(id, form) /* was: super(id) */
      ...
      }

      will probably fix the problem.

      A temporary workaround is to implement a getForm() method in the subclass of the submit link which answers the form of the link

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ivaynberg Igor Vaynberg
                Reporter:
                pprooi Pieter van Prooijen
              • Votes:
                1 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: