cancel
Showing results for 
Search instead for 
Did you mean: 

how to fill DropdownByIndex

Former Member
0 Kudos

Hi all,

i used dropdown by index to show the list of user for a particular group.The data that should be displayd in dropdown will come from R/3. i am able to get data from R/3 and show in the dropdown.But the problem here is i want to show the message in the dropdown as :"Select The User".That is giving message to the user to select the value from dropdown.so the user will select one data by seeing the information

Can anyone plz help me out

Regards

Padma N

Accepted Solutions (0)

Answers (3)

Answers (3)

suresh_krishnamoorthy
Active Contributor
0 Kudos

Hi Padma,

Before populating the dropdown data from R/3 system. first add "Select The User" value and then add the R/3 data. Check this link for sample code:[Here|;

You can also search here more sample codes

Regards, Suresh KB

Former Member
0 Kudos

Hi ,

with the given code i am able to display data in dropdown.But the prolem here is i want to show "Select the Data"text message in the drop down

for(int j=0;j<size;j++)

{

IPrivate<view>.I<Dropdownnode>Element ele=wdContext.create<Dropdown>Element();

String val=wdContext.node<BapiOutputnode>.get<Output>ElementAt(j).get<Attribute>();

ele.set<Attribute>(val);

node.addElement(ele);

}

wdContext.node<BapiOutputnode>.bind(node);

can anyone plz help me out

Regards

Padma N

suresh_krishnamoorthy
Active Contributor
0 Kudos

Hi Padma,

Try like this before for loop add the "Select the Data" :

ele.set<Attribute>( "Select the Data" );

node.addElement(ele); -> proceed your for loop iteration code for adding backend data.

Regards, Suresh KB

Former Member
0 Kudos

Hi,

As Drop down by index is populated from a node

make the first element of the node populated with the value "Select The User"

use the following method to do the same

wdContext.node<Your Node>().addElement(0, element);

Element is the element which contains the value "Select The User"

Regards

Ayyapparaj

Former Member
0 Kudos

hai ,

you cannot display please select as you get the deatils from backend.

if you decide the data to be displayed in the drop down then thats possible.if you need ill give the coding for that.

regards

Sharanya.R

Former Member
0 Kudos

Hi

Can u plz send the code for that

Regards

Padma N

Former Member
0 Kudos

hai padma

public void wdDoInit()

{

//@@begin wdDoInit()

wdContext.currentContextElement().setName("12345");

IPrivateTestWdView.ITable1Node node1=wdContext.nodeTable1();

IPrivateTestWdView.ITable1Element ele1;

for(int i=0;i<4;i++)

{

ele1=wdContext.nodeTable1().createTable1Element();

node1.addElement(ele1);

}

IWDAttributeInfo attributeInfo_skillarea = wdContext.getNodeInfo().getChild("table1").getAttribute(IPrivateTestWdView.ITable1Element.COL3);

ISimpleTypeModifiable skillarea_Type = attributeInfo_skillarea.getModifiableSimpleType();

IModifiableSimpleValueSet valueSet_skillarea = skillarea_Type.getSVServices().getModifiableSimpleValueSet();

valueSet_skillarea.put("Select","Select");

valueSet_skillarea.put("ZOBJID","ZQKTEST");

IPrivateTestWdView.IDropdown1Node dnode=wdContext.nodeDropdown1();

IPrivateTestWdView.IDropdown1Element dele;

dele=wdContext.nodeDropdown1().createDropdown1Element();

dele.setAttr1("123");

dnode.addElement(dele);

dele=wdContext.nodeDropdown1().createDropdown1Element();

dele.setAttr1("456");

dnode.addElement(dele);

dele=wdContext.nodeDropdown1().createDropdown1Element();

dele.setAttr1("789");

dnode.addElement(dele);

//@@end

}

//@@begin javadoc:wdDoExit()

/** Hook method called to clean up controller. */

//@@end

public void wdDoExit()

{

//@@begin wdDoExit()

//@@end

}