Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Coldfusion 8 CFTREE Binding And Opening Documents....

Posted on 2009-05-19
4
Medium Priority
?
509 Views
Last Modified: 2013-12-16
Hi,
Got a quick and hopefully easy to answer question. I've put together a very nice dynamic feature using the CFTREE in CF 8, which is bound to a cfc that takes a 3rd variable as the starting point or path. It works like a charm allowing the user to navigate various directories and sub-folders to view the files contained within each. The task I'm trying to solve now is how to allow the user to click on the document they find with this feaure and get it to open up. Since the CFTREE when used with binding only allows the attribute "bind" I can't see how to trigger an event to open the file up. I can place a test button within the CFFORM and view the path value using ColdFusion.getElementValue, but that is not very user friendly. Any direction or suggestions?

Cheers,
Ty
0
Comment
Question by:MedtronicVascSR
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
stmatth earned 375 total points
ID: 24430640
I'm not I completely understand what it is you're trying to do...but you can place <a href statements within the display parameter for each tree item.  If you can post some of your code, I might be able to get more specific.
0
 

Author Comment

by:MedtronicVascSR
ID: 24433175
Actually, if you use the "bind" attribute in the CFTREEITEM then all other attributes, including HREF, are not allowed. "A tree is dynamic when the first cftreeitem tag of the tree has a bind attribute associated with it. The tag does not allow the attribute(s) VALUE,EXPAND,IMG,IMGOPEN,HREF,TARGET,QUERYASROOT,QUERY,DISPLAY,PARENT. The only required attribute is bind. "

I think the way this needs to be done is somehow passing back from the cfc file the HREF tag with info, but I'm not sure if this can be done or is the correct way. I haven't had any luck with it.

Cheers,
Ty
<cfform id="myForm_#MyFolderNumber#">
   <cftree name="dirtree_#MyFolderNumber#" height="400" width="200"  format="html">
	<cftreeitem bind="cfc:MyFolder_TAB.MyFolder.getDirEntries({cftreeitempath}, {cftreeitemvalue}, '#varDirPath1##Replace(Path, '+', ' ', 'All')#')">
    </cftree>
</cfform>

Open in new window

0
 

Author Closing Comment

by:MedtronicVascSR
ID: 31583267
Thanks, I figured it out. I placed the HREF attribute in the CFC and passed it back to the tree item when it is a document. Thanks for the direction on this.

Cheers,
Ty
0
 
LVL 1

Expert Comment

by:stmatth
ID: 24433302
No probs.  You can actually get quite creative with the display parameter of each tree item... essentially treat it like the row of a table.  If you enclose your display code with <td></td> it will behave as a table cell would.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question