on 09-06-2012 11:12 AM
Hi,
I have a few ui elements in my view.Suppose, there is one label and an input field is there.And,dynamically i want to create an image element just after this input field.How can i do that?
Hi Iavanya,
See if this SAP help document on Dynamic Layout Manipulation is helpful to you. There is also an example web dynpro component, WDR_TEST_DYNAMIC.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is not helping me do what i want.
lr_container ?= wd_this->lv_view->get_element( 'ROOTUIELEMENTCONTAINER' ).
CALL METHOD cl_wd_image=>new_image
EXPORTING
* ADJUST_IMAGE_SIZE =
* BIND_ADJUST_IMAGE_SIZE =
* BIND_BORDER =
* BIND_ENABLED =
* BIND_HEIGHT =
* BIND_IS_DECORATIVE =
* bind_source =
* bind_tooltip =
* BIND_VISIBLE =
* BIND_WIDTH =
* BORDER =
* ENABLED = ABAP_TRUE
* HEIGHT =
* ID =
* IS_DECORATIVE =
SOURCE = 'WEBICON_LED_INACTIVE'
tooltip = lv_inputs
* VIEW =
* VISIBLE = E_VISIBLE-VISIBLE
* WIDTH =
RECEIVING
control = lr_image
.
* FOCUS_BY_CONTEXT_ELEMENT
lr_matrix = cl_wd_matrix_data=>new_matrix_data( lr_image ).
lr_image->set_layout_data( lr_matrix ).
* CALL METHOD lr_container->add_child
* EXPORTING
** index = 10
* the_child = lr_image.
If i use this,the image will get added in the rootcontainer after all the existing ui elements.What i want is ,this image need to be added after an already statically created input field with name 'NAME1'.
How can i achieve that?
First take the reference of input field container.
then create image object with required properties then add to corresponding layout( input field layout)
Regards
Srinivas
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.