How to refresh the current screen

Import net.rim.device.api.ui.Field;
Import net.rim.device.api.ui.FocusChangeListener;
Import net.rim.device.api.ui.Manager;
Import net.rim.device.api.ui.MenuItem;
Import net.rim.device.api.ui.Screen;
Import net.rim.device.api.ui.TouchEvent;
Import net.rim.device.api.ui.UiApplication;
Import net.rim.device.api.ui.VirtualKeyboard;
Import net.rim.device.api.ui.component.EditField;
Import net.rim.device.api.ui.component.LabelField;
Import net.rim.device.api.ui.component.ListField;
Import net.rim.device.api.ui.component.Menu;
Import net.rim.device.api.ui.component.TreeField;
Import net.rim.device.api.ui.container.VerticalFieldManager;

public class malls extends screen implements {FocusChangeListener}
private CustomeManager cManager;
private LabelField titalField;
find the EditField private;
Private TreeField neayby;
LabelField MDD;
private ListField mallList;
Private ListCallback listCallback;
Private TreeCallback treeCallback;
public Malls()
{
Super (new CustomeManager (0), DEFAULT_MENU |) DEFAULT_CLOSE);
cManager = (CustomeManager) getDelegate ();
titalField = new LabelField ("SGMalls");
find = new EditField("","Find:");
find.setFocusListener (this);
Gird VerticalFieldManager = new VerticalFieldManager (Manager.VERTICAL_SCROLL |) Manager.VERTICAL_SCROLLBAR);
GIRD. Add (titalField);
GIRD. Add (Find);
treeCallback = new TreeCallback();
neayby = new TreeField (treeCallback, TreeField.FOCUSABLE);
int nod = neayby.addChildNode (0, "NeayBy");
neayby.addChildNode (nod, "Northpoint");
label is new LabelField ("list of shopping malls");.
listCallback = new ListCallback();
mallList = new ListField() {}
protected boolean touchEvent (TouchEvent message)
{

If (message.getEvent () == TouchEvent.Click & message.getEvent ()! = TouchEvent.Down)
{
String mallName = listCallback.get (mallList, getSelectedIndex()) m:System.NET.SocketAddress.ToString ();
UiApplication.getUiApplication () .pushScreen (new MallContent (mallName));
}
Return super.touchEvent (message);
}
};
mallList.setCallback (listCallback);
VerticalFieldManager gridmanager = new VerticalFieldManager (Manager.VERTICAL_SCROLL |) Manager.VERTICAL_SCROLLBAR);
for (int i = 0; i)<>
{mallList.insert (i);
Mall of chain = "Mall" + i;
listCallback.Insert (mall, i);
}
GridManager.Add (mallList);
cManager.setfirstField (gird);
cManager.setsecondField (neayby);
cManager.setthirdField (label);
cManager.setlastField (gridmanager);
}
protected void sublayout (int width, int height) {}
setPositionDelegate (0, 0);
layoutDelegate (width, height);
setPosition (0, 0);
setExtent (width, height);
}
storeItem private MenuItem = new MenuItem ("Search Store", 100, 10)
{public void run() {}
UiApplication.getUiApplication () .pushScreen (new store());
onClose();
}
};
protected void makeMenu (menu Menu, for example int)
{
menu. Add (storeItem);
}
' Public Sub focusChanged (field field, int eventType)
{V VirtualKeyboard = getVirtualKeyboard();}
Field f = getFieldWithFocus ();
if(f==Find)
{
v.setVisibility (VirtualKeyboard.SHOW);
}
else {}
v.setVisibility (VirtualKeyboard.HIDE);
}
}
}

I hope that after that I entered a Word to the editfield, and click on the button enter (or not) then the listfield will be updated and display new content.

Thank you

because the screen may not refresh after I hit the key enter.

I tested the code like this:

' Public Sub focusChanged (field field, int eventType)
{V VirtualKeyboard = getVirtualKeyboard();}
Field f = getFieldWithFocus ();
if(f==Find)
{
v.setVisibility (VirtualKeyboard.SHOW);
String text = find.getText ();
If (text.length > 0 () & text.charAt (text.length () - 1) == '\n') {}
Dialog.Alert ("Hello");
}
}

but can't get out of the alert

Tags: BlackBerry Developers

Similar Questions

  • How to refresh the current screen? Thank you

    I want to get the screen like this: the screen has an EditField and ListField. After that I have enter a word editfield and click enter, then the listfield will be updated, refresh the screen. The code below:

    public class malls extends screen implements {FocusChangeListener}
    private CustomeManager cManager;
    private LabelField titalField;
    find the EditField private;
    Private TreeField neayby;
    LabelField MDD;
    private ListField mallList;
    Private ListCallback listCallback;
    Private TreeCallback treeCallback;
    Private VerticalFieldManager gird;
    public Malls()
    {
    Super (new CustomeManager (0), DEFAULT_MENU |) DEFAULT_CLOSE);
    cManager = (CustomeManager) getDelegate ();
    titalField = new LabelField ("SGMalls");
    find = new EditField("","Find:");
    find.setFocusListener (this);
    girdles you = new VerticalFieldManager (Manager.VERTICAL_SCROLL |) Manager.VERTICAL_SCROLLBAR);
    GIRD. Add (titalField);
    GIRD. Add (Find);
    treeCallback = new TreeCallback();
    neayby = new TreeField (treeCallback, TreeField.FOCUSABLE);
    int nod = neayby.addChildNode (0, "NeayBy");
    neayby.addChildNode (nod, "Northpoint");
    label is new LabelField ("list of shopping malls");.
    listCallback = new ListCallback();
    mallList = new ListField() {}
    protected boolean touchEvent (TouchEvent message)
    {

    If (message.getEvent () == TouchEvent.Click & message.getEvent ()! = TouchEvent.Down)
    {
    String mallName = listCallback.get (mallList, getSelectedIndex()) m:System.NET.SocketAddress.ToString ();
    UiApplication.getUiApplication () .pushScreen (new MallContent (mallName));
    }
    Return super.touchEvent (message);
    }
    };
    mallList.setCallback (listCallback);
    VerticalFieldManager gridmanager = new VerticalFieldManager (Manager.VERTICAL_SCROLL |) Manager.VERTICAL_SCROLLBAR);
    for (int i = 0; i)<>
    {mallList.insert (i);
    Mall of chain = "Mall" + i;
    listCallback.Insert (mall, i);
    }
    GridManager.Add (mallList);
    cManager.setfirstField (gird);
    cManager.setsecondField (neayby);
    cManager.setthirdField (label);
    cManager.setlastField (gridmanager);
    }
    protected void sublayout (int width, int height) {}
    setPositionDelegate (0, 0);
    layoutDelegate (width, height);
    setPosition (0, 0);
    setExtent (width, height);
    }
    storeItem private MenuItem = new MenuItem ("Search Store", 100, 10)
    {public void run() {}
    UiApplication.getUiApplication () .pushScreen (new store());
    onClose();
    }
    };
    protected void makeMenu (menu Menu, for example int)
    {
    menu. Add (storeItem);
    }

    I hope the focusChanged method can get to the screen
    ' Public Sub focusChanged (field field, int eventType)
    {V VirtualKeyboard = getVirtualKeyboard();}
    Field f = getFieldWithFocus ();
    if(f==Find)
    {
    v.setVisibility (VirtualKeyboard.SHOW);
    String text = find.getText ();
    If (text.length > 0 () & text.charAt (text.length () - 1) == '\n') {}
    listCallback.erase ();
    mallList.insert (5);
    listCallback.Insert ("New", 5);
         
    cManager.invalidate ();
    }
    }
    else {}
    v.setVisibility (VirtualKeyboard.HIDE);
    }
    }
    }

    Instead of using FocusChangeListener, you can use FieldChangeListener or manage the click on the trackball by substituting invokeAction()

    Etienne

  • How to refresh the entire screen?

    Hello

    Please can someone tell me how to refresh the entire screen?

    Refresh here means clear all fields and show empty fields.

    Thank you

    Afonso Tyagi

    Hey,.

    as I usually do, is to create a separate function that manually assigns to each field and property reverts to its original state. There is not a function that does it for you. You must create your own. hope that helps good luck!

  • How to refresh the current page after the return of a contextual dialog box?

    Hello

    In jdev 11.2.3,

    In a jsff page, I have a commandbutton control to start a dialog popup and actionListener like this:

    < af:commandButton text = "Select Bills" id = "cb1" actionListener = "#{newReceiptBean.refreshBillPending}" >

    < af:showPopupBehavior popupId = "p1" / >

    < / af:commandButton >

    or

    < af:commandButton text = "Select Bills" id = "cb1" actionListener = "#{newReceiptBean.refreshBillPending} '"

    action = "#{newReceiptBean.refreshBillPending}" >

    < af:showPopupBehavior popupId = "p1" / >

    But the 'newReceiptBean.refreshBillPending' method can be run even if it can be executed by another button like this:

    < af:commandButton text = "ExecuteWithParams."

    Disabled = "#{!}" bindings. ExecuteWithParams.enabled}"id ="cb3 ".

    action = "#{newReceiptBean.refreshBillPending}" / >

    How to run a bean method, after the return of a pupup dialog box?

    Thank you!

    Post edited by: BAO. SZ It seems after setting showPopupBehvior for the button, 'action', and "actionListener" cannot be performed more. Can someone give any help? Thank you.

    I'm not sure that clearly understand your requirment. But have you all ok or cancel button in your popup?

    Well, you can use diaglogListener in your popup if you use dialog.in your dialoglistener runs your bean method.

    see this example

    Handling Ok and the button cancel in af:dialog to context-sensitive help in Oracle ADF by dialogListener | Techartifact

  • How to use the Print Screen function?

    I've seen various descriptions of how to use the print screen function.

    It would be nice to actually tell one that works.  None have worked for me.

    [Fn] and Prt SCr does not work.

    CTRL and Prt SCr does not work.

    CTRL, Alt, and Prt SCr does not work.

    [Fn], Ctrl and Prt SCr does not work.

    If anyone knows the correct method to activate the screen capture function which would be a good thing.

    From the looks of things, HP has a big problem with this function.

    Here's a microsoft articleon the use of the screenshot function.

    This should answer your questions.

    Thanks for taking a peek.

  • TouchSmart laptop computer: I have HP Touchsmart (15-d020dx). How to disable the touch screen feature?

    I have HP Touchsmart (15-d020dx). How to disable the touch screen feature?

    Hello

    Follow the steps listed in the link below

    http://h30434.www3.HP.com/T5/desktop-audio-video-monitors/how-to-disable-touch-screen/TD-p/569755

  • When you try to reply to emails on Outlook Express, the page compilation is behind the current screen

    Original title: Outlook Express

    When you try to reply to emails, the compilation page behind the current screen (used to stay at the front).  Then, when you access it, the blue header fades after a few seconds and I am unable to continue.  As a result, cannot answer.

    Hello

    ·         You get the error message?

    ·         Were there recent changes made on the computer before the show?

    I suggest you to follow the steps in troubleshooting this article and check if it helps.

    Error messages when you send and receive in Outlook and Outlook Express

    http://support.Microsoft.com/kb/813514

  • Liquid Z 3 How to use the small screen-receving-phone-call?

    Hello

    I would like to know how to use the small screen that appear in a case to receive a phone call.

    There are two types of screen wen we receive a phone call. I know how to use a larger. But not for the little ones. Aid for the small indicates that we have to drag the green phone symbol that I guess, but to fall on what? The manual doesn't explain it at all, it is not obvious!

    Thank you very much for your help!

    With "appellant float" activated, simply to press the Red or green button, no need to call, if the "small screen" is that of the attachment

  • How to fix the black screen of my hp pavilion g6

    How to fix the black screen of my hp pavilion g6

    Try a hard reset, works sometimes. Disconnect all external devices first.

    battery and power cord 1 / removal

    2 - Press the power button for 30 seconds

    3 reinstall only the power cord for the first start.

    4. turn on

  • How to disable the touch screen of HP 23-h027c

    My touch screen is sensitive even to small bugs! Living in a tropical island, this is an inconvinience. So I want to disable the touch screen and use the mouse and keyboard only. How to disable the touch screen? Help welcome. Thanks: Pedro [personal information edited by Moderator]

    Enter the device, as shown in the following image Manager right click of the device touch screen and choose disable.

  • Lost admin password, how to retrieve the current password to change it?

    I forgot my Admin password, I connect on my laptop using the scanner print finger all the time and when I try to change the password for Admin it ask the password which I do not remember. How to retrieve the current password and change it in Windows 7 Home premium?

    It's a laptop Acer 5738 G

    You can change your current password as follows:

    1. click on start.
    2. type the three letters cmd in the search box.
    3. press on Ctrl + Shift + Enter
    4. click on "run as Administrator".
    5. type the following command and press ENTER after each:
    NET user "user %%nom" 123456

    Now the password is 123456. While dealing with accounts and passwords: having a single admin account on a PC is about the same as having a unique key for your car. What happens if you lose? He lost? Break it? A robust Windows Setup requires at least the following:

    • Two admin accounts fully tested, with their passwords to record on paper.
    • A password key file. Click Start / Help, then search for help on "password". Follow the instructions to create a key on your USB flash drive file so that you'll never find yourself in this uncomfortable situation.
  • How to disable the Welcome screen in windows 7 Home premium

    original title: disabling the welcome in Windows7 home premium screen.

    How to disable the Welcome screen in windows 7 Home premium. Therefore, type the user name and password when connecting

    Hello

    1. If you have Windows 7 Professional or ultimate edition, open the Group Policy Editor and navigate to the following policy.

    Computer Configuration / Windows Settings / Security Settings / Local political / Security Options.

    In the right pane, double-click the policy:

    Interactive logon: do not display last user name - change to "Enabled".

    2. If you have the Home Premium version, you can set this policy using the registry.

    * Make sure that you back up the key before making changes

    Open Regedit and navigate to the following location.

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem\\\

    In the right pane, locate the dontdisplaylastusername value. Double-click this value and change the value to 1 data. Click OK.

    If this value is not present, right-click and select new/DWORD (32-bit) Value.

    Name the dontdisplaylastusername (respect for case-sensitive) value, and then make the above change.

    Here is a screenshot of the login window.

    http://i196.Photobucket.com/albums/aa86/rvmv/ManualLogOn.jpg

    Let us know the results.

    Concerning

  • How to adapt the start screen on all webworks App blackberry blackberry devices?

    I'm working on blackberry webworks app targeting blackberry 7 & lower OS versions. I have a 360 x 480 pixels boot image that adapts perfectly to the BlackBerry curve Smartphone 9380. But the same splash image does not fit into other devices with different screen sizes. So, now I have created the home screen with a different resolution. But I don't know how to use it? Can someone like me how to select the splash screen dynamic based on the resolution of the device or other means to solve this problem?

    Unfortuantely on BBOS, you can have a single element of the rim: loadingScreen:
    http://developer.BlackBerry.com/BBOS/HTML5/documentation/rim_loadingscreen_element_834680_11.html

    Whereas the BB10, you can have several elements of the rim: splash that the device would automatically take the best resolution of.

    Because it is a property of config/xml, there is no way to dynamically assign values. You would need a separate for each loadingScreen dimensions version.

  • How to get the current timestamp in C++ to the BB10 project

    Please help me how to get the current timestamp in C++. Thanks for your help!

    Following your suggestion,

    QTime is only for a day.  http://developer.BlackBerry.com/Cascades/reference/QTime.html#details

    I found "QDateTime" of references of the API: http://developer.blackberry.com/cascades/reference/qdatetime.html#toTime_t

    QDateTime = now QDateTime::currentDateTime();
    timestamp long = now.toTime_t ();

    But I got an error. I searched but no results are clear:

    -variable 'QDateTime now' initializer has but
    incomplete type
    -type incomplete "QDateTime" used in the nested name
    specifier of

    I am a newbie. So thank you for your help

  • How to get the current wording of the BlackBerry device with the BlackBerry App?

    Hello!

    I'm new to BlackBerry,

    Can u tell me pls, how to get the current language of the device using the program...

    PLS, suggest me...

    Locale.getDefaultForSystem () will give you the regional settings currently selected.

Maybe you are looking for

  • Satellite U400-108 - down Audio driver on Win7

    Hello As the title says, I tried to install the Audio driver on Windows 7 beta build 7000, but nothing helped. I did did not bother as the drivers supplied with Win7 worked fine until today when my headphone stopped working without reason. Was workin

  • Upgrade of the old security after El Capitan logs

    Hey! A couple of days, I did an upgrade to Yosemite to El Capitan. When troubleshooting a problem with my backup software (3rd party), I realized that all my system connects (system.log) date of the day I did my upgrade to El Capitan, but not before.

  • DAQ DMM AND on the same computer

    I have a 4060 DMM NI PCI and PCI Express 6259 on the same computer running under Windows XP/SP3 with drivers following: NI DAQ traditional = 7.4.3f7, NI DAQmx = 8.3.0f3, NIDAMM = 2.6 and = 4.1 MAX. In one of three times to reset the on-board computer

  • SystemK Module does not

    I get the message "SystemK Module has stopped working".  When I click on the line "check online for a solution and close the program", nothing happens except a repeat of the error message. Running Windows Vista Ultimate Edition. How can I fix this pr

  • Strange old files from 2008. What are these files?

    original title: OLD FILES OF RECENT YEARS? WHEN I TAB CLICK START AND TYPE ANY COMBINATION OF LETTERS IN THE SEARCH BOX, CAME A LOT OF OLD FILES TO THE TITLE OF THE PAPER, I SAW ONE THE OTHER NIGHT OF 2008, I AM A COMPUTER DUMMY BUT NOT ASHAMED TO AD