cancel
Showing results for 
Search instead for 
Did you mean: 

how to add images in a table in web dynpro

Former Member
0 Kudos

how can i add an image in a table at some coordinates? the table has data from BAPI'S and i need to put some images in all the rows based on the data there...how to go about it?

thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kamal,

You want to display Images in one of the table columns.Is that your question ?

If so , you can do the following.

1. Insert Column in the webdynpro table.

2. Insert TablecellEditor and select Image from the list.

3. Bind the Source and Alt properties of the Image .

You can change the bindings at runtime so that depending uopn the result you can change the image.

Regards,

Anilkumar

Former Member
0 Kudos

No, you don't change the <i>binding </i>at runtime. The displayed image is determined by the content of the corresponding <i>element </i>in the table's data source node.

Armin

Answers (3)

Answers (3)

Former Member
0 Kudos

Greetings,

Just to clarify, store the images to:

<YourWebDynproProjectFolder>/src/mimes/Components/<YourComponentPackageName>

The Web Dynpro Editor should have created the <YourComponentPackageName> when you created your Component, so you should see this package in there. This is the actual package you've given your Component.

Also, another way to move your image files to that location is do an import and select the 'file system' option.

Once you've successfully move them, make sure that the images are loaded in the project, so then I suggest do a project 'reload' (right click on project name to see reload option). You'll save yourself some headache, believe me.

Lastly, you do not have to refer to the full path of the image to access it. Just use the image file name in your code and you should be good to go.

I hope this helps more..

Christian Nuesa

<><

Former Member
0 Kudos

or u mean to say i do it programmatically?

Former Member
0 Kudos

hi Anil,

yeah u got the question right, but how do i bind an image to the context . To be able to display the image in the table , we need to bind the image to the context, but i see that i can just bind either value nodes and value attributes which are some data types.

Former Member
0 Kudos

Bind the property <b>Image.source</b> to a context attribute of type String, that contains the image filename.

Armin

Former Member
0 Kudos

got it ,

thanks Armin

Former Member
0 Kudos

The question now is...where do have to store the image, on which path??

Regards

Former Member
0 Kudos

hi Pablo

The images are to stored in the src/mimes/components/component name.

Just copy the images and then paste it in that folder. Choose the navigation explorer perspective while doing that.

I hope i have answered your question

Regards

Srikant