Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
arunbiet
Posts: 384
Registered: ‎06-22-2010
My Device: na

how to refresh listfield content

I have a screen with listfield.I have set a timertask which would refresh the field 5 times.Now i click on first row and go to the next page while it has refreshed only 2 times.When i come back again to that screen is it possible that the timertask would complete the remaining 3 refresh?

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: how to refresh listfield content

[ Edited ]

Why not?

In this sort of situation, you could stop updating the screen when you push a new screen over the top, and then refresh the screen on return. 

Developer
arunbiet
Posts: 384
Registered: ‎06-22-2010
My Device: na

Re: how to refresh listfield content

But the timer would start from a fresh i guess not from where i left.I am using this in mainscreen class 

protected void onUiEngineAttached(boolean attached) {
		onResume();
		super.onUiEngineAttached(attached);
	}

 onResume() is the method where timertask is executing

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: how to refresh listfield content

That method is only called when the screen is pushed or popped.  You can detect which based on the attached flag so you should use this to remove the timer when the screen is popped. 

 

So I don't think there is a problem here.  What makes you think there might be?