cancel
Showing results for 
Search instead for 
Did you mean: 

Access view context

0 Kudos

Hi Gurus,

I've got a question regarding dynamic context binding.

How can I get a reference to a view context node from a method within component controller. I want to bind a table to it, but I don't to do context mapping manually (meaning to define context mapping between component context and view context), I want to do it dynamically.

Is it possible?

Kind regards,

Zakhar

Accepted Solutions (1)

Accepted Solutions (1)

shwetars
Advisor
Advisor
0 Kudos

Hello Zakhar,

Yes mapping is possible.

However u needto do this from within a method within the view controller, since the view controller context is local to the view and is not visible outside the view.

To the mapping dynamically you can use the method add_mapped_child_node of the interface if_wd_context_node_info. Once the mapping is done, the binding cn be done the usual way. Only constraint is this time the web dynpro wizard wouldn't help in getting the references, all the coding needs to be done manually.

You can also check out the method set_mapping_complete of the same interface.

Hope this info helps.

Regards,

Shweta

Answers (0)