XPages development practices: developing a common Tree View Custom Controls

In an earlier article I wrote about displaying information from a Notes View in a Dojo tree dijit.

A scan via Google what others have been doing on this matter did not result in so much valuable information untill I found an article on IBM developerWorks … in chinese.

If you translate the page via Yahoo! Babel Fish you get some really odd result. However, if you translate the page via Google Translate you get a really good translation in a format that I can understand.

I wonder if IBM has ever released this article in English? I hope they do not find it a trouble if I make it available in a PDF format: developing a common Tree View Custom Controls

Unfortunately I haven’t had the time to test the article in a demo database, but if you have, please let me know…

3 thoughts on “XPages development practices: developing a common Tree View Custom Controls

  1. Rishi 2009-December-11 / 10:45 am

    Hi Patrick,

    Here is the code you have asked,

    Option Public
    Sub Initialize
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim view As NotesView
    Dim webdoc As NotesDocument
    Dim doc As NotesDocument
    Dim entrycoll As NotesViewEntryCollection
    Dim entry As NotesViewEntry

    Dim arrName() As String
    Dim arrValue() As Integer
    Dim arrColor(6) As String
    Dim i As Integer
    Dim j As Integer


    Set db= session.CurrentDatabase
    Set view= db.GetView(“$ProgrammingCommunity”)
    Set webdoc = session.DocumentContext

    Set entrycoll = view.AllEntries

    If entrycoll.Count > 0 Then

    Set entry = entrycoll.GetFirstEntry

    While Not entry Is Nothing

    Set doc = entry.Document

    Redim Preserve arrName(i)
    arrName(i) = doc.GetItemValue(“programName”)(0)
    i = i+1

    Redim Preserve arrValue(j)
    arrValue(j) = doc.GetItemValue(“Percentage”)(0)
    j = j+1

    Set entry = entrycoll.GetNextEntry(entry)

    Dim head As Variant
    Dim graph As Variant

    head= {}

    head = head+ { }


    For i = 0 To Ubound(arrName)
    graph =graph+{}


    head= head+{}

    Print head
    End If

    End Sub

  2. Rishi 2009-December-11 / 10:47 am

    Opps, HTML is gone .. drop me an e-mail to rishi.sahi@gmail.com , I will pass you the code or database as you want.

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 )

Connecting to %s