on 04-04-2007 11:50 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Used item List Box not Navigation List. Posted new thread for how to populate item list box
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.