cancel
Showing results for 
Search instead for 
Did you mean: 

wait() sleep() function

Former Member
0 Kudos

hi,

i am not the java expert, but am i right, that this typical waiting-flash-like animation can be set up on purpose using the following code:

try {
    Thread.currentThread().sleep(30000);	
	           	           
// set Visibility
wdContext.currentContextElement().setVisible1(WDVisibility.VISIBLE);
				      
   } catch (InterruptedException e) { 
     msgMgr.reportException("Error-Sleep020804: " +  e.getMessage(), true);
   }

or would you suggest to use another way eg the wait() function?

can i replace the sap-flashy-animation by my own message or gifani or anything similar?

thanx for your hint, and i shall deliver points

matthias

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You can also use the TimedTrigger and see. That should also help you acheive something like that.

Depends on how often you want to flash your image. If its at a predefined time intervals then you could use sleep function.

But if you would like to flash the image only when there is a notification or something like that then you could use wait and notify methods.

regards

ravi

Former Member
0 Kudos

Hi Ravi,

thank you for the reply.

Why is that, when using the wait() function like this:

TimedTrigger.DEFAULT_VISIBLE.wait(10000);

within try/catch I always get an error:

"java.lang.IllegalMonitorStateException: current thread not owner"

I would like to know, how to use the wait() function correctly in webdynpro context. read something about the setDaemon() function. is there a way in setting the current thrad to Daemon and then applying the wait-function?

btw, by "flashy" animation I meant the webdynpro default-image which is displayed, when the application is busy and eg the delivery of data from backend systems needs time. I wonder if it is possible to swap this image - I recall having seen something else (an orange-like message) somewhere in service market place.

ta, matthias

Answers (0)