cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying images based upon the selected values of DropDownByKey?

Former Member
0 Kudos

Hi Experts,

I need to developed an application wherein it contains DropDownByKey which contains four values and i've imported 4 images into the component. Now my question is i want to display image based upon the selected value of the dropdownkykey.

Suppose the DropDownByKey contains four values let say v1, v2, v3 & v4 and imported images are Img1, Img2, Img3 & Img4. Now if i select v1 then it shud display Img1 and v2 den Img2 so on......

Can anyone help me out to achieve this functionality.

Your help is highly appreciated

Rgds

Faisal.............

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Another point to be noted is that all the images must be stored in your component folder.

the path would be in SAP->BC->Webdynpro->(COmponent folder name ) ->images in that folder.

All the best

Former Member
0 Kudos

Hi faisal,

I assume the images are already present in the SAP server. First create a context with a string attribute that will hold the name of the image to be loaded . Then use the action event of the drop down list/radio button to load the name of the image in that context.

In the UI properties of the image UI element, click on the button at the source property and bind it to the above context that will hold the name of the image. Should work fine