BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 10-01-2008, 10:51 AM   #1
Mikaël Donini
Knows Where the Search Button Is
 
Join Date: Sep 2008
Model: 7100T
PIN: N/A
Carrier: none
Posts: 32
Thumbs up how to reload a screen using JAVA API

Please Login to Remove!

Hi All,

Do you know how to reload a screen using JAVA API? I have used the updateDisplay method of the Screen class but this method seems not to reload(or to update) the screen.

Any ideas?

Here is my code:

Code:
public Object run(Object context) 
{
BlackBerryEvent e = (BlackBerryEvent) context;	
if(e != null) 
{
e.addString(Event.SUMMARY, 0, "Mon Test");
e.commit();
UiApplication.getUiApplication().getActiveScreen().save();
UiApplication.getUiApplication().getActiveScreen().updateDisplay();
}
return context;
}
Offline  
Old 10-01-2008, 11:05 AM   #2
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Default

using invalidate() is the common way to do it for Screen/Manager/Field

Quote:
This method marks the entire screen as requiring a repaint. The main event dispatch thread handles the repaint at a later time.
__________________
Blessed is the end user who expects nothing, for he/she will not be disappointed. (Franklin's Rule)
Offline  
Old 10-13-2008, 06:45 AM   #3
taqi.mir
Thumbs Must Hurt
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: AT
Posts: 81
Default

Quote:
Originally Posted by Ivanov View Post
using invalidate() is the common way to do it for Screen/Manager/Field
I have two screens in my application viz MainTrans and AddScreen , i m creating this AddScreen from the menu that is added to the MainScreen(that means it opens from the MainTrans menu).Now i want to refresh this MainTrans when something is added from the AddScreen.

In above i have added the fields directly in the constructor not in the paint method,then how can i call invalidate();
My question is how to reload the MainScreen ?
My question is how to reload the MainScreen ?


Regards,
Mir
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


New Honeywell LSA1A Switch Heavy Duty Limit Switch picture

New Honeywell LSA1A Switch Heavy Duty Limit Switch

$102.99



NEW Sick Photoelectric Switch Sensor WTV4-3P2241  picture

NEW Sick Photoelectric Switch Sensor WTV4-3P2241

$210.00



1PCS New Omron Safety Switch F3W-D052B Fast Ship picture

1PCS New Omron Safety Switch F3W-D052B Fast Ship

$280.00



New Sealed In Box for SICK KTM-WN11182P 1062150 Photoelectric Switch picture

New Sealed In Box for SICK KTM-WN11182P 1062150 Photoelectric Switch

$149.99



PWM DC Motor Speed Controller Adjustable Variable Switch HHO Driver 12V 24V 48V picture

PWM DC Motor Speed Controller Adjustable Variable Switch HHO Driver 12V 24V 48V

$7.95



(2) Heavy Duty On Off Metal Toggle Switch 20 Amps 12 Volt SPST Fits 1/2

(2) Heavy Duty On Off Metal Toggle Switch 20 Amps 12 Volt SPST Fits 1/2"

$12.95







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.