Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Orion/How Tos/Client How Tos
- How to render file tree table inside an html DIV
- How to render a file selection from persisted preference
Rendering file tree table
Steps to render a file tree table inside a given div in a html
- Define the table DIV with id in the html
- In the html loading js file , create the Service Registry
- Source code : registry = new eclipse.Registry();
- Register the file Service in the registry
- Source code : registry.registerLocalService("IFileService", "FileService", new eclipse.FileService());
- Create an instance of the model class to provide the tree model , the model has to implement : (refer to Table Tree)
- getRoot(onItem).
- getChildren(parentItem, onComplete) . It uses the FileService.getChildren to provide childen items.
- getId(item)
- Create an instance of the renderer class to render table rows (refer to Table Tree)
- Implement check box rendering
- Implement table-row based actions
- Implement folder toggles by calling Table Tree's other API(TODO: Define other APIs)
- Create an instance of Table Tree
- In the onLoad of the html , use a wrapper class instance to wrap the Table Tree and initialize the table.
Rendering file selection
Describes how to render a file selection from persisted preference.