on 01-18-2013 3:45 PM
Hi,
I'm using the code from the following discussion about dynamic tab appearance: http://scn.sap.com/thread/1926672
This works fine, but now, I need to embed a view into my dynamically created tab. I think I need to insert a ViewUIElementContainer into the tab and then I can embed the view but I don't know how to do this? What is the right way?
Please help.
Thanks
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
You can use the code wizard within any method of your view to get a reference to the view's controller. For example...
DATA lo_api_myview TYPE REF TO if_wd_view_controller.
lo_api_myview = wd_this->wd_get_api( ).
Or if you are in method wddomodifyview, you can directly use the VIEW parameter which implements IF_WD_VIEW_CONTROLLER.
Cheers,
Amy
Hi Amy,
I know this method. The problem is, I'm in the WDDOMODIFYVIEW of the View V_MAIN. Here, I add a tab to the tabstrip. Now, I want to embed the View V_TAB into the tab. Firstly, I create a ViewUIElementContainer and set this as content of the tab. Then I need to pass the controller of the View V_TAB to the contructor of the ViewUIElementContainer, but I don't know how to get this controller because I'm currently in the View V_MAIN?
Hi Chris,
If you are trying to embed view V_TAB from view V_MAIN you may need to approach it differently. Take a look at the responses in discussion Embed a view dynamically in a ViewContainerUIElement.
Cheers,
Amy
The constructor of CL_WD_TAB takes two parameters, ID and VIEW. The VIEW param is type of IF_WD_VIEW. How can I get this param?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.