cancel
Showing results for 
Search instead for 
Did you mean: 

How to populate Navigation List

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

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