cancel
Showing results for 
Search instead for 
Did you mean: 

TableView

Former Member
0 Kudos

Hi,

My situation is I have a Tableview where data for the columns is being populated by RFC1. Data in Column3 of this tableview needs to be in the form of a dropdown.

The values for the dropdown is supplied by RFC2. My dilema is I need to be able to have a dropdown using RFC2 and use the data of RFC1 to select the right value from the dropdown supplied by RFC2.

Is this possible in Webdynpro, any help would be appreciated.

~NAC

Accepted Solutions (0)

Answers (4)

Answers (4)

thomas_chadzelek
Participant
0 Kudos

Hello,

I would first ask myself what should be the result of this selection in the drop-down. Do you have key/text pairs provided by RFC2 and need to select one such key? Or does this RFC2 just give you a list of options and you need to know the index of the selected option? I guess selecting a key is more common.

Next question is whether Column3 is part of RFC1 or not. I.e. to you edit existing data via this dropdown or do you add new data. In the latter case, you need to add a context value attribute (in a non-singleton child node with just one element). Anyway, let's call the attribute you like to edit X.

Then, for selecting via key, use a DropDownByKey for Column3 and bind its selectedKey to the context attribute X.

To bring the options supplied by RFC2 into play, you need to modify the data type of X as follows:

ISimpleTypeModifiable type = wdContext.nodeY().getNodeInfo().getAttribute(IYElement.X);

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

valueSet.put("DE","Germany");

valueSet.put("FR","France");

valueSet.put("EN","England");

Best regards,

Thomas

guru_subramanianb
Active Contributor
0 Kudos

Hi,

One more work around is feasible.When you create your model you have the option of creating multiple model and bind it to your component controller.

Then create the corresponding view controllers to map this from the model which has the RFCs instances.

Then create a consolidated value node which has the references of both the model and bind it with the coreesponding component controller and to the view controller.

Regards,

Guru

Former Member
0 Kudos

Hi,

There are no documentations on this as this is a simple work around method :-). What I have done to achieve this functionality is to create a new node with all the attributes that I require (using WD types like string int etc..), then after calling the two RFC's write the code for populating the third node with the previous two nodes.

say we need to populate NodeC from NodeA and NodeB. (Let's assume NodeA's and NodeB's sizes are same). After calling the RFC's to populate nodeA and nodeB, write the code for populating nodeC. The code will look somewhat like this :


Iprivate<viewName>NodeC node = new wdContext.nodeNodeC();
Iprivate<viewName>NodeAElement elmtA = null;
Iprivate<viewName>NodeBElement elmtB = null;
Iprivate<viewName>NodeCElement elmtC = null;
for(int i=0;i<wdContext.nodeNodeA().size();i++)
{
elmtC = wdcontext.createNodeCElement();
elmtA = wdContext.nodeA().getNodeElementAat(i);
elmtB = wdContext.nodeB().getNodeElementBat(i);
C.set<attr1>(elmtA.get<attrA>());
C.set<attr2>(elmtB.get<attrB>());
node.addElement(elmtC);
}

Hope this helps,

Best Regards,

Nibu.

Message was edited by: Nibu Wilson

Message was edited by: Nibu Wilson

Former Member
0 Kudos

Hi,

As such, you cannot retrieve data from two different nodes into the table. The work around is to create another node with all the attributes that you want from the two different nodes and bind this node to the table.

Best Regards,

Nibu.

Former Member
0 Kudos

Hi,

When I create the new node, How do I get RFC1 column3 (value) to be selected in RFC2(dropdown).

Is there any article where 2 nodes are combined to form a single node.

~NAC