on 07-08-2010 11:26 AM
Hello,
I have to create a Toolbar Popin Dynamicly at runtime. The toolbar is created dynamicly,too. I tryed the following coding, but it dosent work.
Code in Method of Assistence class
CALL METHOD cl_wd_popin=>new_popin(
EXPORTING
VISIBLE = 'X'
RECEIVING
control = lo_popin ).
CALL METHOD cl_wd_transparent_container=>new_transparent_container( RECEIVING control = lo_container ).
* Implementation of filling container with Buttons
*...
* set content
CALL METHOD lo_popin->set_content
EXPORTING
the_content = lo_container .
code in Methode WDDOMODIFYVIEW
IF wd_this->go_find_toolbar IS INITIAL.
* create new Find Area if initial
" create new Find Area
CALL METHOD wd_assist->create_find_area
EXPORTING
iv_view = view
IMPORTING
eo_find_toolbar = wd_this->go_find_toolbar.
" get element routuielementcontainer
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
" Create Layout Data Object
lr_flow_data = cl_wd_flow_data=>new_flow_data( element = wd_this->go_find_toolbar ).
" add Object to ROUTUIELEMENTCONTAINER
lr_container->add_child( wd_this->go_find_toolbar ).
Testing this causes a runtimeerror.
But after debugging I recognized, that the Object is created.
Best Regards,
Janett
I'm a little confused. You are adding a popup, but it appears to be added under the root. The Popin is something that should be placed within a table. Perhaps I don't understand what you are trying to design.
In general, do you really need to do this dynamically? Why can't you design it in the view editor and simply control the visibility of the area and toolbar items via bindings?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.