How to read data from the drop-down list

Hi all

I use this to display a drop-down list.

inputScreen.add (new NumericChoiceField ("number of objects:", iStartAt, iEndAt, iIncrement, iSetTo));

How to read the data selected by the user? say if my list contains from Monday to Saturday, how will I know what day selected by the user? and how that store in the variable? Thank you.

You have your data in a table and this stone he is used to populate the ObjectChoiceField. The FieldChanged listener you can obtain what the iteme selected to help index:

int index = yourObjectChoiceField.getSelectedIndex ();

and for the use of the object:

Bean of MyObject = myObjectArray [index]

Tags: BlackBerry Developers

Similar Questions

  • Data from the drop-down list box database

    Hello

    I'm trying to understand how to add information from a database to a drop-down list box. I read two columns, the first is used as the element and the second for the value. There are several lines in the table, and I need an entry for each. Currently, he adds only a single entry. The vi is attached.

    Thank you

    Chris

    Hi again,

    Attach a VI... Is that what you mean?

  • How to pass data in the drop-down list to two separate outputs

    Hi all

    currently I have a drop-down list named chg with this value:
    ValeurRet += "< option >" + bean.getCode () + "-" + bean.getDescr () + "< / option >";
    Therefore, the value of my combo would be sth like this: 00000 - something

    the problem is that when I recover data return selected in the list, the value will be a string as above and not two separate the value.

    I need to pass the value here in order for me to compare the string containing the data in my database:
    nim.setCode (RutString.getParameterToString (request, "chg"));
    nim.setDescr (RutString.getParameterToString (request, "chg"));

    Now the data in my database is the following:
    Code: 00000
    DESC: something

    given that the above value is contained in the chg rather than the reverse, I couldn't use AS for my select statement.

    So is it possible for me this problem? Thnks in advance for your help!

    You can do two things:
    (1) pass the selection string from the sql query and use the sql functions (or pl/sql) to cut the chain and use only the part you are looking for (SQL has a SUBSTR function and others that allow you to do this)
    (2) you want to at any time in your workflow in a java class, you can do this with the String methods and the parts of the query string.

    Timo

  • Select from the drop-down list and populate a list in another menu drop down

    I have a drop down list with 10 items in the list. If possible, would like for a selection in the drop-down list to populate a drop-down list with another list of selections. Each of the 10 points in the first list each will have a list of different options in the second drop-down list. I don't know how to build this solution.

    Thank you

    MDawn

    Hello

    It was because of the clear rawValue script that I put in the output from the drop-down list event businessFunction.

    I fixed it:

    // clear the current selection in the department dropdown
    dept0.rawValue = null;
    dept0.execEvent("exit");
    

    https://Acrobat.com/#d=MrWYQbTZIR7xJQDlm5ZSLg

    Good luck

    Niall

  • Update from the drop-down list on the duration

    Hello, I'm fairly new to Java and Blackberry development.

    I am doing an application with a few editable text fields and drop-down lists. What I want to do is to change the options from the drop-down list (ObjectChoiceField), according to what is written on the text fields, all without pressing a button. Can someone give me a hand here? I thought to use invalidateAll to redraw the field, but I'm not sure.

    Thank you.

    OK, something else, this looks bad for me:

    your having

    unitChoiceField.setChangeListener (editListener);

    But editListener is not defined until after that, so with that statement, you're

    the listener of null changes.

    Put this line after you set your headset to changes.

    Also we say something "does not work", is not very useful.  If please do some debugging and tell us what he does not she should do this, rather than saying that it does not work.  Imagine that you took your car be fixed and told them that it did not work.  Would they be able to fix it?

  • Impossible to delete previously selected items from the drop-down lists at the click of the button Reset on a page of the screen.

    Hello

    I'm unable to clear previously selected items from the drop-down lists at the click of the button Reset on a page of the screen. The code I did to clear the previous value when the click on the button Reset is as below.

    {} public void onReinitialize (ActionEvent actionEvent)

    System.out.println ("onReinitialize is called ::");

    UIComponent uiComp = actionEvent.getComponent ();

    If (uiComp is nothing)

    {

    otherwise we use the button that we linked to that bean

    uiComp = getButtonResetByBean ();

    _logger.info ("reset fields: buttonID =" + uiComp.getId ());

    }

    on the other

    {

    _logger.info ("reset fields: CompID =" + uiComp.getId ());

    }

    Pass the component inside the uniforms, UIXForm, UIXSubform, UIXRegion, UIXPopup, RichCarousel

    or RichPanelCollection that contains the components to reset

    getTextIDLOV () .setValue (null);

    ResetUtils.reset (uiComp);

    }

    ---

    Using this code Iam able to clear the entrance to the text box but can not clear previously selected items from the drop-down lists when the reset button is clicked

    Can anyone please help on this issue.

    It's simple, you can set GenerateIsNullClauseForBindVars = "false" in the viewCriteria who created in EmployeeView

    After doing that it will fill the list of employees only after the Department selection

    Again check the enclosed application

    Ashish

  • XLATLONGNAME from the drop-down list should be a default value in the edit box

    Hello


    I have two fields in a grid, one named "TEST_Type" and one is named 'TEST_Name' edit box
    Use cases, TEST_Name by default will be TEST_Type in Drop Down.

    "TEST_Type" is the translation of edition Table and 'TEST_Name' will contain XLATLONGNAME.

    I do drag XLATLONGNAME of PSXLATITEM table in my grid and make related field and "TEST_Type" a related control field.

    Show LongName according to the value "TEST_Type.

    If the field 'TEST_Name' RowInit, I wrote

    If GetRow(). IsNew and
    No (MYRecord.TEST_NAME. Value) then
    MYRecord.TEST_NAME. Value = GetRow(). GetRecord (Record.PSXLATITEM). GetField (Field.XLATLONGNAME). Value;
    End - If;


    It gives an error

    "Class line method GetRecord account PSXLATITEM is not valid. (2 268)

    MYRecord.TEST_NAME. RowInit

    The recording has been used as a parameter of the specified method. It is not valid for the current object. »

    What is the problem?

    Is there a better solution for this use case?


    Thanks in advance

    I think you mix a few think upwards.

    The drop is on a class with the values of translate. So, when you set the property to the field from the drop-down list page to view the longxlatitem, you are finished.

    If you want to copy the xlatlongvalue for some reason any other areas, use instead the domain object properties.

    & dropdownlownlist = getrecord([YOUR_RECORD]).getfield ([YOUR_FIELD]);
    VALUE = & dropdownlownlist. LongTranslateValue;

    Kind regards

    Halin

  • Items from the drop-down list

    Is there a a way to get objects from the drop-down list to open the user clicking on the object itself (without using the button)?

    Look at this example of Niall:

    http://www.assuredynamics.com/index.php/portfolio/custom-dropdown-lists/

  • How to remove a contact from the drop-down list?

    How to remove a contact when, if forwarding a message, the icon flashes in space 'To' to enter the email address, when you press the first letter of a recipient, it displays a list of previous names/addresses used. This can add to a huge list! Most of the time, it is useful, but how can I shorten the list by removing unwanted contacts in the drop-down list? I got them removed from my address book/contacts (and they are deleted) but even after re-booting the computer, their names still appear in the drop-down list as before. All solutions?

    Instead of typing the first letter of the name of the recipient

    Press on the envelope icon to next to the box where you type the name of the recipient

    Opens the selection of recipients

    Highlight the recipient of choice

    Click on the button to

    The name appears in the window of the recipient of the Message

    Windows CC and British Colombia should remain virgins

    Press Ok

    The name of recipients appears in the field to the message

  • How to call a taskflow based on results from the drop-down list. ?

    Hello

    I want to call a taskflow based on the results of the drop-down list, I have a drop down list with LOV, if I choose a value insofar as it must call the taskflow are entrusted to him. How to do this. ?. How to assign a taskflow for all values and how to call it. Someone please help...

    Page:

    http://Java.Sun.com/JSP/page"version ="2.1 ".

    xmlns:af ="http://xmlns.oracle.com/adf/faces/rich" >. "

    valuePassThru = 'true '.

    valueChangeListener = "#{SelectBean.onSelection}" > "

    Main.XML (TaskFlow);

    http://xmlns.Oracle.com/ADF/controller"version ="1.2">

    Choose

    Choose.JSFF

    /Web-INF/FirstTF.XML

    FirstTF

    /Web-INF/SecondTaskFlow.XML

    SecondTaskFlow

    Choose

    First

    FirstTF

    Second

    SecondTaskFlow

    Code VlaueChange Listner already told you.

    First and second pages only contain output text component in my example. I think that is not necessary

    Concerning

    Vincent

  • Dynamic region on the change from the drop-down list of values

    Hi Experts,

    Using the concept of dynamic region, I tried to use buttons as I have 4 buttons and clicking on each button, I am loading the particular taskflow. I used setPropertyListener and type = action to achieve this.

    I have a similar requirement, but I need to use the drop down list here...

    < af:selectOneChoice value = "#{mybean.value}" >

    < f: selectItem itemLabel = "First" Valeurelement = "FirstValue" / > "

    < f: selectItem itemLabel = "Second" Valeurelement = "SecondValue" / > "

    < f: selectItem itemLabel = "Third" Valeurelement = "ThirdValue" / > "

    < f: selectItem itemLabel = "fourth" Valeurelement = "FourthValue" / > "

    < / af:selectOneChoice >

    How can I dynamically load a region on the value selected by the user on top of the data. On the change of the value in the drop-down list, I need to load this particular dynamic region

    JDeveloper version 12.1.3

    Thanks in advance.

    You use a listener to change value of the duo down and detect the region according to the new value of the duo down.

    Timo

  • Select from the drop-down list point based on text box is not empty not

    Hello. I have a javascript code to click a button and it will insert the date in a text box named "Controller_PDF_Creation_Doc_Control_Date" in my form. I also have a drop-down list called 'Release_Approval_Initials '. Everything I'm doing is when there is a date of entry in the text box, I want that the 'Release_Approval_Initials' of the menu drop-down default by selecting the option "TM". The drop-down list is filled dynamically too. How can I do this? Here is the code I have.

    < SCRIPT LANGUAGE = "JavaScript" >

    verify() {} function

    var partNumber = ";

    var ecoNumber = ";

    var pdfDate;

    var queue;

    var queueValue = ";

    var allArray = document.getElementById('listofids').value.split (",");

    var error = false;

    for (var i = 0; i < allArray.length; i ++) {}

    pdfDate = document.getElementById('Controller_PDF_Creation_Doc_Control_Date'+allArray[i]).value;

    <!-document.getElementById ('Controller_PDF_Creation_Doc_Control_Date1') .value =' 19 / 08/11 '; ->

    queue = document.getElementById ('Release_Approval_Initials' + allArray [i]);

    queueValue = tail [queue.selectedIndex] .value;

    If ((pdfDate! = '' & & queueValue == '') |) (pdfDate == '' & & queueValue! = '')) {

    error = true;

    ecoNumber = document.getElementById('ECID'+allArray[i]).value;

    partNumber = document.getElementById('Part_Number'+allArray[i]).value;

    Alert ("You must enter a date of authorization to create PDF or Doc Control files and the queue to release for ECO" + ecoNumber + "part number:" + partNumber);

    }

    }

    {if (Error)}

    Returns false;

    }

    else {}

    Returns true;

    }

    }

    < /script >

    "< cfinput type ="Text"name =" "Controller_PDF_Creation_Doc_Control_Date #ItemID #" id = "Controller_PDF_Creation_Doc_Control_Date #ItemID #" value = "#DateFormat(Controller_PDF_Creation_Doc_Control_Date,"M/D/YY")" # "size ="12"maxlength ="8"validate ="date"required ="no"message ="you must enter a valid date in the format m/d/YY in the creation of PDF files or Doc control Date">"

    < cfinput type = "hidden" name = "today_date" id = "today_date" value = "#DateFormat (now ()," D/M/YY")" # "/ >"

    < input type = "button" value = "today's Date" onclick = "document.getElementById('Controller_PDF_Creation_Doc_Control_Date#ItemID#').valu e = document.getElementById ('today_date') .value" >

    < select name = "" Release_Approval_Initials #ItemID # "id =" Release_Approval_Initials #ItemID #">"

    < option value = "" > < / option >

    < cfloop query = "ShowDataEntryInitials" >

    < option value = "" #Initials # ""

    < cfif initial EQ ReleaseInitials > selected

    < / cfif > > #Initials # < / option >

    < / cfloop >

    < / select >

    Any help would be greatly appreciated. Thank you.

    Andy

    I figured out how to make it work. I just had to add parentheses in the right places to make it work. Here's what I did:

  • Automatically populate a drop-down list by using another selection from the drop-down list box

    New java/preparation forms so I apologize in advance.

    I currently have a menu drop-down box 1 (Occupation) with three options: "enter your own description/blank", retired housewife. When someone chooses either retirement or anyone at home, I would another drop box 2 (employer) to assign automatically "n/a. . The employer drop box has only two options: "enter your own/blank", N/A.

    Far, I could for that box to fill but only when the person clicks in the box (as if they were about to enter their own text.) Then only it will fill the drop-down list "employer." I would like it auto fill once the person has chosen retired, Virgin or stay-at-home woman without having to enter in the box (just using the arrow to the size of the drop-down list box).

    I currently have a key shot that resets the employer box when a person chooses the option vacuum/enter your own option. I then a JavaScript (only for the housewife now) that only works if you click the box of. Key combination works I want to than the other options work as well. If the client settles on white, the choice of the employer updates automatically empty without having to click in the box of. Any help (including general advice to make my code cleaner) is very appreciated!

    Current script of typing:

    If {(event.willCommit)

    If (event.value == "") this.resetForm (["use"]); of other SetFieldValues (event.value);

    }

    The current upward, mice running JavaScript :

    var v = this.getField ("Occupation") .value

    If (v is "Housewife")

    1. this.getField("Employer").value = "N/a".

    I think maybe I should use event.willCommit in my formula, but I'm not sure how to include it.

    Thank you!

    I would not use the key sequence or MouseUp actions for this, but the action post.

    Just make sure that you set the field option to validate the selected value immediately (under Properties - Options) and then use this code as the custom validation script:

    var employerField = this.getField("Employer");
    if (event.value=="Homemaker" || event.value=="Retired")
        employerField.value = "N/A";
    else employerField.value = employerField.defaultValue;
    
  • Restore the default value from the drop-down list

    Hyperion Inreatctive reports.

    I have an embedded in a dashboard report.  I drag the lists that filter the report.  Filter feed results and it works fine.

    I want to put a command button on the dashboard that restores the default values from the dropdown lists.  I have a selection in each drop-down menu, 'all '.  "All" is the default value.

    For example, for the year

    drop_Year

    for the region:

    drop_Region

    What command should I put on the command button that any value is displayed in the drop-down lists of this command, restore it to "all"?


    Watch the Select() method

    w

  • Criterion from the drop-down list value null | " "

    I wrote a script to sign before testing a value in a drop-down list before allowing the signing of the document. However, I want to test a null plus a space aka "". "" I added a value in the drop-down list of "" as well as the choice of names for users could erase an accidental in this list selection before they were ready. However when I place the operator (|) in the case or statement of the script, the script does not work. If I remove the | "" declaration the script works as it is supposed to. " How to test for this value of "" as well as the test null so I don't have to write a further statement?

    If (form1. Page3.author.reviewed.admin.RawValue == null | " ")

    {

    xfa.event.cancelAction = 1

    xfa.host.messageBox ("you have not selected your name on the drop-down list before trying to sign the document.");

    }

    on the other

    {}

    ;

    If the declaration is incomplete. You need to test again for the other value:

    If (form1. Page3.author.reviewed.admin.RawValue == null | Form1. Page3.author.reviewed.admin.RawValue == "") ""

Maybe you are looking for

  • Where are my downloads?

    I don't know where to go to find my downloads.

  • Airport Extreme control app won't load on EL Capitan

    Two questions really.  I was looking for a complete manual for the AIrport Extreme, so I could find our wha that the capacity is before, I bought.  All I could find were manual installation.  Same story when I rang Applecare. It appeared that the onl

  • Return the string Date/time format incorrect output...

    Here's a small sub - VI that I create out the day of the week, day of month, month and year in the form of a table of U16: The Date/time string VI get is supposed to produce a string of date in the format "DD/MM/YY" when the enum 'short' is selected.

  • construction of a simple blinking light

    Hello I'm new to multisim and just installed the Multisim on my lap. To get started, I started with the light flashing, which will be part of my scheme. But I am unable to view his response on Osciloscope.Can someone please help me with this. I used

  • Microsoft Fix It error Code

    Hello I thought I should inform Microsoft of the error code while using Microsoft Fix IT. 0 x 80092003. This would happen while searching for the resolution of the Net Frame work KB2539636 ewrror code 0 x 643 and 0 x 80240016 also 0x80224402c. I was