How to Get Tree View Structure Using Visualforce Page

Here, I mentioned the sample tree structure for a user with a profile using jquery. This is very helpful for the learner in Fieldax&Field Service Management Salesforce.

Visualforce code :-

<apex:page sidebar=”false” controller=”TestTreeView”>





<script src=”//”></script>

<link rel=”stylesheet” href=”//” />

<script src=”//”></script>

<div id=”container”>



<apex:repeat value=”{!result}” var=”aa”>










$(function() {







Apex Code :-

public class TestTreeView{

public Map<String,Profile> mlis=new Map<String,Profile>();

Public Map<String,String> result{get;set;}

public Map<String,User> mlis1=new Map<String,User>();


public TestTreeView(){

result=new Map<String,String>();

for(Profile p:[select name from Profile]){



system.debug(‘cons list’+mlis);


for(User u:[select name, from user where in : mlis.keyset()]){

system.debug(‘cons list’+u);






We are the ISV Partners and Please reach us for custom development =>

————————— Feel Happy ———————-

You must be logged into post a comment.