Skip to main content
Participant
December 22, 2008
Question

How CFTREE tag (FORMAT="HTML") is working?

  • December 22, 2008
  • 1 reply
  • 735 views
Hi,

Does anybody use CFTREE tag with the attribute format="html"?

It's very useful that I can bind the tree with the cfc. But how should I work with this tree after that?
How can I change a style? How can I add the checkboxes? How can I get the data from the selected node? e.t.c.

As I understand CFTREE uses the YAHOO widget for the tree building. I found the cftree documentation and yahoo.widget.treeview documentation, but I didn't find the documentation how to combine them. :(

I've tried to make a complex tree and I've got some issues:
- The examples from yahoo don't work because the coldfusion uses his own mechanism of building the dynamic tree (I am not sure where I can insert my code).
- My tree context menu is working in the IE only (doesn't work in Firefox).
- Also ColdFusion.Tree.refresh function is not working. :(

Is it possible to create a real working complex tree by using <cftree format="html">?
Could anybody give me the links to the documentation or examples, please?

Thanks in advance!
Andrey
    This topic has been closed for replies.

    1 reply

    December 22, 2008
    Hi, I'm not FULLY familiar with CFTREE myself so this may not be much help to you. But, I always prefer to do UI things like this myself using html lists etc.

    http://www.unibands.co.uk/index.cfm/home/sitemap/

    As far as I can see, it's the only way you'll get FULL control over how it works. If you decide you really want to use CFTREE but then end up hacking it to death, you have to ask yourself if it would have been easier to do it from scratch.

    If it's just a style issue, then you can use CSS to over-ride these by looking at the class names and ID names given to the tree generated by CF. You should be able to over-ride these just fine using style-sheets within your pages. You may sometimes need to use the !important rule in the CSS to make some things work.

    Good luck. Sorry I couldn't be more help, but I just find that a lot of these CF UI controls can be more trouble than they are worth sometimes (in the long-run that is). But then again, they are great for "out of the box" situations. But it sounds like you want to do a lot of customizing.

    Thanks.
    _ASH_Author
    Participant
    December 23, 2008
    Hi,
    Thanks for the answer!

    I also decided that that CFTREE is not suit for me. Yes, I over-rided the CSS styles and edit js files from the /CFIDE/scripts/ajax/package/ folder but I am not sure that it's correct and I didn't receive the result I need anyway.

    I just was interested if these things can work easy. Ok, I'll be use dhtml things.

    Thanks again!
    Andrey