cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to expand drop down by index UI element

Former Member
0 Kudos

Hi,

I have got one Drop down by index in my webdynpro form and I want to bind this to backend data. For this purpose, I created one adaptive rfc model and also did all this model binding, context mapping etc.

Now my context in view looks like this :- GetDropDown_Mn (parent node) , this has got child Output_DropDown which again has two value attributes Name and Text.

This is component controller code where you bind and invalidate

__Shell__Ca_Read_Cr_Drbox_Val_Input dropdown = new __Shell__Ca_Read_Cr_Drbox_Val_Input();

wdContext.nodeGetDropDown_Mn().bind(dropdown);

wdContext.currentGetDropDown_MnElement().modelObject().execute();

wdContext.nodeOutput_DropDown().invalidate();

I then tried to bind my UI element in view with Name attribute , but when I try to run my application , the field appears as read only, kind of non editable (blocked) and I am unable to expand my dropdown.

The readonly property of UI element is false. I have hard coded one value like " Please select from drop down list " and I want the backend values to come below this. For this, I have written code to append the backend values with the hardcoded value. Now the problem is my dropdown is blocked and not able to expand ( unable to click the arrow button), and I cannot see the other values in dropdown except the hard coded value.

Can someone please help me on this.

The cardinality of context node is 1..n, selection = 0..1 and I have set Leadselection = -1.

Thanks and regards,

Sai

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi All,

Thanks a lot for your replies and suggestions. Issue solved.

Regards,

Sai

Former Member
0 Kudos

Hi,

Check the context mapping and the cardinility of the node. make the cardinility as 0..n or 1..n

regards,

Sahidur

Former Member
0 Kudos

Hi Sai,

You can use the below code to add the please select in ur drop down in wdInit() method

wdContext.nodeVn_Node().currentVn_NodeElement().setVa_Attribute("-Please Select-");

please use the name of node as u have created in the context.

and after that please check if yoy are getting values from RFC call or not.

if you are getting the values then try to change the selection property of that node to 1..n and comment the lead selection line that you have written.

hope this will help.

Regards

Narendra

Former Member
0 Kudos

Hi,

in Which action or method you calling the rfc ?

Regards,

ramesh

Former Member
0 Kudos

Hi,

This problem might be occuring if the RFC is not returning any value for this node. You may check whether any values are being fetched in the node or not by debugging or printing the values.

Regards,

Divyata

Former Member
0 Kudos

sorry

to on select property.

Regards,

satya.

Former Member
0 Kudos

Hi Satya,

Many thanks for your quick reply. I tried this as well, created one action Substitute and tried to bind this with onselect property od DDbyindex field. This is my code for onAction Substitute:-

selectedIndex = wdContext.nodeOutput_DropDown().getCurrentElement().index();

I have declared int selectedIndex = 0 .

But even after doing this, I am facing the same problem.

Thanks and regards,

Sai

Former Member
0 Kudos

Use the debugger to verify that the node contains any elements at runtime.

Armin

Former Member
0 Kudos

hi,

Please check if enable property of the ui element is true.

Regards,

Satya.

Former Member
0 Kudos

Try to check whether that contain any value or not by this Statement.

wdComponentAPI.getMessageManager().ReportSuccess(str);

Str is the value of value attribute or model attribute to which u bind the dropdown

It will print the value of that attribute.

Regards,

H.V.Swathi

Former Member
0 Kudos

hi,

bind some action to the selected Key property.

Regards,

Satya.

Former Member
0 Kudos

Wow.

Armin