cancel
Showing results for 
Search instead for 
Did you mean: 

Change the image dynamically every 2 minute in webdynpro abap

former_member184958
Active Participant
0 Kudos

Hi All,

I know to display the image on my application. Here my doubt is how can we change the image every 2 minute?. I gone through the form i didn't find any related answer. Kindly help me.

Thanks and Regards,

John.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi John,

The TimedTrigger UI element is used to triggers an event with a specified delay automatically. in your case the delay is 120 ( in seconds)

you have to bind the image source to a attribute(which contains the image source) and each time when the event triggers you have to  keep on changing the value of the attribute.

correct me if you get better solution.

Thanks

Shony KJ

former_member5006
Participant
0 Kudos

Hi shnoy and John,

                       John as you said i created in my component . images are changing but the problem is whole  page get refreshed according to time delay. how to stop page refreshing here ?

thanks in advance

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Jhon,

You can use the UI element called TIMED_TRIGGER. On delay field add the value for 2 minutes and onAction create an action where you can put your code in order to change the image displayed.

  I hope it helps.

  Regards

former_member184958
Active Participant
0 Kudos

Hi Yaiza,

   I was bit confusing while add the image dynamically. Can you share some piece code it will be very helpful to me.

Thanks and Regards,

John.

Former Member
0 Kudos

Hello,

Upload all the image in MIME and store the name of all your image in some ITab. Create One UI Element "Image" and bind the Source property with some attribute and add one UI timed triggered  also on your view and give the delay as 120(120 second-- 2min. ) now onAction of timer the create an actionand read the ITAB which have all image name with index and set in the attribute which is bind with the "IMAGE" UI element.

Now you need to set a flag on Component cont. or view and after changing every image you need to increase that flag till no. of image or reset by 1.

It will show first image after 120 second(to avoid this please write same code in DOINIT method too with Index 1), and image will change after each 120 second, if the application is inactive for 120 second.