Skip to Content
avatar image
Former Member

How to populate Navigation List

Hi

I need to populate a navigation list with values obtained from an RFC.

Can I do this in the same way as populating DDBK?

The DDBK is linked to a Context Value Attribute, but the Navigation List is linked to a Context Node. The context value attribute linked to the DDBK is "addBusUnit". The context node linked to the Navigation List is "TeamList" with value attribute "Member". How would I change the following code(from the DDBK) so that it will work with the Navigation List?

IWDAttributeInfo attinfoBus = wdContext.getNodeInfo().getAttribute("addBusUnit");

ISimpleTypeModifiable modinfoBus = attinfoBus.getModifiableSimpleType();

IModifiableSimpleValueSet valueSet = modinfoBus.getSVServices().getModifiableSimpleValueSet();

try

{

wdContext.currentZhr_360_Teamviewer_InputElement().modelObject().execute();

for (int i = 0; i < wdContext.nodeZteamviewers().size(); i++)

{

valueSet.put(wdContext.nodeZteamviewers().getZteamviewersElementAt(i).getZzpaycode(),

wdContext.nodeZteamviewers().getZteamviewersElementAt(i).getZzfullname());

}

}

catch (WDDynamicRFCExecuteException d)

{

manager.reportException(d.getMessage(), false);

}

thanks in advance

Anton

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 04, 2007 at 11:47 AM

    Used item List Box not Navigation List. Posted new thread for how to populate item list box

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 07, 2007 at 10:31 AM

    To populate a NavigationList, bind the "itemSource" property to a context node and bind the other "item*" attributes to attributes inside that node. The item source may be a recursive node.

    Say the item source node is named "NavItems" with attributes "FullName" and "PayCode". Then you may use code like

    try
    {
      wdContext.currentZhr_360_Teamviewer_InputElement().modelObject().execute();
      wdContext.nodeNavItems().invalidate();
      for (int i = 0; i < wdContext.nodeZteamviewers().size(); i++)
      {
        IZteamviewersElement e = wdContext.nodeZteamviewers().getZteamviewersElementAt(i);
        INavItemsElement navItem = wdContext.nodeNavItems().createNavItemsElement();
        wdContext.nodeNavItems().addElement(navItem);
        navItem.setPayCode(e.getZzpaycode());
        navItem.setFullName(e.getZzfullname());
      }
    }
    catch (WDDynamicRFCExecuteException d)
    {
      manager.reportException(d.getMessage(), false);
    }
    

    Bind NavigationList.itemText property to "FullName" to get the full name displayed as item text.

    Armin

    Add comment
    10|10000 characters needed characters exceeded