Sorry, I should have been more explicit, like the following:

    if ( $m->request_args()->{'is_ajax'} )
    {
        $m->clear_buffer();    # throw away output to this point
        _your_code();             # output your content
        $m->abort();                # finish the request and return
    }
    else
    {
        _your_code();            # output your content with wrapping
    }

Since often you will be using the same code regardless of an ajax call or
a vanilla web request, I find this more compact that to replicate code
into separate components.

Also you might not want everything lower in the hierarchy to be effected
if you use an autohandler.

Alfie

> Hi Alfie,
>
>
>
>
> ________________________________
>
>       From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Alfie
> John
>       Sent: Wednesday, December 13, 2006 10:17 AM
>       To: Marc Logghe
>       Cc: mason-users@lists.sourceforge.net
>       Subject: Re: [Mason] Switch off inherit flag at runtime
>
>
>       Hi Marc,
>
>
>       Have you tried:
>
>
>           $m->clear_buffer();
>           _your_code();
>           $m->abort();
>
>       That is what I meant with 'flushing the buffer'. However, I did
> not do an abort. Won't that flush *all* content, including the content
> generated in that particular component ?
>       thanks,
>       Marc
>
>
>


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to