Re: OnChangeAjaxBehavior: nth character

2010-02-13 Thread Cemal Bayramoglu
Steven, Start with something like this: zipcodeField.add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) { // do your stuff here } @Override protected IAjaxCallDecorator getAjaxCallDecorator() { return new AjaxCallDecorator() {

Re: OnChangeAjaxBehavior: nth character

2010-02-13 Thread Riyad Kalla
Cemal, very intuitive -- thanks for that. On Sat, Feb 13, 2010 at 6:26 AM, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: Steven, Start with something like this: zipcodeField.add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) {

Re: OnChangeAjaxBehavior: nth character

2010-02-13 Thread Steven Haines
, 2010 8:26:37 AM Subject: Re: OnChangeAjaxBehavior: nth character Steven, Start with something like this: zipcodeField.add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) { // do your stuff here } @Override protected IAjaxCallDecorator

OnChangeAjaxBehavior: nth character

2010-02-12 Thread Steven Haines
Hi, I would like to add AJAX behavior to an application that sends an update to my application after a certain number of characters have been typed. For example, if the user is entering a zipcode, I would like a callback to my application to be made after the user enters the fifth character.

Re: OnChangeAjaxBehavior: nth character

2010-02-12 Thread vineet semwal
you can do the same thing with wicket ie. on 5th char typed,make a ajaxcallback to wicket, 1)you need to add behavior to component and implement it's respond method the way it suits your need. 2)in the js part you will make a callback on 5th char typed,callbackurl you will get from the behavior

Re: OnChangeAjaxBehavior: nth character

2010-02-12 Thread Riyad Kalla
Vineet is exactly right, just to further flesh it out: You want to add a subclass of AbstractDefaultAjaxBehavior to your page, this automatically contributes the wicket-ajax.js file to your page which exposes these JavaScript methods for you: === function wicketAjaxGet(url,

Re: OnChangeAjaxBehavior: nth character

2010-02-12 Thread vineet semwal
Riyad, 1)url is callbackurl you will get from abstractdefaultajaxbehavior.getcallbackurl() 2)method you need to implement is the abstractdefaultajaxbehavior's respond method On Sat, Feb 13, 2010 at 3:58 AM, Riyad Kalla rka...@gmail.com wrote: Vineet is exactly right, just to further flesh it

Re: OnChangeAjaxBehavior: nth character

2010-02-12 Thread Riyad Kalla
Ah! Thanks Vineet. On Fri, Feb 12, 2010 at 3:42 PM, vineet semwal vineetsemwal1...@gmail.comwrote: Riyad, 1)url is callbackurl you will get from abstractdefaultajaxbehavior.getcallbackurl() 2)method you need to implement is the abstractdefaultajaxbehavior's respond method On Sat, Feb 13,

Re: OnChangeAjaxBehavior: nth character

2010-02-12 Thread Igor Vaynberg
you can use an iajaxcalldecorator to add javascript before the call is made and interrupt it by simply return true until fifth character has been pressed. -igor On Fri, Feb 12, 2010 at 12:45 PM, Steven Haines lyg...@yahoo.com wrote: Hi, I would like to add AJAX behavior to an application