With the help of a list drop-down selection

Hello world

I scoured the web but couldn't find an answer that can help (I'm probably looking in the wrong places )

I have a dropdown menu, with several options, I want it so that when the user selects one of them, I am able to move them to the correct screen. The problem is that I can get the index, they take and convert it into an object, but I can't understand how to check that this object matches a given string. My code is below:

String [] BWChoices =
{'Sit up', 'Crunch', 'Theatre', 'Pull-up', 'Down', 'Board', ' Leg Raise '};
Creating object to body weight weight choice
ObjectChoiceField BWList = new ObjectChoiceField ("body weight:", BWChoices, iSetTo);
BWList.setFont (MyFont);
_FMMain.Add (BWList);
int index = BWList.getSelectedIndex ();
Activity of object = BWList.getChoice (index);
activity.toString ();
If (activity.equals ("Crunch"));
{
LabelField evidence = new LabelField ("Proof");
_FMMain.Add (Proof);
}

The evidence label is just here to try to prove when it works, but it always shows :/

I have being debugged when I get it activity is equal to something else, but it still shows the label.

Just tried before he can actually go to a new screen with:

UiApplication.getUiApplication () .pushScreen (new YourScreen ());

still no luck...

Any ideas? Also is the best way to do it

Really enjoy and help and thanks in advance

Sorry I don't think we have enough here to really fix your code, so let go us with a little theory, since it seems not t be a confusion.

You did this:

Go.setChangeListener (goListener);

When the Go field changes, the listener will be called.  In your case, the field going is a ButtonField, so that the listener is called when a user presses the button.

' Public Sub fieldChanged (field field, int context) {.}

will be called.  The context, you can ignore for now, but you wil notice that there is a defined in the JavaDoc, and allows you to distinguish the user changes, you do.  Not really applicable for a button, but for other fields, very useful.

When fieldChanged (field, the field passed in will be the area that has changed, so in your case will be the way of the ButtonField.  You can see, in this case, it is probably unnecessary.

You have this:

If {(BWList instanceof field)

that seems redundant - what else is he going to be?  What is the purpose of this statement?

Similarly, since you know these to be defined in this way, you could probably simplify the following for instructions

int index = BWList.getSelectedIndex ();
the final activity String = (String) BWList.getChoice (index);

and I'm not sure of the try/catch, but I guess it does no harm.

You say

"But he always, never moves it just did nothing (which seems off so he wants but it is at the moment).

Sorry I don't understand this.  Under what circumstances you won't move?  How this is reflected in the code?

I hope this helps.

Tags: BlackBerry Developers

Similar Questions

  • How can I select the files in a folder with the help of a list with the files you want and after that rename only the files using another list with desired new names?

    How can I select the files in a folder with the help of a list with the files you want and after that rename only the files using another list with desired new names?

    I have only:
    D: / images (where are necessary + not need files)
    -a list with only the necessary files
    -a list with new names for the files needed
    Thank you.

    Hi Pustiu,

    Thanks for posting in the Microsoft Community.

    You want to know how to select the files in a folder using a list with the files you want and after that rename only the files using another list with desired new names.

    I would have you post your query in the TechNet forums because it caters to an audience of it professionals.

    Your query will be better addressed there.

    Check out the link-

    http://social.technet.Microsoft.com/forums/en-us/w7itprogeneral/threads

    We know if you need help. We will be happy to help you. We, at tender Microsoft to excellence.

    Thank you.

  • List drop-down selection trigger change in the text field

    I'm hit a roadblock here. I'm on Adobe Acrobat XI and here's the scenario: I have a list box and a text box.

    Drop-down menu field has 3 caps (A, B, C).

    If A is selected, the text box = 15 default, but has the ability to change in the text box.

    If B or C is selected, the text box = 0 or "by default, but it has the ability to change in the text box.

    If I use an if/then with a .value, I'll be able to get the numbers to work, but do not have the ability to edit and keep them there. If I enter another number in another area, the JavaScript code will run and change the text box to 0 or 15.

    Any help would be greatly appreciated.

    Thank you

    Instead to use script logic for the text field, use the drop-down validation script. In this way, that it only will be triggered when you change the value in the drop-down list field, not when you change any field in the file (as the calculation script).

  • linking two fields and fill in the two field based on the list drop-down selection box 1

    I work for a small social service agency VERY small non-profit and I try to get our paperwork until the twentieth century. I hope someone here can help me. I have adobe acrobat, but not of other adobe products. I converted our word document that we use for client notes in fillable pdf format and so far everyone is excited to try it. I have a huge problem that I can't understand. I have a customer named created drop-down list box that contains a list of 300 customers. Box 2 is named customer ID and will contain a unique identification code assigned to each customer.

    For example:

    CUSTOMER ID customer JANE DOE 12345678

    So here is my question how can I ensure that when Unetelle is selected 12345678 is already filled in the second field?

    I fill the drop-down list with the names of customer and then enter the customer ID as the value of exports. Note You must have a unique name for each client.

    If your customer ID starts at zero, then you must use a custom JavaScript, so you can keep the zero non significant.

    For the customer ID field, you can use the following custom JavaScript code:

    Event.Value = this.getField("DropBoxFieldName').valueAsString;

    You will need to change DropBoxFieldName name of the drop-down list.

    You will need a mechanism for updating the new customer form and IDs names.

  • Addition of new entries in the metadata cart categories list drop down... possible?

    Generation using CS6, V5, 708.

    I would like to create/add a few more entries in the/category/cart metadata drop-down list of categories (the list with 'beds. (His Bits, commercials", etc.).

    Is this possible? This list mask a place that I can access and manipulate?

    Thanks for the knowledge.

    Caution. You can if you are brave enough to risk to change one of the parameters of the hearing files.

    The list is stored in C:\Users\"username"\AppData\Roaming\Adobe\Audition\5.0\AEScartMetadataSchema.xml. Everything do you back to the top of the file AEScartMetadataSchema.xml first renaming before trying to change the file so that you can replace it if things get screwed. You will need an XML file editing software of some sort that you will have to find out for yourself on the net.

  • Insert the subform based on list drop-down choice

    Is it possible to insert a subform of a choice of menu drop-down. I have attached a sample of what I am trying to accomplish. When you select Yes in the drop-down list the subform becomes visible. What I want is when the selection is not, so there is no space between the next set of questions. This form extends on more than 5 pages.

    Can be done with the following steps.

    1 record under pdf dynamic rather than static.

    2. change work subform presence of Invisible to hidden (exclude from layout) in your form.

    Please check the pdf seal updated.

    Rambeau.

  • With the help of a list in a clause Where Clause

    I try to use a dynamic list, in a where clause clause, not having much luck and we tried different ways.

    Here's the closest thing I can find, the only problem is that the output returns an error caused by comma in where criteria if the list contains several items.

    Any help would be greatly appreciated!

    SELECT is the name of my list by commas.

    < name cfquery = 'list' datasource = "#dbnm #" >
    SELECT *.
    Students
    When status = ' #x # ' and (id = #Listqualify(select,"") #)
    < / cfquery >

    When the use of lists in sql, you do not use an equal sign. You use the key word in. You must also put your list in parentheses.

  • List drop-down selection within html cfgrid

    I have a html with a drop-down list grid in one of the cells. Its a rerouting menu but for help a standard drop-down list doesn't do the same.

    When it is placed in the cfgrid controls everything works very well with respect to rendering, but the GUI acts a bit strange because of the dhtml and css involved in the controls cfgrid.

    In order to select something from the menu drop-down I have to click on the cell/row to select I want to interact with, so I have to double click it to expand the select control to select an option. Is anyway to bypass this and be able to simply select an item in the drop-down list normally?

    I've included the code for my CFCS that I link below

    Yes I actually solve the problem, but not in coldfusion... I have rebuilt the application in ASP.NET.

  • WebView: cannot scroll through long lists drop-down/select

    I added webview standard, but are unable to scroll through long lists on drop-down lists (html select). It shows just the best selections and im unable to scroll in the list to select something lower.

    Someone else has webview with selection lists for a long time who have this problem, or do NOT have this problem?

    the latest version of the OS fixed this! So update your OS to dev for the device and you should be ok!

  • Is it possible to add a list drop-down selection to a form of Muse, once exported to HTML etc?

    Hello

    I have created a form and make the features of Muse does not allow a form element to have a menu drop-down. However, I wonder if it is possible to add after you have exported the file HTML etc.? If so someone does know how to approach the issue? I realize there are other alternatives to the addition of forms such as Jotform, but they do not really state how I want that they.

    If anyone can give me a hand, it would be great!

    Hello

    check the last comment in the following thread, see if you can get something useful

    Contact form Widget Radio buttons & falling down

  • With the help of the UNION with apex_item.select_list_from_query_xl

    Hello

    I currently have problems with the help of apex_item.select_list_from_query_xl in a select statement with a UNION in it. I have a region of type SQL report and my statement looks like:

    SELECT apex_item.text (c004, 1, NULL, 10) val
    Of apex_collections
    WHERE collection_name = "TABS".
    AND c002 = 'NUMBER '.
    UNION
    SELECT Apex_item.select_list_from_query_xl (1, c004, 'SELECT display_value' |)
    'OF tab_select_list' |
    "WHERE tab_column_sysid = ' |" C005) val
    Of apex_collections
    WHERE collection_name = "TABS".
    AND c002 = 'SELECT LIST'

    (Basically I'm trying to establish a relationship with a text element and a list of selection in there).

    The problem is that some of my selection lists are more than 4000 characters long need to use the apex_item.select_list_from_query_xl. The error returned from the foregoing is ORA-01790: expression must have the same data type as the corresponding expression, which is fair enough as the apex_item.select_list_from_query_xl returns a clob and apex_item.text a varchar2. So I tried casting the apex_item.text on the type clob as follows:

    SELECT to_clob (apex_item.text (c004, 1, NULL, 10)) val
    Of apex_collections
    WHERE collection_name = "TABS".
    AND c002 = 'NUMBER '.
    UNION
    SELECT Apex_item.select_list_from_query_xl (1, c004, 'SELECT display_value' |)
    'OF tab_select_list' |
    "WHERE tab_column_sysid = ' |" C005) val
    Of apex_collections
    WHERE collection_name = "TABS".
    AND c002 = 'SELECT LIST'

    and now I get the error ORA-00932: inconsistent data types: expected - got CLOB, which is unexpected. Someone has ideas how to get around this?

    Thanks in advance...

    Please we say your first name and add it to your forum profile to help us. Thank you.

    Try UNION ALL instead of UNION.

    Scott

  • Problem of not seeing list drop-down connection to the wireless network when checking connections network - pc windows 7.

    Problem of not seeing list drop-down connection to the wireless network when checking connections network - pc windows 7.

    I just installed a Belkin modem-router - which went well. Can I connect WiFi gadgets etc. I can also connect to the internet via a network cable to my pc. I also installed a belkin usb wireless adapter and in Device Manager, says it is enabled and works.

    My problem is, I have no way of choice get a WiFi PC to display in the list (from the notification area) and cannot get the pc to give me options to create a wi - fi connection. The more I get to try to do that is "unexpected error"!

    If someone could help on this - I would be very grateful

    Good news - update of my ongoing saga with this Belkin modem/router.

    Got the pc to see wi - fi now. It turned out to be the Zone Alarm! As the router has a firewall, I uninstalled Zone Alarm completely. Also, I went into the properties of belkin usb and checked it was the most recent drivers, it does not so I installed them.

    So far so good

    Thanks for the help

    TREV Smith

  • Transparency of the IR on bottom of drop-down list filter in IE7

    Hello

    I have a problem with the transparency of the IR on bottom of drop-down list filter in IE7.

    Please try to access http://apex.oracle.com/pls/apex/f?p=36675:2 using IE7.

    If you click on the header of the IR to remove the filter down, we could see the bottom of the filter drop-down is semi-transparent and mix with the data in the table below. IT IS VERY difficult to read.

    The existing market research indicates it is already fixed in the 4.0.1 however I could reproduce still use IE, version 7.0.5730.11

    No help here please?

    Thank you ' case
    Ligon

    This has been answered in

    Re: Menu Transparent - Apex 4 - Bug?

    ======================
    Just add

    the head of the model to replace default css and problem solved

    Published by: Pakuuj on October 5, 2010 01:06
    ======================

  • ADD ITEMS TO THE LIST DROP-DOWN LIST TO A TEXT FIELD (USER ENTERS THE ITEM) AND ALSO RELATED TO VALUE

    Untitled.jpg

    I have WANTED to ADD of ELEMENTS from the list drop-DOWN OF THE AREA of TEXT (the ELEMENT NAME) WHERE the USER BETWEEN of THE DESCRIPTION of POINT

    AND RELATED value SHOULD ALSO BE ADDED to THE SAME ELEMENT.

    LIKEWISE REMOVE ITEMS IN THE DROP-DOWN LIST

    PLEASE GIVE SHAPE TO SAMPLE OR JAVASCRIPT FOR THE ABOVE SCENARIO...

    INDEED USEFUL FOR MY PROJECT PLEASE SEND PDF FORM

    Hi Praveen,

    You can add items to the list in a specific order, which would be to load the elements in an array, sorting and then load in the dropdown list drop-down list.  This would be in the click event of the button Add.

    Create a table to hold all the list items, table drop-down list contains objects with a property 'displayItem' and 'value '.

    dropDownItems var = [];

    Add the new

    dropDownItems.push ({displayItem: ItemName.rawValue, value: BoundValue.rawValue});

    Add existing ones

    for (var i = 0; i)< dropdownlist1.length;="">

    {

    dropDownItems.push ({displayItem: DropDownList1.getDisplayItem (i), value: DropDownList1.getSaveItem (i)})

    }

    Sort by ascending order of displayed text

    () dropDownItems.sort

    function (a, b)

    {

    If (a.displayItem< b.displayitem)="" return="">

    If (a.displayItem > b.displayItem) return 1;

    return 0;

    });

    clear all items

    DropDownList1.clearItems ();

    load the sorted items

    for (var i = 0; i)< dropdownitems.length;="">

    {

    var dropDownItem = [i] dropDownItems;

    DropDownList1.addItem (dropDownItem.displayItem, dropDownItem.value);

    }

    clear the fields of the source

    ItemName.rawValue = null;

    BoundValue.rawValue = null;

    I added a button 'Add' sorted in my sample https://workspaces.acrobat.com/?d=OwysfJa-Q3HhPtFlgRb62g

    Concerning

    Bruce

  • Try using the drop-down selection list but is a different

    Hi all

    ILO, at a loss, what I'm doing wrong here. Trying to change a field (previously in the textfield) a menu drop-down selection list. All works except one. Looks like a multidirectional selector, even if I put the type in the List select


    http://i.imgur.com/Hz7tP.PNG

    Had no idea of what I need to do to change from falling. Thank you very much.

    You set the height = 4 for the element. You're the problem.
    Make the height = 1.

    Kind regards

Maybe you are looking for

  • How can I retrieve my security question answers

    I'm trying to get the answers to my security questions

  • Desktop screen problem

    Why the my screen is all white, with the exception of a 2 "wide strip of top down on the left side, only on the screen? Thing I do is the way that it supposed to be. It's just like that on the desktop. And when the pc is turned on, it appears the des

  • HP pro book 6570b: access website

    Before I did a factory reset I used to be able listen to music sites Internet Bearshare and Imesh, but I can't connect to these sites now I am told is not available, try later its been three days now and although I've uninstalled and reinstalled a fe

  • How to return to original xp from Windows 7 trial download

    Windows 7 trial spent time how do I change back to windows xp of origin

  • How to make a slow animation more smooth on Youtube?

    I fear that this a problem that can be solved, but I'll try:Here's the video of example of what I'm talking about: gloriam testi - YouTubeThe video made with After Effects CS6. There is a slow 'moving camera"and a movement slow light of flares. The p