This project is read-only.
1
Vote

TopLevelNode NodeLabel wrong?

description

When gepsio reads the toplevelnodes it is reporting the last child node's Nodefact.id as its NodeLabel. I would think the Nodelabel would be soemthing to do with the presentation linkbase roleref.
I am loading a treeview in vb:
Private Sub DisplayFragmentStatistics(fragment As XbrlFragment)
    Dim pft As PresentableFactTree = fragment.GetPresentableFactTree
    For Each pftn As PresentableFactTreeNode In pft.TopLevelNodes
        Dim n As New TreeNode(pftn.NodeLabel)'<---this is the NodeLabel in question
        n.Tag = pftn.NodeFact
        If pftn.NodeFact IsNot Nothing Then
            n.Name = pftn.NodeFact.Name
        End If
        tv.Nodes.Add(n)
        loadNodes(n, pftn)
    Next
End Sub
Private Sub loadNodes(parentNode As TreeNode, pftn As PresentableFactTreeNode)
    Dim ID, Name As String
    For Each pftcn As PresentableFactTreeNode In pftn.ChildNodes
        If IsNothing(pftcn.NodeFact) Then
            ID = "{Null}"
            Name = ""
        Else
            ID = pftcn.NodeFact.Id
            Name = pftcn.NodeFact.Name
        End If
        Dim n As New TreeNode(pftcn.NodeLabel & "(" & ID & ")" & Name)
        If pftcn.NodeFact IsNot Nothing Then
            n.Name = pftcn.NodeFact.Name
        End If
        n.Tag = pftcn.NodeFact
        parentNode.Nodes.Add(n)
        loadNodes(n, pftcn)
    Next
End Sub

comments