[ 
https://issues.apache.org/jira/browse/WICKET-2991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Vaynberg resolved WICKET-2991.
-----------------------------------

    Resolution: Won't Fix
      Assignee: Igor Vaynberg

in the future we will make fallbacklink receive Optional<AjaxRequestTarget> 
which will resolve the confusion.

also i have come across a couple of usecases where behaviors need to check if 
they are running inside ajax or not and emit different javascript based on 
that. if we provide a fake ajaxrequetatarget that is available via 
ajaxrequesttarget.get() it will make it impossible to do the above.

> 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
>            Assignee: Igor Vaynberg
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to