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

Tags: BlackBerry Developers

Similar Questions

  • 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

  • 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!

  • Hi, after you install Minecraft in my iMac, I get this message: "cannot start minecraft, if you run from a dmg, please drag applications and try again. I Don t know how to start the game. Thank you

    Hi, after you install Minecraft in my iMac, I get this message: "cannot start minecraft, if you run from a dmg, please drag applications and try again. I Don t know how to start the game. Thank you

    So what measures through 'install '?

  • I deleted pages by error, anyone know how to reinstall the pages? Thank you!

    I deleted pages by mistake with mackeeper, anyone know how to reinstall the pages? Thank you!

    First - get rid of MacKeeper - it will wreak havoc with your Mac. This is an absolute piece of garbageware. See this link for full instructions:

    How can I remove mackeeper to my macbook pro

    For re - download pages to your Mac, open the Mac App Store, and then click "buy". You should see that pages listed there with the button download beside him.

    Good luck

    GB

  • My 6s keep thing on another site. Please advise me how to clean the bugs. Thank you

    My 6s keep thing on another site. Please advise me how to clean the bugs. Thank you.

    Hi Limkk1952,

    Thank you for contributing to the communities of Apple Support.

    If you are redirected to other web sites or see pop-up windows when using Safari on your iPhone, here are some steps to try first:

    On your iPhone, iPad or iPod touch, force Safari to close. To avoid automatically reopen all Safari Windows, go to settings > Safari, then click clear history, and data from the Web site. It also removes your browser history and cookies.

    Stop advertising windows pop-up and adware in Safari

    You can also try Safari settings by following the steps in web settings Safari on iPhone, iPad and iPod touch.

    In addition, if this happens when you are connected to a Wi - Fi network, try the following steps:

    • If someone set up your network, ask them for help. If you use a network in a business, school, hotel, store or other place of Wi - Fi, find an employee for assistance.
    • Try to connect to a Wi - Fi network in a different location.
    • Update your Wi - Fi router with the latest firmware and check that the router supports your Apple product. For more information, contact the manufacturer of your router.

    Of If your iPad, iPhone or iPod touch connects to a Wi-Fi network

    Sincerely.

  • Keep saying Appcrash after installation. How to solve the problem? Thank you

    I installed Adobe Acrobat DC via Adobe Creative Cloud, but he repeats me Appcrash once I open it. I can't open it for more than a minute.

    Do you know what is the problem and how to solve?

    Thank you.

    Hi Lelez10545194,

    Please refer,

    Adobe Creative Cloud desktop application closes immediately after launch

    Solve intermittent crashes Acrobat DC on Windows OS

    Resolve Windows system errors, freezes | Adobe software

    Let us know if that helps.

  • 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 view the attachment through "thank you for your request for information form.

    Hello

    The site I'm talking about is on the web-commerce plan 10. Please let know us if a respondent can click here to see the real commitment that they downloaded.

    Right now I see the attachment, but it is not a link.

    Thank you

    No,

    In some cases of e-mail you will get an attachment but emails are not the web. You will not get an attachment of a file that can be 30 MB in size, as many e-mail clients have e-mail size limits that exceed and not cross these files. That's why you get a link to the case in the email.

    It is a thing of Webmail not a BC thing.

  • How to refresh the report region change which column of report selection list

    Hello
    I worked with apex 4.2 and I create a classic report with list (named loved) select a column in the list change in report, update the table with the new value via JavaScript (change) call and woke up very well, and I change the color of the line was updated to make it different from the other lines now I want to update to the report after doing update without submitting the page to show the new color of line update.
    I called javascript:apex.submit() in the update function, but

    My Question
    1. How do I refresh the report after change report column list without sending page
    2-can we enter column name selection list report to submit the Page to refresh the report area


    Thank you
    Ahmed

    See my answer above!

    Here's what I did:

    • Created two hidden page items

    • Created a dynamic action on the page with three real actions. (1) set the item values page. (2) to execute code to update the plsql table. (3) update the region report

    Thank you
    Vikram

  • Hello, I ' have download Ligtroom and photoshop cc, I ask in the 'English' version, but I l ' have received in English, how to have the English version, thanks for your response, good day.

    Hello, I want the English version of photoshop and ligtroom, but I l ' have received in English, how to have the version English, thank you very much for your answer, good day.

    Please follow change in version; French: English

    (Double Post)

  • My laptop suddenly change its horizontzl to the position vrtical on-screen display. How to restore normal position? Thank you.

    My laptop suddenly change its horizontzl to the position vrtical on-screen display. How to restore normal position? Thank you.

    Try these in order:

    1 you may have a hotkey enabled for this arrow of ctrl-alt-up/left/right , but this will only work if your updated display driver in place.

    2 on the desktop, right-click graphics options, Rotation - it will be if your display driver has put there.

    3 go to control panel display settings, display, change, settings advanced, {click the large tab that has the name of the author of top display driver}, Graphics Options {or similar term} - then dive around to find the controls - these are all arranged differently, so I can't offer that little will be in but the rotation controls will be there somewhere.

    4 when you find the rotation controls, take a look for the keyboard shortcuts in the same area of the configuration of the display driver - if you ever need to rotate your screen, then you can normally disable keyboard shortcuts to avoid accidentally hitting as you try to do something else [which is probably causing your current problem].

  • I currently have CS5 on my mac pro book. I just bought an i mac 21 "and you want to download my CS5 on my new imac, and then update the % of CS. How can I do this? Thank you

    I currently have CS5 on my mac pro book. I just bought an i mac 21 "and you want to download my CS5 on my new imac, and then update the % of CS. How can I do this? Thank you

    Hi Robing12544083,

    Please visit: https://helpx.adobe.com/creative-suite/kb/cs5-product-downloads.html

    Compatibility: Adobe - Creative Suite 5 Master Collection: System requirements

    I hope this helps.

    Concerning

    Megha Rawat

  • MacBook Pro 2.6 13 "mid 2014 8 GB. the HD is fried by virus. should I just take w Apple and replace a new SSD and you know how much $ would cost me? Thank you in advance.

    my MacBook Pro 2.6 GHZ I5 (mid-2014) 3 MB shared level 3 cache, 8 GB on-board 1600 MHz DDR3L SDRAM. the HD is fried by virus. should I just take w Apple and replace a new SSD and you know how much $ would cost me? Thank you in advance.

    Quan

    Contact ask an ANDS Apple Store.

    However, what makes you think that a virus fried your HD?

    Looking at it

    https://en.Wikipedia.org/wiki/MacBook_Pro

    Initially, you Mac Pro came with an SSD.

    Just what failure symptoms are you having? Maybe your SSD did not fail.

    If necessary and if yo are up to it you can replace the SSD yourself

    https://eShop.MacSales.com/shop/memory/Apple_MacBook_MacBook_Pro/upgrade/DDR3_16 00MHz_SDRAM

    This is the Office Mac Pro forum. I asked that your post moved to the forum of laptop MacBook Pro or another appropriate forum.

  • I need to create a table of contents in iPages but I want only one word for the title, not the line of holes. Or, how can I change the contents of the table? Thank you!

    I need to create a table of contents in iPages but I want only one word for the title, not the line of holes. Or, how can I change the contents of the table? Thank you!

    Yes, you can have a one word title, by assigning a paragraph style title to this one word. No, you cannot change the text in a Table of contents, but you can change paragraph style font attributes (line) and add for example, a head of points between the types of OCD paragraph and page numbers. No part of the table of contents will not provide hyperlinks in exported PDF documents.

    When you look up in the menu bar, you can see the word iPages, or simply Pages. There is no product of iPages.

Maybe you are looking for