Rendering a view with AJAX with CFLAYOUT

I know how I would do this outside ColdBox but I am trying to get my
head around how this would work with the framework.

How do I render a new view inside the main container when a user click
on a menu item in the left panel. The example below shows what I am
trying to do.

I have played with ajax and CB before and I have forms that post using
the CB proxy that then gets an eventand returns a query, but I just
cannot picture in my mind this for a layout.

does anyone have an example, I think if I saw this is action it would
click.

Thanks in advanced.

Glyn

layout.cfc

<cflayout name="outerlayout" type="vbox">
    <cflayoutarea>
        <cflayout name="thelayout" type="border">
            <cflayoutarea title="menu test" position="left"
closable="true" collapsible="true" name="left">

          <ul>
          <li><a href="index.cfm">click me and i render a view in the main
area</a></li>
        </ul>

            </cflayoutarea>
            <cflayoutarea position="center">

               <cfoutput>#renderView()#</cfoutput>

            </cflayoutarea>
        </cflayout>
    </cflayoutarea>
</cflayout>

Glyn,

You need to use the ColdFusion.navigate() function. Something like this

<cflayout name="outerlayout" type="vbox">
    <cflayoutarea>
        <cflayout name="thelayout" type="border">
            <cflayoutarea title="menu test" position="left"
closable="true" collapsible="true" name="left">

          <ul>
          <li><a
href="javaScript:ColdFusion.navigate('#event.buildLink(general.index)#',
'center')">click me and i render a view in the main area</a></li>
        </ul>

            </cflayoutarea>
            <cflayoutarea position="center" name="center">

            </cflayoutarea>
        </cflayout>
    </cflayoutarea>
</cflayout>

Thanks,
Curt Gratz
Computer Know How

Hi Curt,

but would do this via the coldboxproxy to remotely call the view ?

You could and have it return the HTML, but it isn't needed. You will need to have the view return without a layout or with an ajax only type layout so you don't get your default layout.

Curt

Thanks