A couple questions about this commit (inline):

On Fri, Dec 17, 2010 at 10:01 AM, <mgrigo...@apache.org> wrote:

> Author: mgrigorov
> Date: Fri Dec 17 16:01:41 2010
> New Revision: 1050433
>
> URL: http://svn.apache.org/viewvc?rev=1050433&view=rev
> Log:
> WICKET-3252 StalePageException on non-versioned Page in Ajax request does
> not render ajax-response
>
> If a hit to stale page is made and the current request is an Ajax one then
> always redirect to the new page. It doesn't make sense to return the new
> page's markup in Ajax response
>

<snip>


> +       private boolean isAjax(RequestCycle requestCycle)
> +       {
> +               boolean isAjax = false;
> +
> +               Request request = requestCycle.getRequest();
> +               if (request instanceof WebRequest)
> +               {
> +                       WebRequest webRequest = (WebRequest)request;
> +                       isAjax = webRequest.isAjax();
> +               }
> +
> +               return isAjax;
> +       }
>

Is this new method needed?  I haven't looked at exactly where this renderer
is getting called, but can't we say the following?
boolean isAjax = AjaxRequestTarget.get() != null;

That's what we're doing elsewhere in the code.

+       public String getWicketAjaxBaserUrlFromLastRequest() throws
> IOException,
> +               ResourceStreamNotFoundException, ParseException
>

Typo here - "Baser" should be "Base".

Great work on writing a new test case for your change!

-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*

Reply via email to