on 05-05-2005 3:08 PM
Hi everyone,
I am trying to get work to ProgressIndicator but without success.
Lets that I have this code.
public void wdDoInit()
{
//@@begin wdDoInit()
for(int i=0;i<1000;i++)
wdContext.currentContextElement().setText(Integer.toString(i));
//@@end
}
I created an attribut value "text".
Now I want to connect the ProgressIndicator to this loop process.
Is it possible.... ?
Thanks a lot!
Hi David,
Progressndicator value is smth. static rather then dynamic -- it does not update itself within single Request / Response cycle.
If you need dynamic behavior, then (use on your own risk, this is not recommended aproach for J2EE / Web applications)
1. Fork separate thread to process time-consuming work.
2. Make this thread update some context variable that reflects progress.
3. In WD View use Timer UI control to periodically check progress (you have to define at least empty onTimer action and resanoble delay in seconds)
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the fast replies.
I think I missunderstood something.
I wrote in my handler.
public void onActionProgress(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionProgress(ServerEvent)
for(int i=0;i<30;i++) {
wdContext.currentContextElement().setProgress(i);
wdContext.currentContextElement().setText(Integer.toString(i));
}
//@@end
}
My internet browser seems to call the server in an infinit loop....But I do see the progress bar going till 29 pourcent.
Did I do something wrong in here....
Hi,
but if you put this in onAction event handler it is expected.... this method is called every "delay" time. So, it is called first time. You set to 0..29. 29 is final value when you leave event handler method. Then it is called again - 0..29, and again, and again. you can bind property of delay (TimedTrigger UI component) to context atribute and set it to 0 when process is finished (... A delay of 0 seconds means that the timer is turned off and no action is executed ... from help).
regards, Maxim r.
Hi,
1) create "progress" attribute in context as integer
2) put on view TimedTrigger UI element. set delay as 1. specify onAction event handler.
3) put on view ProgressIndicator. bind percentValue to "progress" attribute.
4) in onAction event handler increment "progress" context attribute.
regrads, Maxim R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David
Use the Pecentvalue property of the progress indicator.
create a context variabe and assign it to the percentvalue property and test it.
Let me know if you require any other help.
Kishore
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.