Hi there,

I was wondering if it'd be possible to generate the JavaScript for i.e.
AjaxLink components in such a way that the actual JS is not directly there
as onclick parameter. It's the idea of unobtrusive JavaScript makes the
markup a lot cleaner and easier to read.

A good example of such an unobtrusive JavaScript approach could be observed
in jQuery (http://docs.jquery.com/Events/click):

jQuery([item_selector]).click([handler]);

This binds the onclick event of an element to the given handler without
polluting the actual markup with stuff like

onclick="var
wcall=wicketAjaxGet('?wicket:interface=:0:link_inc::IBehaviorListener:0:',null,null,
function() {return Wicket.$('link__inc1') != null;}.bind(this));return
!wcall;"

which in turn makes reading the generated markup (a bit) harder if there are
lots of those on the page.


Best regards,
Matthias.

Reply via email to