cancel
Showing results for 
Search instead for 
Did you mean: 

Populating dropdown box with Supply function

Former Member
0 Kudos

Hi All,

I have a table with a column having dropdown list in it...I am getting the no. of rows for table through an RFC..I am also getting the no. of items for populating dropdown list from another RFC..I need to have same values in all dropdown list I have..I am using SUPPLY function to fill dropdown list.But this function is built in component controller by default..But in my case, I can get the no. of rows for table from the view only.

So, can anyone tell how can I call the SUPPLY function in component controller from my view...

Regards,

Sayan Ghosh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

Context map the Bapinode between view and component controller.....then do the following steps

For eg.create node for dropdown in view structure is like this,

node(Value)----->View controller

|

|____attribute

Bind this attribute to dropdownbox then use following coding....

WdDoInit()

{

int size=wdContext.nodebapiNode().size();

List list1=new ArrayList();

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

{

IPrivateView.IValuenodeelement ele =wdcontext.nodevalue.createvalueelement();

ele.setattribute(wdcontext.nodevalue.getelementAt(i).getAttributeasText("element name"));

list1.add(ele);

}

wdContext.nodevalue.bind(list1);

}

Regards,

Suresh.T

Answers (3)

Answers (3)

former_member751941
Active Contributor
0 Kudos

Hi sayan,

Check this threads.

Regards,

Mithu

Former Member
0 Kudos

Hello Sayan,

Why you are calling supply function from the view,it's not required.

Follow this.

You filled node in the componentcontoller using SupplyFunction right!!!

You want use those node values in the view For that one.

Stpes

1)Copy the node from ComponentContoller to view contoller context node. (Select node in CC copy open the context of view contoller and Paste)

2)In the view Contoller Click properties tab add ComponentContoller to View

3)You'll able to see same node in View Contoller , Select node in view Contoller right click EditContextMapping It popsup window click on Next button Map with Componentcontoller Node and attributes by checking Cheboxes.

Rgds

-SS

Former Member
0 Kudos

Hi,

What do you mean by calling SUPPLY function in the componentController ?

You have a method in the componentController and you want to call that from your view ??

If so ..add use wdThis.wdget<ComponentController>>().MethodName();

Regards,Anilkumar