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

SubmitLink issue : Need for handling user's own onclick javascript call + default && modification in onComponentTag call.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.2.4
    • 1.2.7
    • wicket
    • None
    • Any OS

    Description

      Wicket version 1.2.4

      Note: The scenario explained below works perfectly well for a Link.

      Usage :

      I am using a submit Link in my form to perform a delete operation .
      I disable the link when there is nothing to delete
      [ I maintain a list for this ] and when the user checks some items to
      be deleted , i enable the link and add a onClick attribute to call a javascript
      confirmation box via a behavior. Finally i use AjaxRequestTarget.addComponent to render.

      Problem :

      Wicket complains that the delete link cannot be found even though i set
      markupid to true in all relevant places.

      So while debugging i figured out that onComponentTag of SubmitLink
      does not call super.onComponentTag . By introducing this call in the method,
      I could see the id value[markup id] in source code.

      HOWEVER this did not solve my problem fully because onClick did not
      call my Javascript function. So on examining the Ajax Debug window
      output, I could see 2 onclicks added for submitlink response.

      This issue needs to address the following 2 questions...

      1> why doesnt current onComponentTag call super.onComponetTag ?

      2> How do i ensure that my javascript call gets invoked before the submit operation?

      -Thanks
      swaroop belur

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            sbelur swaroop belur
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: