on 09-11-2007 10:43 AM
Hi all
I have an application that uses TimedTrigger, which triggers after each second.
I want it to stop triggering after some time say 10secs.
please help me
Thanks in advance
LakshmiNarayanaChowdary.N
Hi Lakshmi,
Assume you have defined this at page level
At the very end of your implementation you will get a commented section called
//@@begin others
static int i =0;//write it here
//@@end
Now we assume that we will increment the value of i everytime in the action assigned to timed trigger UI element and don't want the action to be fired after that.
Code of your Action called time********
public void onActiontime(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActiontime(ServerEvent)
wdComponentAPI.getMessageManager().reportSuccess((i++) + "");
//@@end
}
**********In WDDoModifyView() write this code to remove action from the timmed trigger UI element once the value of i=5*****************
if(i==5)
{
IWDTimedTrigger trigger = (IWDTimedTrigger)view.getElement("TimedTrigger");
trigger.setOnAction(null);
}
Hope this was the thing you were looking for.
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could create a 2nd timer that triggers after 10 secs.
When this triggers, you could stop the 1st timer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.