cancel
Showing results for 
Search instead for 
Did you mean: 

strange problem with Drop Down by Index

Former Member
0 Kudos

Hi

I have a very strange problem with Drop Down by Index I am executing a web service and get one internal table from it one field from it i have bind to Drop Down and I get one blank record in drop down which is not returned by the web service and not present in the attribute to which i bound the combo i am not getting how it is comming and how to remove it so can anyone tell me about this

Thanks

Ninad

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hai ninad,

You bind webservices node to dropdownindex. the node may be with cradinality 0..n , changen it to 1..n , it may solve your problem.

regards,

Former Member
0 Kudos

Hi Ninad,

That null value is added by default. because the selection cardinality of the node which is bound with that dropdown 0..n. change the selection property to 1..n

regards

Karthik

Former Member
0 Kudos

Hi

Check the Cardinality of the node to 1..n

Kind Regards

Mukesh

Former Member
0 Kudos

Hi Mukesh

Cardinality is 0..n I tried to change it 1..n but that property is not editable how can we change it. If it is to be changed.

Thanks

Ninad

Former Member
0 Kudos

Hi

I think you directly bind the webservice node to the drop down.

Create a local node and bind the webservice node value to it.

Kind Regards

Mukesh

Former Member
0 Kudos

Hi,

Change in The Component Controller if your bind the Webservice to the value Node

Regards

Saravanan K

Former Member
0 Kudos

Hi,

Go through these threads:

1.

2.

Regards,

Satyajit.

Former Member
0 Kudos

Hi,

where do you define the value node(in component controller's context or in the view context)?.

if it is defined in component controller's context. then change the selection property of the node there.

Former Member
0 Kudos

Hi Mukesh

sorry but i am not getting how to bind two nodes of the same context to each other.

This is what you are saying or i misunderstood some thing.

Ninad

Former Member
0 Kudos

Hi

If you create the node in custom controller or in component controller you can change the cardinality in custom controller or in component controller.

Other wise create a local node and bind the value as shown

IPrivate<ViewName>.I<DropName>Node node = wdContext.node<DropName>();

int len=wdContext.node<Webservice>().size();

for(int l=0;l<len;l++) {

String value=String.valueOf(((IPrivate<viewname>.I<Webservice>Element)(wdContext.node<Webservice>().getElementAt(l))).get<Parametervalue>());

IPrivate<ViewName>.I<DropName>Element element = wdContext.create<DropName>Element();

element.set<Param>(value);

node.addElement(element);

}

Kind Regards

Mukesh

Former Member
0 Kudos

Ninad,

Seems that you have original model node in component controller, and mapped node in view controller.

If so, change cardinality of node in component controller (cardinality of "source" node).

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

konchada_saikrishna
Active Participant
0 Kudos

Hi Valery,

I am new to webdynpro, I designed a view at design time with some drop down by key. Now at run time it displays an error as

java.lang.ClassCastException at com.sap.tc.webdynpro.progmodel.context.Paths.getAttributeInfoFor(Paths.java:202)

when I remove this drop down there is no error.

Actually I want to bind this drop down with a bapi table with 2 fields (key,value), how can I do that.

Thanks & Regards,

Sai Krishna.