Ajax Fallback LInk should pass a NullAjaxRequestTarget when javascript not 
supported
------------------------------------------------------------------------------------

                 Key: WICKET-2991
                 URL: https://issues.apache.org/jira/browse/WICKET-2991
             Project: Wicket
          Issue Type: Improvement
            Reporter: Don Ferguson


When javascript is not supported, AjaxFallbackLink calls onClick(target) with 
target = null.  I propose that instead it should pass a NullAjaxRequestTarget 
whose addComponent() method is a noop (since the whole page is going to be 
re-rendered anyway).

This will make it possible to call write the onClick() method without a null 
check, as in:

   @Override
   public void onClick(AjaxRequestTarget target) {
         target.addComponent(...);
   }

rather than always worrying about whether javascript is enabled by the browser, 
and wrapping a null check around the target,







-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to