FYI, currently I use it to call pure (no server side) javascript function (like
hide/show, diseable/enable drag'n drop,...).
ex :
add(new Link("stop_dnd") {
@Override
protected CharSequence getOnClickScript(CharSequence url) {
return dnd.getJSFunctionName4Stop() + "();";
}
@Override
protected CharSequence getURL() {
return "#";
}
@Override
public void onClick() {
throw new UnsupportedOperationException("NOT CALLABLE");
}
});
The name of the function to call is generated by the server when the page is
rendered.
/david
Martijn Dashorst wrote:
With the advent of behaviors, is Link's getOnClickScript method still
necessary or a relic of the past that should be deprecated and removed
in a future version?
Martijn