Wicketeers,

I have a minor issue, rather than any bug, and thought I'd throw it out there.

We tend to use a lot of AjaxFallbackLinks, for obvious reasons. The biggest 
problem of AjaxFallbackLink is the line of code;

@Override
public final void onClick()
{
        onClick(null);
}

Because null can potentially be passed to the onClick(AjaxRequestTarget target) 
method, in every case we has to use code as;

If( target != null ) {
       target.add(...);
}

Ad infinitum. When we don't we are potentially letting in bugs each time and 99 
times out of 100 developers will forget, which means we have bugs that usually 
only trigger when a user does a "open in new window" click or if they've 
happened to turn of JavaScript - so while they are difficult for the user to 
trigger they are still there.

Is there any chance of un-finalising onClick(), or better yet, having it 
provide a Null Object (http://en.wikipedia.org/wiki/Null_Object_pattern) 
instead of null, in order to reduce developer effort and reduce hard to find 
bugs?

Obviously this is a minor, minor thing...

Cheers,
Col.
EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have received this email message in error, please 
advise the sender immediately by replying to this email and delete the message 
and any associated attachments. Any views, opinions, conclusions, advice or 
statements expressed in this email message are those of the individual sender 
and should not be relied upon as the considered view, opinion, conclusions, 
advice or statement of this company except where the sender expressly, and with 
authority, states them to be the considered view, opinion, conclusions, advice 
or statement of this company. Every care is taken but we recommend that you 
scan any attachments for viruses.

Reply via email to