Skip to main content

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.

Jump to: navigation, search

Orion/How Tos/Client How Tos

< Orion‎ | How Tos
Revision as of 16:17, 11 January 2011 by Unnamed Poltroon (Talk) (Rendering file tree table)

Rendering file tree table

Steps to render a file tree table inside a given div in a html

Orion-TableTree.png

  1. Define the table DIV with id in the html
  2. In the html loading js file , create the Service Registry
    • Source code : registry = new eclipse.Registry();
  3. Register the file Service in the registry
    • Source code : registry.registerLocalService("IFileService", "FileService", new eclipse.FileService());
  4. 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)
  5. 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)
  6. Create an instance of Table Tree
  7. 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.

Back to the top