on 03-04-2008 7:01 AM
Hi Experts,
How to add images using dynamic programming which are in the MIME folder in my Webdynpro Component.
hi vikranth,
when creating an image object u will have exporting property
imagesource directly give the name of the mime object like 'xyz.jpg'.
Regards,
janakiram.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi vikranth,
use follwing code
data: lo_image type ref to cl_wd_image,
lo_container type ref to cl_wd_uielement_container.
lo_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lo_image = cl_wd_image=>new_image( image_source = 'ICON_CREATE' ).
cl_wd_flow_data=>new_flow_data( element = lo_image ).
lo_container->add_child( lo_image ).
regards,
janakiram.
Edited by: janakiram raju on Mar 4, 2008 1:30 PM
Hi Vikranth,
Try like this.
For Dynamic Image creation you have to pass the Image sources [Image names like 1.bmp] to the attribute of the Context node.
Using SET_ATTRIBUTE you can pass the Image sources to Attributes.
wd_context->set_attribute( name = 'IMAGENAME' value = item_image_input ).
From the above code "item_image_input" contains the Image name.
Then Using New_image method from class CL_WD_IMAGE you can add the new image.
CALL METHOD wd_context->get_attribute
EXPORTING
name = 'IMAGENAME'
IMPORTING
value = TEMP.
.
IMAGE = cl_wd_image=>new_image( SOURCE = TEMP ).
CALL METHOD cl_wd_grid_layout=>new_grid_layout
EXPORTING
container = root_container.
CALL METHOD cl_wd_grid_data=>new_grid_data
EXPORTING
element = IMAGE.
root_container->add_child( IMAGE ).
Thanks.
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.