cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the images dynamically in a table.

Former Member
0 Kudos

Hai,

How to change the images dynamically in a table based on the condition in webdynpro abap.

Edited by: Ravi.Seela on Oct 13, 2011 2:17 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

This has been much discussed earlier. Do search posts.

For your scenario i would do the following.

inside your node which is binded to the table, i create a new node image with cardinality 1 ..1 and a attribute called path of type string.

create a supply function for the node image .

Supply method now has a Element (Parent element ) and node.

Based on your record in element, set the right image source to path attribute and bind the node.

This will make sure that the framework calls the image supply function for every row in a table.

Former Member
0 Kudos

Hi Ravi,

Create a context attribute say 'IMAGE' and bind this to source property of the image and then populate the value of the context attribute with the MIME image name dynamically.

Cheers,

Kris.

Former Member
0 Kudos

Hai,

I want different images in a table based on the condition.

Eg: if employee has rating < 10 then image p is displayed

and employee has rating > 10 then image b is displayed.

Former Member
0 Kudos

Hi Ravi,

First create mime object( all your images ).

Create one attribute and bind this to source proeprty of image. based on condition use set_attribute

to set property source value.

Ex : image1 and image2.

If <condition>

set_attribute

else.

set_attri with 2nd image.

endif.

Hope it helps.

Cheers,

Kris.