function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
d.popovd.popov 

How to create similar file list on Apex

- Root

  - Folder 1

    - File 1

    - File 2

  - Folder 2

  - ...

 

Information about the directory tree is stored in the database:

ID

Parent

Name

IsFolder 

Navatar_DbSupNavatar_DbSup

Hi,

 

initially the root tree task i had performed for account and contact relationship through apex:repeat control.
The same task you can performed for root directory of any file.Tryout this sample code it may help you.

<apex:repeat value="{!nodeList}" var="node">
                <li class="closed"><span class="folder" onclick="parentClickCall('{!node.id}');">{!node.name}</span> 
                                <ul>
                                                <apex:repeat value="{!node.children}" var="child">
                                                                <li><span class="file" onclick="childClickCall('{!child.id}');">{!child.name}</span></li>
                                                </apex:repeat>
                                </ul>
                </li>
</apex:repeat>

you can bind the variables with wrapper class functionality in apex code.

 

 

 

UVUV

Are you talking about tree view???If so,have a look-

http://www.forcetree.com/2011/04/tree-view-in-visualforce-page.html