You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2008/02/28 10:59:54 UTC

[jira] Created: (WICKET-1379) Provide a way to pass HTTP parameters with Wicket's Ajax requests

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

                 Key: WICKET-1379
                 URL: https://issues.apache.org/jira/browse/WICKET-1379
             Project: Wicket
          Issue Type: New Feature
          Components: wicket
    Affects Versions: 1.3.1
            Reporter: Martin Grigorov


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.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-1379) Provide a way to pass HTTP parameters with Wicket's Ajax requests

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-1379.
-----------------------------------

       Resolution: Invalid
    Fix Version/s: 1.3.2
         Assignee: Igor Vaynberg

this is already possible, eg

page.add(new abstractajaxtimerbehavior(...) {
   charsequence getcallbackurl(boolean onlycurrent) {
       string str=new string(super.getcallbakcurl(onlycurrent);
       str+="&pos='+window.pos";
    }

    protected void ontimer(...) { string pos=getrequest().getparameter("pos"); ...}
}




> Provide a way to pass HTTP parameters with Wicket's Ajax requests
> -----------------------------------------------------------------
>
>                 Key: WICKET-1379
>                 URL: https://issues.apache.org/jira/browse/WICKET-1379
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.3.1
>            Reporter: Martin Grigorov
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.2
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1379) Provide a way to pass HTTP parameters with Wicket's Ajax requests

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1379:
---------------------------------------

    Fix Version/s:     (was: 1.3.2)

> Provide a way to pass HTTP parameters with Wicket's Ajax requests
> -----------------------------------------------------------------
>
>                 Key: WICKET-1379
>                 URL: https://issues.apache.org/jira/browse/WICKET-1379
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.3.1
>            Reporter: Martin Grigorov
>            Assignee: Igor Vaynberg
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.