All sorted - within jQuery I just added a new ajax transport for dataType
'click' that removed the X-Requested-With header and then added an
associated converter; all working perfectly now.

Thanks for getting me back on the right track.
Damian


On Thu, Aug 18, 2011 at 11:34 AM, Damian Penney <[email protected]> wrote:

> Thanks Bob - my use case is that the navbar loads all the pages via ajax
> loads; one of those pages has some additional ajax functionality.which was
> causing the issue.
>
> Thanks for the tip regards the X-Requested-With. I'll see what I can do
>
> Damian
>
> On Thu, Aug 18, 2011 at 11:26 AM, Bob Schellink <[email protected]> wrote:
>
>> Hi Damian,
>>
>> Reason is that Click processes things slightly different when it detects
>> an Ajax request on a page with AjaxBehaviors. Click tries to match the
>> incoming request to a registered Ajax target control and if it cannot find
>> it, does nothing.
>>
>> For backwards compatibility Click *will* render the page as is if no Ajax
>> target control is registered.
>>
>> Generally Click pages is not loaded through Ajax, so I'm not sure your use
>> case is catered for. You could try and remove the Ajax request header
>> "X-Requested-With", which is how click identifies Ajax requests. If you can
>> remove that header using jQuery, Click should render the page.
>>
>> Alternatively you could extend ClickServlet and change the behavior to fit
>> your needs. Probably have to look at the method: "processAjaxPageEvents".
>>
>> regards
>>
>> Bob
>>
>>
>> On 2011/08/18 15:43 PM, Damian Penney wrote:
>>
>>> So I have a page that is loaded via a jQuery $('#divid).load() method
>>> that loads just fine until I
>>> add an ajax behavior to an actionlink that is included on the page at
>>> which point it no longer
>>> renders. If I go the url directly /page/page.htm it renders correctly.
>>>
>>> When called via ajax the logs show
>>> [Click] [info ] handleRequest:  /groups/groups.htm - 31 ms
>>>
>>> While when called directly I see
>>> [Click] [info ] renderTemplate: /groups/groups.htm - 43 ms
>>> [Click] [info ] handleRequest:  /groups/groups.htm - 70 ms
>>>
>>> So it appears that renderTemplate isn't being called
>>>
>>> Any ideas as to what might be going on here?
>>>
>>> Thanks, Damian
>>>
>>
>>
>

Reply via email to