cancel
Showing results for 
Search instead for 
Did you mean: 

How to display image in a table using WebDynpro for Java

Former Member
0 Kudos

I have a table to display user roles.each type of role will have a specific image to display in that table along with other roles data.

I am new to WebDynPro for Java.Can any one help me out on this.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

you need to have the image name and the simple type item name exact same,

after that, you have to provide the image type extenstion in the coding where your passing the value to the image source and image,

you need to give the simple type item name - image name + ".bmp" this is the image file extention like,

try this, will work, your missing to give the file extention,

Cheers,

Apparao

Former Member
0 Kudos

Why does he need a simple type?

Armin

matteo_fusi2
Participant
0 Kudos

Hi,

look this tutorial

[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90ac0015-d1c5-2a10-d788-aed89990811d]

Reagards,

Matteo

Former Member
0 Kudos

Above link gives me only to insert a text element into a table.

But I have to insert a image or a small logo in each row.

matteo_fusi2
Participant
0 Kudos

You can create a column with TableCellEditor of type Image

former_member201361
Active Contributor
0 Kudos

Hi,

Check this thread for ur query.

[;

Former Member
0 Kudos

Yes,

The following are the steps which followed to insert.

1) inserted a TableCellEditor of type Image with name Image1.

2) copied the image which i want to display into /src/mimes/Components/image.jpeg.

3) created a simple Type variable in Local Directory named imageSource

4) added a name-value in enumeration with name as image and value as above url.

5) created a value Attribute in view context and mapped to above created simple type variable

finally when i run the application i am able to table with no Image mark( image with X mark)

Former Member
0 Kudos

1) inserted a TableCellEditor of type Image with name "Image1".

Ok. Bind the "source" property to the context attribute from step 5 below.

2) copied the image which i want to display into /src/mimes/Components/image.jpeg.

No, the images must be inside folder src/mimes/Components/<name_of_your_component>

3) created a simple Type variable in Local Directory named imageSource

Nonsense.

4) added a name-value in enumeration with name as image and value as above url.

Nonsense.

5) created a value Attribute in view context and mapped to above created simple type variable

Nonsense. Just set the attribute value at index i to the image filename if the image should appear in table row #i.

Armin