Re: Additional attributes to ajax events

2010-07-21 Thread Pedro Santos
You can override the getAjaxCallDecorator method from
AjaxFormComponentUpdatingBehavior and return an IAjaxCallDecorator that
append your custom javascript

On Wed, Jul 21, 2010 at 10:26 AM, Brown, Berlin [GCG-PFS] 
berlin.br...@primerica.com wrote:

 With the onblur ajax calls, is it possible to add my own javascript .
  final AjaxFormComponentUpdatingBehavior blurText = new
 AjaxFormComponentUpdatingBehavior(onblur) {
   @Override
 protected void onUpdate(AjaxRequestTarget target) {
checkPageNextLink(target);
 }
};

 In the markup, can I simply add the onblur and it will get appended?

 onblur=alert('update')

 How do I add the ajax call and then add my own javascript call?






-- 
Pedro Henrique Oliveira dos Santos


RE: Additional attributes to ajax events

2010-07-21 Thread Brown, Berlin [GCG-PFS]
Is it possible to add the javascript function in the markup and
somehow copy that value and append to the ajax onblur.

E.g. This is in my markup : onblur=alert('update')

Based on what you said, it looks like you are suggesting adding the
javascript method in the Java code. 


-Original Message-
From: Pedro Santos [mailto:pedros...@gmail.com] 
Sent: Wednesday, July 21, 2010 2:15 PM
To: users@wicket.apache.org
Subject: Re: Additional attributes to ajax events

You can override the getAjaxCallDecorator method from
AjaxFormComponentUpdatingBehavior and return an IAjaxCallDecorator that
append your custom javascript

On Wed, Jul 21, 2010 at 10:26 AM, Brown, Berlin [GCG-PFS] 
berlin.br...@primerica.com wrote:

 With the onblur ajax calls, is it possible to add my own javascript .
  final AjaxFormComponentUpdatingBehavior blurText = new
 AjaxFormComponentUpdatingBehavior(onblur) {
   @Override
 protected void onUpdate(AjaxRequestTarget target) {
checkPageNextLink(target);
 }
};

 In the markup, can I simply add the onblur and it will get appended?

 onblur=alert('update')

 How do I add the ajax call and then add my own javascript call?






--
Pedro Henrique Oliveira dos Santos


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Additional attributes to ajax events

2010-07-21 Thread Pedro Santos
Hi Brown, as you are using an behavior that changes the value of the onblur
tag attribute from the java code, you need to customize the javascript on
your java code also. If you add some javascript on the tag attribute, and
then add some behavior that change that tag attribute, you will lose your
original javascript.

On Wed, Jul 21, 2010 at 4:54 PM, Brown, Berlin [GCG-PFS] 
berlin.br...@primerica.com wrote:

 Is it possible to add the javascript function in the markup and
 somehow copy that value and append to the ajax onblur.

 E.g. This is in my markup : onblur=alert('update')

 Based on what you said, it looks like you are suggesting adding the
 javascript method in the Java code.


 -Original Message-
 From: Pedro Santos [mailto:pedros...@gmail.com]
 Sent: Wednesday, July 21, 2010 2:15 PM
 To: users@wicket.apache.org
 Subject: Re: Additional attributes to ajax events

 You can override the getAjaxCallDecorator method from
 AjaxFormComponentUpdatingBehavior and return an IAjaxCallDecorator that
 append your custom javascript

 On Wed, Jul 21, 2010 at 10:26 AM, Brown, Berlin [GCG-PFS] 
 berlin.br...@primerica.com wrote:

  With the onblur ajax calls, is it possible to add my own javascript .
   final AjaxFormComponentUpdatingBehavior blurText = new
  AjaxFormComponentUpdatingBehavior(onblur) {
@Override
  protected void onUpdate(AjaxRequestTarget target) {
 checkPageNextLink(target);
  }
 };
 
  In the markup, can I simply add the onblur and it will get appended?
 
  onblur=alert('update')
 
  How do I add the ajax call and then add my own javascript call?
 
 
 
 


 --
 Pedro Henrique Oliveira dos Santos


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Pedro Henrique Oliveira dos Santos