Displaying a Domino view in the dojo dijit.tree

Just before I will stamp some time in displaying a categorzied Domino View in a dojo dijit.tree I am wondering if anyone has done this before and is willing to share the code? Google brought me do far no fortune (allthough I was near).

For now I have managed to display a flat view in the dijit.tree, for generating the proper JSON I use an agent that collects the data in a View. Calling directly a view via the ?ReadViewEntries&OutputFormat=JSON delivers an overload of information.

As source I woud like to use a View with documents in a response hierarchy like I described before here.

Advertisements

3 thoughts on “Displaying a Domino view in the dojo dijit.tree

  1. jake 2009-August-18 / 11:48 pm

    My personal preference is to leave the server-side code as pristine as possible. I’d call a Domino datasource using the &output=json QueryString modifier, stash the data locally in a browser variable AND THEN parse it to extract the tree object to use in the store. As you say, the Domino JSON is quite verbose and difficult if not impossible to use in raw form with many/most JS toolkits such as Dojo. I had a similar problem when wiring a jQuery autocomplete field to a Domino view and discuss it here: http://www.critical-masses.com/jakeofalltrades/quick-n-easy-ajax-domino-name-lookup

    I’ve also responded to you comment on my blog…

  2. bruce lill 2009-September-4 / 9:25 pm

    I would suggest using an lotuscript agent to return the json in the format you need. It’s easier then trying to manipulate the data in javascript (you only get what you need). SIncve you can pass parameters to the agent, you can use it to pass a view name and have the agent go through the view and return the fields you need in json format. For simple trees you can use a page to format the json.
    I’ve used both the page and agent methods to fill the tree

  3. Patrick Kwinten 2009-September-6 / 9:43 am

    Well I have got that agent now (will write a post about it) but yes, just getting the raw view data in JSON format and ‘strip’ it in a JS function sounds more like ‘best practice’ to me rather than calling an agent.

    I could not found such a JS function via google though…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s