Simple SF Tree for VF Page

Friday, March 25, 2011 by Aslam - The Alexendra
Hi All,
Many times people need one solution for using Tree structure on thier VF page. There are many solution using JS/JQuery. Here i used jquery treeview plugin and created one apex component which can be used directly in you VF page. You simply need to use following syntax to embed this tree in your VF page:

<c:sftree />





Here is a working demo for this SF Tree.
http://labsprojects-developer-edition.ap1.force.com/sftreedemo

The component provides two JS method on click of parent and child node and send id of the node. You can define those methods in our VF page and do process whatever you need.


Mail me if you face any issue. Hope its helpful for some people.

Thanks
Aslam Bari

32 comments:

Amit Goyal {SalesForce Share} said...

hello sir,

dear again a very useful component u have given to us, i was searching for this but had no idea.
thanks a lot.
i am wondering how you manage all this.
waiting for next surprising application.

again thanks a lot.

Kirtesh said...

Aslam,

Its very helpful..nice blog ..

Kirtesh

Abdul Vahid said...

Good Tool :)

Jeff Douglas said...

Aslam... very, very, very cool!!!

Joel Dietz said...

Awesome!

Reena said...

Hey Aslam , Again a cool stuff... Thanks

Don Robins said...

Aslam, have you ever successfully implemented any drag and drop between two different tree views in a Visualforce page?

Aslam - The Alexendra said...

@Don: I dont think this might be any difficult. There are many plugins available who might do that. Its just a matter of finding right plugin, do little customization and use. I never did that before but i am sure i can do that :)

Chamil Madusanka said...

Is there any new version with Add/Edit Node item at the Tree?

RoCkStAr said...

Can i use this component in my instance?

Anonymous said...

Its awesome! I want to use this for one of my requirements. But I don't find a link to download the code :(

Anonymous said...

thank you very much MAN!!

Anonymous said...

I need source code! Who can give me? Thank in advance

Maggie said...

Awesome work.Kindly please share the source code for this.

Salesforce Geek said...

Good job! Let me know if it is possible to generate a tree with salesforce users similar to the role hierarchy?

Anonymous said...

dats great could you please share the source code for this............

Pagrawa said...

Hi Aslam,

Can you provide me the source code

Aslam - The Alexendra said...

Here is the source code:

http://www.aslambari.com/downloads/sftreedemo.zip

Manisha Gupta said...

It reminded me the time when i was taking training from you and you asked me to implement something like this. :)
Very nice work.. I loved it :)

Anonymous said...

Hey, your post looks good, but at the same time can I get a sample code for this demo

Anonymous said...

hey, from where did you use the jquery and style sheets from..can you be sharing them as well

Anonymous said...

How do i use it ? I've scrolled form top to bottom a couple of time, but cant see any documentation around it.

Anonymous said...

HI, that's a great idea!
could you please post again the code? The file is not more available at this link: http://www.aslambari.com/downloads/sftreedemo.zip

tks

Anonymous said...

This is great. I really need the source code. Mentioned link is not working. Thanks

Anonymous said...

Hi Aslam,

Could you please give us the code for this. The link you have provided is not working.

Anonymous said...

Hi Alexendra,

Your solution work perfect but it' just showing a static tree, please provide me a solution convert this tree to a dynamic tree means I can add more child node and save into database.

How can I do that?

I look forward to hearing from you soon.

Best Regards

Anonymous said...

Aslam - Please share the code of this demo'ed functionality. That would be really helpful.

Venkatesh Babu said...

Hi ,
Can someone help to get the source code or sample code .It would be really helpful.

Thanks a lot!!
BR
Venkat.

Anonymous said...

Hello,

Dear Aslam can you give the source code please or someone else ?

Thanks !

PS: my mail (felix.fouillen@accenture.com)

Unknown said...

Can someone help to get the source code or sample code?
Really awesome!

Denisa Cretu said...

Great info. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have.
www.juegoskizi20.com , www.juegosfrival.com , www.friv30game.com

Varun Gupta said...

Can you please provide the source code for the above functionality?

Post a Comment