Re: Problem with JavaScript when using Wicket AJAX Components

2007-12-21 Thread Matej Knopp
Sorry, it's onRendered in AbstractBehavior.

-Matej

On Dec 21, 2007 8:13 AM, thomas jaeckle [EMAIL PROTECTED] wrote:


 Matej Knopp-2 wrote:
 
  Try this (it's a bit hacky though):
 
  datatable.add(new AbstractBehavior() {
public final void afterRender(final Component component) {
   AjaxRequestTaget target = AjaxRequestTarget.get();
   if (target !- null) {
   target.appendJavascript(your javascript to initialize the
  tooltips);
   }
}
  });
 
  -Matej
 
 Overriding a final method?
 I try to find another place to put the appendJavascript ..

 Thanks so far.

 --
 View this message in context: 
 http://www.nabble.com/Problem-with-JavaScript-when-using-Wicket-AJAX-Components-tp14432037p14451288.html

 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with JavaScript when using Wicket AJAX Components

2007-12-20 Thread thomas jaeckle

I think I understand now, why the tooltips don't appear.
The JavaScript is initialized when the Page is initialized. At this time the
DataTable inside the AjaxLazyLoadPanel is not there.
The JavaScript iterates over all elements I have specified ('input', 'td',
'tr', 'textarea', 'select', 'span', 'div', 'a','abbr','acronym') and adds
events for them. But of course none of the DataTable - it is not there yet.

But how do I specify that the JavaScript is again executed after the
AjaxLazyLoadPanel has loaded the DataTable?


regards Thomas
-- 
View this message in context: 
http://www.nabble.com/Problem-with-JavaScript-when-using-Wicket-AJAX-Components-tp14432037p14438456.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with JavaScript when using Wicket AJAX Components

2007-12-20 Thread Matej Knopp
Try this (it's a bit hacky though):

datatable.add(new AbstractBehavior() {
  public final void afterRender(final Component component) {
 AjaxRequestTaget target = AjaxRequestTarget.get();
 if (target !- null) {
 target.appendJavascript(your javascript to initialize the
tooltips);
 }
  }
});

-Matej

On Dec 20, 2007 4:33 PM, thomas jaeckle [EMAIL PROTECTED] wrote:

 I think I understand now, why the tooltips don't appear.
 The JavaScript is initialized when the Page is initialized. At this time the
 DataTable inside the AjaxLazyLoadPanel is not there.
 The JavaScript iterates over all elements I have specified ('input', 'td',
 'tr', 'textarea', 'select', 'span', 'div', 'a','abbr','acronym') and adds
 events for them. But of course none of the DataTable - it is not there yet.

 But how do I specify that the JavaScript is again executed after the
 AjaxLazyLoadPanel has loaded the DataTable?


 regards Thomas
 --
 View this message in context: 
 http://www.nabble.com/Problem-with-JavaScript-when-using-Wicket-AJAX-Components-tp14432037p14438456.html

 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]