cancel
Showing results for 
Search instead for 
Did you mean: 

Drop down by key binding to model value node

former_member190457
Contributor
0 Kudos

Hi everybody

I need to display a drop down by key populated by R/3 data.

for this purpose I have a model correctly working in my component.

The view context is bound to the component controller context and so on... everything is ok on this side.

The model value node is structured like this:

context root->z_getflights->z_getflights_input->output->flights (this is still a node)

below this node there are two attributes: obj_id, description

I believed that I should simply bind the selected key property of the drop down to node flights, but I am evidently wrong, as it is grayed out in the binding editor.

Every example binds this property to a non-model value node, what is the right procedure for my scenario?

I am switching to WDP java from Visual Composer so maybe I am misusing some components, suggestions as to how achieve a similar behaviour in an easier way (i.e. with differents UI elements) are welcome as well.

thanks

points will be awarded

Vincenzo

Accepted Solutions (1)

Accepted Solutions (1)

former_member190457
Contributor
0 Kudos

Hi,

thanks indeed for the quick answers. I understand your suggestion but I in a later step I need to pass the value selected by the user back to a RFC, which will only accept the objid, and not the description.

Can I do this also with drop down by index? Would this require much conding?

I would like to use context binding and auto code generation as much as possible

Thanks

Vincenzo

Former Member
0 Kudos

Hi,

yes, it is possible.

use following code,

if(wdContext.node<RFC>.getleadselection()>-1){

wdContext.node<RFC>.getT_<RFC>ElementAt(wdContext.nodeT_<RFC>().getLeadSelection()).getDes());

Thanks,

ramesh

Edited by: ramesh v on May 30, 2008 12:34 PM

Former Member
0 Kudos

Hi,

Can I do this also with drop down by index? Would this require much conding?

Yes, No,

Once you select an element from the drop down use the currentElement of the node to get the other attribute

Regards

Ayyapparaj

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Use "Drop down by index" instead of "Drop down by key".

Bind the text property of this ui element with

context root->z_getflights->z_getflights_input->output->flights->description.

Best wishes

Idhaya R

Former Member
0 Kudos

Hi,

use Drop down by index as you have a node and values are available under that.

Regards

Ayyapparaj