cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic component interface context mapping

Former Member
0 Kudos

Hi all,

I got 2 component A and B. Component A use component B.

I would like to know how to set interface context attribute value of comonent B within a view of component A in programatic mode.

It should be something like this:


wdThis.wdGetCompBInterface().wdGetContext.setAttr1("OK");

is it possible???

thank u in advance,

Stefano

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

In your query consider B has BA Context which you want to fill from main componetn A

Yes it is possible to add values from A to B but I did it only through context mapping instead of direct refrence of interface controller .

For that you need to do context mapping .

1) Add B into A as used Web dynpro component .

2) Add controller refrence in Component controller using properties of WDC.

3) Map the context element from Interface controller to Component controller

Set values of context of component controller which will set values for context

of A

4) Only issue here is if you want to refresh values frequently you might need to create and destroy component each time . Not sure about it . In my case I m intitalising all context of B in init of A itself.

Regards

Srushti

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

I've checked your link but it's not exactly what I need...

In the link to the help.sap.com the data transfer between component is made using external context mapping, what I need is to make that binding dynamically.

is there a way to do that?

Stefano

Dheerendra
Participant
0 Kudos

Hi,

Just go through the following links...

https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/f3b0ad90-0201-0010-4995-9bdb1849eb34

Thanks

Dheerendra Shukla

Former Member
0 Kudos