create a list of "buttons."

I am creating a list of "Buttons", I use the term as I want to reproduce the behavior of a button, but it is created dynamically.  For example I return data as xml, I am a loop nodes and create buttons for each node I find.  The button will be implemented in the following way

_______________________________

Text1

Text2

_______________________________

Text1

Text2

_______________________________

When you click one of these buttons, it will redirect to another page.  What would be the best way to create these buttons?  I am new to Java and BB, I don't require exact code that I am happy to learn, however some tips in the right direction would be great.

Can you tell me what gives you the idea that you cannot create controls (I suppose you mean the fields to use the terminology of BlackBerry) dynamically.

As far as I know, there is no RIM provided the fields that you cannot dynamically create.  In your case, I proposed two options, both use RIM provided fields.  Then you should be OK.

However, I'm guessing that you look at some code like this:

class MyScreen extends form {}

...

BasicEditField myField1 = BasicEditField (...) new

BasicEditField myField2 = BasicEditField (...) new

...

private void processEnter() {}

If {(myField2.gettext (.equals("Fred")))

...

}

}

In this case to refer directly to myField1, then Yes, you have it is defined.  But you don't have to write code like this, you can create a vector in which you put all the controls and manage them yourself.  It is more difficult, of course, but more flexible.  And code like above is often very difficult to treat.

So if you want to design your application as in the example I gave above, then you will need to "preset" all fields.

However, if you think that you may need 100 custom fields, then I suggest that you look at the ListField idea.  Insofar as you have only one field, it uses the same "logic to display" to display the entries that give you it.  So if you have 20 entries, it shows 20 lines, if you have 100 entries, it will display 100 lines.

ListField is not trivial to use, but I think it will be much easier than the redefined option you are currently considering.  And it's very effective.

So my recommendation is that you try to make this request using the ListField.

Tags: BlackBerry Developers

Similar Questions

  • How to create a list of button by using the names of a table

    Hi, I want to create an application that displays detailed information about something. for example, as the profile of the users. my application will read an xml response from the server that contains the list of the names of the users. How to create a list of buttons using the names and then each button that displays the name that can be pressed and displays detailed information about the name? I think that it is similar to the BBM app that displays a contact list of the user. Thank you very much

    Create a ButtonField as:

    ButtonField [] users_buttons = new ButtonField [number of users];

    Initialize the uasing dem:

    for (int i = 0; i)<>

    users_buttons [i] = new ButtonField ("user", Field.FIELD_HCENTER |) ButtonField.CONSUME_CLICK);

    Make dem clickable setchangeListener method of buttonField and Ooveride Navigation click to make a few operatoin by clicking on the specific button!

  • Creating a list of buttons

    Hello

    I am trying to build a list of buttons, each one integrated with an image as an icon. Each of these buttons are dragEnabled, in the sense that they can drag and drop on a canvas. I tried to create a list of button with the above charateristics and my code as shown below. However, it has not worked for me.

    Code:

    < mx:Array id = "arr" >
    < mx:Object mouseDown = "dragButton (event)" id = "trans" name = "Transformer" icon = "{transIcon}" contextMenu = "{buttonMenu}" / > "
    < mx:Object mouseDown = "dragButton (event)" id = "isoTrans" name = "Transformer of Isolation" icon = "{recIcon}" = "{buttonMenu}" contextMenu / > "
    < mx:Object mouseDown = "dragButton (event)" id = "ups" name = "UPS" icon = "{linuxIcon}" contextMenu = "{buttonMenu}" / > "
    < mx:Object mouseDown = "dragButton (event)" id = "pdu" name = "PDU" icon = "{vmIcon}" contextMenu = "{buttonMenu}" / > "
    < / mx:Array >

    < mx:HorizontalList id = 'horizontalList '.
    labelField = "label".
    iconField = 'thumbnailImage '.
    dataProvider = "(arr).
    itemRenderer = "CustomItemRenderer."
    dragMoveEnabled = "false".
    columnCount = '2 '.
    columnWidth = '150 '.
    number of lines = '2 '.
    rowHeight = "200".
    horizontalScrollPolicy = "on" / >

    The CustomItemRenderer.mxml:

    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:VBox xmlns:mx = "http://www.adobe.com/2006/mxml"
    horizontalAlign = "center".
    verticalAlign = "middle" >

    "< mx:Button mouseDown ="data .mouseDown"icon =" {data.icon} "contextMenu =" {data.contextMenu} "buttonMode ="true"useHandCursor ="true"/ >" "

    < mx:Label text = "{data.name}" / > "

    < / mx:VBox >

    Let me know what I'm missing. Thank you

    Hi Ronnie,.

    Have you tested the app...

    He works for you... ?

    Thank you

    Jean Claude Chari

  • Apple tv remotely, creating a list of genius in iTunes playlist

    With my first Apple TV system, when using the remote in iTunes, I would be able to press the big button while playing a song and it gave me the ability to create a list of genius 25 song playlist. I don't see this feature on the new Apple TV remote. Please notify. Thank you.

    That's right, that he is not currently a feature with the Apple TV 4. If you have any suggestions that you think might improve Apple TV you can send your feedback here at Apple

  • Issue of campus Solution 9.0: create rank list

    People,

    Hello. I am working on the school Campus Solution 9.0 folder & registration module. I face the question when to create rank list for several courses and one course as below:

    Browser: Program management > ranking > create rank list (and alignment of Grade)

    When to create alignments of rank, the name of the process is SRPCGGPJ. The process is not a success and posted. But there is no any log message.

    Curriculum management browser > ranking > Grade alignments > category Type of list, I click on the Create button and post, both receive the same error message:

    Program COBOL SRPCGGRC abandoned.

    I checked PeopleCode for the GRADE_ROSTER component. GBL and the COBOL program, but do not see any program of COBOL PeopleCode call SRPCGGRC.

    My questions are:

    First of all, why the SRPCGGPJ process is not success but no error message? How to solve it?

    Secondly, why COBOL program is abandoned?  When the call PeopleCode COBOL is program SRPCGGRC?

    Thirdly, we need to install MicroFocus Server Express for operating system Oracle Linux 5 run the COBOL program?

    Fourth, y at - it a parameter to run the COBOL program?

    Thanks in advance.

    People,

    Hello. We need to download and install Micro Focus Server Express to compile COBOL program and then set up the environment to run the COBOL program. The problem is solved by myself. Thank you.

  • Create a list based on checkbox selections

    Hi, I'm new to LiveCycle. I would like to create a list at the end of a document which shows all checkbox selections throughout the document. Is this possible?

    I am using Livecycle Designer ES3.

    Thank you

    Create two ListBox objects at the end of your form; ListBox1 will display all of the checkboxes are checked and ListBox2 for all those who are not.

    The following code can be placed in the click event of a button or any other event you want:

    
    var vList = getCheck(form1,{});
    
    ListBox1.clearItems();//Name of the list box that lists the checked fields
    ListBox2.clearItems();//Name of the list box that lists the unchecked fields
    for (var i in vList){
         if (vList[i].value=='0') //<----Value to change based on On/Off value assignments
              ListBox2.addItem(vList[i].caption,i);
         else
              ListBox1.addItem(vList[i].caption,i);
    }
    
    function getCheck(vNode,vChecks){
         if (vNode.className=="field" && vNode.resolveNode("ui.checkButton")!=null){
              vChecks[vNode.somExpression]={};
              vChecks[vNode.somExpression].caption=vNode.caption.value.text.value;
              vChecks[vNode.somExpression].value=vNode.rawValue;
         }
         if (vNode.className=="subform"){
              for (var a=0;a
    

    This code assumes that your root subform is form1 (the default value in the Designer). It also assumes that all names and captions for your boxes are unique.

    Now for an additional function, you can place the following code in the event of change of your ListBox:

    xfa.host.setFocus(this.boundItem(xfa.event.newText));
    

    Displayed in list boxes are all legends of the boxes in your form. Click on one of the items in the list box and it will bring you to this box.

    Hope this is what you are looking for.

    Kyle

  • How to create a list of permissions in the wizard for registration of components?

    Dear friends,

    Hello. I have just finished developing my first PeopleSoft application in the Application Designer and try to save the component using the registration wizard. I have 2 questions:

    When to use select button to select an allow list, first of all, there is no list of permission to select from my computer. So creating a list of permissions in the registration wizard?

    Secondly, in content reference window, click the "select" button to select the name of the portal and the name of the folder. Then click on the button "Open Selected", it is supposed to launch a browser that takes the administration page to create a new folder if necessary. But in my computer, the browser is a message: "page cannot display." What is going on?

    Friends can help answer these 2 questions? Thank you.



    Lucy

    Lucy,

    You cannot create a list of permissions in the registration wizard, only selection from a list of those that already exist. Note that when you choose the selection... button, there is another selection button in the popup window that acts first as a search button, and assuming that it returns a list of highlight or authorization lists you want to include and use the Select button. You can enter search criteria before using the Select button, or leave it blank to see everything.

    In response to your second question, the selected button open for content references will not work unless you set the URI correctly on the browser under Tools-> Options tab in the App Designer.

    Kind regards
    Bob

  • Creating a list of Logic Pro 10

    I currently play in a group of religious worship.  We have four songs we do in a row.  My problem is that I need to stop every song, close and open another song.  This creates a big gap between songs, I didn't know if there is an easier way in Logic Pro X or MainStage 3 that I could create a list of four songs that could play one after the other instead of stopping and opening of a new song each time.

    Thank you

    MainStage is the way to go

  • 33 Firefox works only with Amazon Wish List radio buttons

    On Amazon.com, if I click on the option button "Add to wish list", my wish lists list doesn't go down for display and selection. Instead, the item is added to my wish list default (I have several wish lists). Within any given wish list, radio buttons 'Move' (to another list of wishes) and 'Delete' does not work for any item in the list. This does not work on my system (Win 7; 33 Firefox) if I use (God forbid!) Internet Explorer.

    This happens in Firefox Safe mode? If this isn't the case, it can be a complement on. Questions to troubleshoot Firefox in Safe Mode

  • create a list or a container for the States of a statemachine

    Hello

    I'm working on an application where many different types of devices will be put into a test set-up for Board level testing.  Depending on the type of Board, I need to create an ordered list of all necessary tests for the device.  I have a state machine and a single State for each of the tests and try to figure out how to create a list of tests for the specific device.  I want to have control in each of the States to remove the first element of the list and then take the next value and he lead the shift register used to go from one State to the other.  This should allow the state machine switch to the appropriate State based on the type of device and its sequence of necessary test.

    It should be with a table?  Is there some containers easier to work with this use case?  I need a container that will allow me to easily add between 5 and 30 names of State (based on the needs of the unit type) and easily remove or increment a pointer to the next State in the container.

    Thank you

    Gary

    Hi Gary,.

    an array of string or "enum" comes to mind. You can use it for the selection of States.

    You have to transfer data?

    Another way would be a queue. You can read the States with the enqueue function.

    It may be useful

    Mike

  • How can I create a list of complete document of a nested folder (layers of files)

    If I have a folder of files all containing several documents; How can I simply create a list of all documents. This is very useful for legal submissions.

    Hi Alan_D_G,

    You will need to manually do the list that you want, or you can use your favorite search engine to check third party applications to do the same thing.

    Note: The use of third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

  • Create a list in the blackberry project

    Hey,.

    I want to create a list and fill in the list and then display it on the screen of the blackberry Simulator

    Then you should use Java.

    Try asking your question at http://supportforums.blackberry.com/t5/Java-Development/bd-p/java_dev

  • Creating a list of Table

    Hello

    I'm converting my existing application WED in the native application of BB. I would like to create a list that is rendered as a table, as shown in the attached picture. The number of columns is determined dynamically. Can someone please help me with this? Thanks in advance.

    Thanking you,

    Kind regards

    S.A.Norton Stanley

    Hi all

    The following link has helped me solve my problem:

    http://Pastie.org/282759/wrap#

    Kind regards

    S.A.Norton Stanley

  • Questions about creating a list of directories.

    I am aware that it is possible to create a list of directories and how to add items to the list in Windows Explorer.

    One of the points that I would like to add is the type of Compression that is displayed in the details pane of the properties listing of image files.  So far I could not find a way to do it and apparently no printed programs and list directory available (the least the ones I tried) will be either.

    Any suggestions as to how this can be done will be appreciated.

    Ray,

    Please contact the Microsoft Community.

    I wish that post you your query in TechNet for assistance more-

    http://social.technet.Microsoft.com/forums/en-us/home?category=w7itpro

    We know if you need help.

  • How to create the list in SDK v5.0

    Hello

    I have SDK 5.0 with me.

    I want to create a list as in the SDK v6.0but sdk v 5.0 software

    for example, for version 6.0

    MainManager Manager = getMainManager();
    SimpleList listField = new SimpleList (mainManager);
    listField.add ("Item 1");
    listField.add ("Item 2").
    listField.add ("Item 3").

    Can someone help me in this creation.

    When I want to go find info according to the selected item in the list.

    Also, please tell me how to select the item.

    Thank you

    Afonso

    Problem solved

    listF.getSelectedIndex () used;

Maybe you are looking for

  • Problem with external monitor when used with the Satellite P100-434

    I'm trying to use a Vizitron L - 151 monitor flat screen connected to the VGA port on the back of my Satellite P100 - 434 (PSPADE) I find that the screens seem to periodically - feeding cycle windows resize themselves and then the screens settle down

  • HP Photosmart B210 using iPad or Windows 7 computer laptop not printing black

    My husband uses this machine almost every day. The other day, he got an indicator he was more black ink and after having changed the cartridge (which we all have two made more successfully during the past two years) black will still not print. He cle

  • create a shortcut to recycle bin

    I can't sent the trash on the desktop and I can't create a shortcut for the desktop trash. pls help. Thank you n rgds b. Michael Koh

  • My computer keeps restarting.

    OK, the computer used to work very well. Since a few months now whenever I am playing a game or a video or simply using the computer it restarts randomly. As far as I know all the software are up to date. Nothing is in conflict with other hardware or

  • Backup Windows disabled by Acronis True Image 2011

    I discovered that the uninstallation of Acronis True Image 2011 will disable the Windows 7 backup program. The link is displayed on the Control Panel, but clicking on it does nothing. I've read elsewhere that the problem may be that Acronis mess up t