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

Provide a way to pass HTTP parameters with Wicket's Ajax requests

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 1.3.1
    • None
    • wicket
    • None

    Description

      I need a way to pass HTTP parameters to my Ajax callback methods.

      Here is my use case:
      I am doing "endless paging/loading" behavior for table/grid components. Something like Thoof's "endless paging".
      Another example for pages is http://donteattoomuch.blogspot.com/2008/01/implementing-endless-pageless-in-wicket.html.

      To scan the position of the vertical scroll I use an implementation of AbstractAjaxTimerBehavior. The timeout function (JavaScript) could check the
      position of the scroll but there is no way to add a http parameter to the callbackUrl which will tell me on the server side where is the scroll now - at the top
      or at the bottom.
      Currently I am using two timers - one for top and one for bottom.

      Another (more fancy) approach is to register AjaxEventBehavior for "onscroll" event and (with throttling) to send the current position of the scroll. This way it will behave like a "smooth scrolling".

      This is just my use case. Maybe there are other case when the user wants to send a parameter with Wicket Ajax. I looked at wicket-ajax.js and I didn't
      see any logic for passing http parameters in doGet/doPost methods.

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            martin-g Martin Grigorov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: