What is a good implementation of creation from records in a database SQLite MenuItems?

From my understanding and reading of the API MenuItem KB, I need to extend the class MenuItem for each menu item that I want to create.

 ...
    // setup the menu items
    MenuItem item = new MyMenuItem();
    menu.addItem(item);
    ...
    class MyMenuItem extends MenuItem {
        MyMenuItem() {
            super(MyResourceBundle.getBundle(), MyResource.MY_MENU_ITEM, 0, 100);
        }
        public void run() {
            // do something
        }
    }

I returned a list of five to eight records to a SQLite database, and I want to as the label of each record (String) to be a label for the menu item.

Do I just loop through the records and create a MenuItem for each record and add the menu item to the menu in the loop?

{for(each record)}

create MenuItem

Add MenuItem to the menu

}

Or is he a good implementation for this?

Thank you

Slight variation:

class MyMenuItem extends MenuItem {}
MyMenuItem (String menuLabel) {}
Super (menuLabel, 0, 100);
}
public void run() {}
do something
}
}

{for(each record)}

excerpt from label

create MenuItem (label)

Add MenuItem to the menu

}

Tags: BlackBerry Developers

Similar Questions

  • What is Akamai NetSession customer? Is it safe? Is good to disable it from starting Windows?

    What is Akamai NetSession customer? Is it safe? Is good to disable it from starting Windows?

    Hello

    Read information about it.

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_other-security/what-is-Akamai-netsession-client/6c85ea38-E236-42b4-8c02-ea425d5658dc

    http://answers.Microsoft.com/en-us/protect/Forum/protect_other-protect_scanning/how-do-i-uninstall-Akamai-netsessions-client/3bfa60f7-0160-4284-875a-43fda8736cd7

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-performance/why-do-i-have-two-Akamai-netsession-client-running/12ef3220-e1d6-4b96-BCB3-b8d6ea5862ea

    See you soon.

  • What is a good replacement for Photos for Mac

    I got my photos sorted by year and month in iPhoto, app Photos The destroyed that.  What is a good replacement for Photos for Mac I had digital pictures in 1999.  It will take me months to recover.  So what is a good replacement, needless organized storage edition, just logical.   Is there a product that I can export Photos to the?   The Photos application is too slow and freezes; It's just all around a mediocre product.

    Migrating from iPHoto to Photos doesn't "destroy" anything - it keeps your albums events and converted into albums - pictures 2.0 vs iPhoto 9.6.1: features and capabilities - how many Photos handles content and metadata for iPhoto and Aperture - Apple Support

    and of course iPhotos 9.6.1 still works very well - if you do not keep your system up to date see can't update iPhoto because it is not available in the App Store

    You can export Photos in keeping the Organization of moments - you can export iPhotos keeping the exporting from iPhoto event organization

    As to products - it's your choice - you can use the finder to organize into folders and preview to display pictures - or you can use one of the many programs available ranging from the free to the very expensive

    I use Photos so am not upward on the different options and I suspect most of the volunteers here are the same and the answer is going to be personal anyway - no one but yo can do

    LN

  • On a 32-bit vista business system, what is the right way to recover from a damaged NTLDR file that prevents the system from booting?

    On a 32-bit vista business system, what is the right way to recover from a damaged NTLDR file that prevents the system from booting?

    Also, is there a powerful device filled, utility like Winternals Windows PE boot, I can download for the resolution of problems like this and others?

    Thank you in advance!

    Have you had a glance at this startup repair disk?

    Download the ISO on the link provided and make a record of repair time it starts.

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu.

    When you have changed that, insert the Bootable disk you did in the drive and reboot.

    http://www.bleepingcomputer.com/tutorials/tutorial148.html

    Link above shows what the process looks like and a manual, it load the repair options.

    NeoSmart containing the content of the Windows Vista DVD 'Recovery Centre', as we refer to him. It cannot be used to install or reinstall Windows Vista, and is just a Windows PE interface to recovering your PC. Technically, we could re-create this installation with downloadable media media freely from Microsoft (namely the Microsoft WAIK, several gigabyte download); but it is pretty darn decent of Microsoft to present Windows users who might not be able to create such a thing on their own.

    Read all the info on the website on how to create and use it.

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    ISO Burner: http://www.snapfiles.com/get/active-isoburner.html

    It's a very good Vista startup repair disk.

    You can do a system restart tool, system, etc it restore.

    It is NOT a disc of resettlement.

    And the 32-bit is what normally comes on a computer, unless 64-bit.

    See you soon.

    Mick Murphy - Microsoft partner

  • What is a good figure for the average number of virtual machines per server?

    I hear everything from 10:1 to 100: 1.  What is a good average, and analysts say?

    So what are the good standards of processors and apps

  • What is a good gaming site?

    What is a good site that let's you download free games, no ads and no torrent. I'm also looking for good suggestions, 2D platform game games.

    Thank you.

    Steam has a number of games "Free to Play". 21 single player mode, but I've not bothered with them so don't know if they are good or not.
    EA has a 'Free to Play' section. I them have not tried either (lower limit of download here in Oz).
    I have a game - Mario Forever, you should be able to download from horizontal scrolling
    somewhere (mine from a disk magazine).

    Many sites that claim to be free let alone you play for free for a limited time, you give a demo version or will charge you different DLC that you will need to advance in the game.
    In other words - "Play for Free" = marketing hype.
    He money of cost to operate a site, or online, server, so if you can get decent playable games with just advertising I think this is what you can expect.

    If you're willing to pay, say $2-5 USD for a trial of game good old games. They have a lot of classics
    (much more for $10).
    http://www.Gog.com

    Platform games is not real currents on PC, but I bought the collection of the Oddworld Oddysee (four matches) Abe earlier on a sale of steam for about $8. I also bought Rayman Origins of steam on one of their periodic sales recently for a similar amount (don't remember exactly).

  • What is a good practice to manage LOV in jdev apps?

    Hi, experts,
    In jdev 11.1.2.3,.

    In our projects, there are numerous LOVs whose value are stored in a common dictionary table, for example in the refcode table:
    refcode (id, low_value, high_value, sense, domain_no),
    Different LOVs can extract value peers (low_value, meaning), or (high_value, sense) refcode table by using domain_no as the filter criteria.

    In the user interface of the user, the values of field/code number should be displayed by a sense of refcode password
    To achieve this, I'll create many links between the different tables with refcode,
    and create your entity refcode consider the secondary entity views.

    I feel some odd (because so many associations with the same table refcode),
    What is a good practice to manage LOV in this way?

    Thank you.

    The merger for Oracle Application Development Framework Developer's Guide
    10.3 defining an object of basic display for use with Lookup Tables
    (http://docs.oracle.com/cd/E37975_01/web.111240/e16182/bclookups.htm#BABIBHIJ)
    10.3.3 How to set the WHERE Clause of the view of search criteria to display object

    There is valuable information and suggestions on the search features to implement, in particular using view criteria
    (see criteria and display accessor is one of the important and a great idea in ADF)

    I think that, by using the view criteria, attribute derived to display information of fk can be implemented without definition of associations FK convinent way.

  • What is the minimum for the creation of an application?

    Hello! What is the minimum for the creation of an application (from the creation of the folio to submit to Apple iTunes)? I know it's a matter rather general, but it would be useful in terms of planning.

    Once made the creation of a simple editing application folio (which, I guess that's what)

    ask yourself on) about 15 minutes from start to end as long as

    you have all the assets. Apple takes 1-2 weeks to review the application.

  • What is the limit for the creation of a primary key?

    Hi friends I have an another question... .Please help me...


    What is the limit for the creation of a primary key?


    Thank you

    I think that its 32

    Yes from the doc

    Primary and unique keys because composites are limited to 32 columns, a composite foreign key is also limited to 32 columns.

    Published by: Karthick_Arp on January 13, 2010 22:04

  • What is a good backup drive

    My Seagate Free Agent GoFlex Home cratered on me backup.  What is a good backup drive to replace it with?

    I use WD My Passport on x 6 Mac without issue for backups Time Machine and CCC clones, these are bus-powered readers.

    I have also used a WD My Book World Edition II nas drive but have just been crossed to a Synology Diskstation in after the use of this brand to work as a file server.

  • What is a good DVD Ripper?

    Didn't know where to post this question...

    In any case, what is a good DVD ripper software?

    I have some movies on DVD (with menus, etc.), which are non-commercial unprotected DVD.  I have full right to get video off them.

    They are actually in my storage in the form of ISO images.

    Right now I use the free version of WinX DVD Ripper.  I'm willing to pay for something better.

    The two most widely recommended are Handbrake (free) and MPEG Streamclip (free, but also requires the reading QT component, which Apple sells more).

    Russ

  • What is a good antivirus software for mac and do I need?

    What is a good antivirus software for mac and would need one. I'm under el capitan, later.

    There is no such thing. They all cause more problems than they were designed to solve.

  • What is a good cpu readings?

    What is a good cpu readings?

    Hello

    1. What is the brand and model of your processor?

    2. is your computer overheating?

    See the article and see if it helps.

    Different ways to determine CPU speed in Windows XP or Windows Server 2003

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

    Previous post your answer for you help in this matter.

  • What happens if I delete the Hello from my computer? I have Windows XP Home Edition

    I have Windows XP Home Edition. What happens if I delete the Hello from my computer? Thank you

    Nothing, really. It allows to find other devices generally (computers and printers) on your network.

  • I put in a new windows xp en my cable internet is not werking why is that what I need to down load drivers from dell for this

    I put in a new windows xp en my cable internet is not werking why is that what I need to down load drivers from dell for this

    Your Internet drivers are not part of XP. If you bought the device from Dell, you have other records besides that reinstall drive? I had 3 machines from Dell and they all came with the CD of drivers among others.

Maybe you are looking for