Thanks Raymond. I tried ColdFusion.navigate and the binding and got
them both working. I'm going with navigate because I can specify a
different url for each node.
BTW, if anyone is having trouble getting the cflayout panels to
automatically resize when the user resizes the browser window, try
putting this in the <head>:
<style type="text/css">
html, body {
margin:0;
padding:0;
border:0 none;
overflow:hidden;
height:100%;
}
</style>
It worked for me. There's an entry somewhere on the extjs forum about it.
--Greg
On 7/31/07, Raymond Camden <[EMAIL PROTECTED]> wrote:
> FYI:
>
> You can use javaScript: format in your tree. So thats one easy
> solution. Another easy solution is to use bindings. Consider this:
>
> <cfform name="form">
>
> <cftree format="html" name="mytree">
> <cftreeitem display="Navigation" value="root">
> <cftreeitem display="Page A" parent="root" value="a">
> <cftreeitem display="Page B" parent="root" value="b">
>
> </cftree>
> </cfform>
>
> <cfdiv bind="url:content.cfm?value={mytree.node}" />
>
> Thanks to Todd Sharp for digging up the bind syntax (couldn't figure
> out the ".node" part).
>
> On 7/31/07, Raymond Camden <[EMAIL PROTECTED]> wrote:
> > In general, the way you change the location of a UI item (layout, div,
> > pod, window), is with ColdFUsion.navigate. This is a JavaScript
> > function, not a CF function. The syntax is:
> >
> > ColdFusion.navigate(theurtl,theitem)
> >
> > So if you had used name="main" for your center layout, you could do
> >
> > ColdFusion.navigate("someurl.cfm", "main");
> >
> > You would need to do this when the user clicks on the treeitem. In
> > theory, you can use javaScript:x as your href for tree item, but I
> > haven't tried that. I'll try to whip up a demo on my blog later today.
> >
> > On 7/30/07, Steve Sequenzia <[EMAIL PROTECTED]> wrote:
> > > Here is a little code I am working on:
> > >
> > > <cflayout type="border">
> > >
> > > <cflayoutarea name="top" position="top" size="50"> </cflayoutarea>
> > >
> > > <cflayoutarea name="left" position="left" title="Menu" collapsible="true"
> > > splitter="true" size="200">
> > >
> > > <cflayout type="vbox">
> > >
> > > <cfform name="left_menu">
> > >
> > > <cftree name="left_menu" vscroll="no" hscroll="no" border="no">
> > >
> > > <cftreeitem display="Link 1" value="1" parent="left_menu"
> > > expand="no">
> > > <cftreeitem display="Link 2" value="2" parent="left_menu"
> > > expand="no">
> > > <cftreeitem display="Link 3" value="3" parent="left_menu"
> > > expand="no">
> > >
> > >
> > > </cftree>
> > >
> > > </cfform>
> > >
> > > </cflayout>
> > >
> > > </cflayoutarea>
> > >
> > > <cflayoutarea name="main" position="center" source="main.cfm">
> > >
> > >
> > > </cflayoutarea>
> > >
> > > </cflayout>
> > >
> > > What I am trying to do is to have the links in the cftreeitems (link 1,
> > > link 2, link 3) change the contents of the cflayoutarea "main". I am not
> > > sure if using source is the best way to do it.
> > >
> > > So when link 1 is clicked the "main" cflayoutarea is changed to
> > > "link1.cfm" and so on. I would like to have the update happen via ajax so
> > > the page does not need to be reloaded.
> > >
> > > Any help on this would be great.
> > >
> > > Thanks
> > >
> > >
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285090
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4