Can I Display a Selection or Combo box using MIDP

Hey All,
How can I display a Selection or Combo box in My Form Using MIDlet. Please send a Way to do this. Thanks in Advance.

Hi
use 'List' for displaying menu..
check the api for 'javax.microedition.lcdui.List' class
regards
williams

Similar Messages

  • When i change the value of a combo box using a property node it displays the value not the item label

    I am using a combo box as a select list for text serial commands.  I have items like "engineering", "GUI", and "Scan" for the commands "MDE", "MDN", and MDS respectively which i have input as the corresponding value in the combo box.  so for example the label "engineering" has the value "MDE" in the combo box items list.  when the Vi starts it needs to read the current value MDE, MDN, or MDS and then i want it to display on the front panel the item text corresponding to that command value.
    To do this i have tried to read the serial command, ie MDS and then wire that to a "value" property of a property node of the combo-box, but instead of displaying the corresponding item label, "Scan", it displays the value "MDS" on the front panel instead.  i want the front panel to use the label text when choosing and displaying but the block diagram to use the serial commands.  Can this be done with a combo box?  I'm trying to use a combo box so i can keep it all text and avoid having to build a case statement to convert enums or rings from a numerical value to the text command.
    The correct text value is wired to the value property and it does exist in the combo-box.  I have unchecked "values match items" and selected to not allow undefined values.

    Don't use the value property node.  Use the Text.Text property node.  When creating the property node, select Text, then in the next pop-up box, select Text.
    - tbob
    Inventor of the WORM Global

  • Calling a bean method on select of Combo box item

    Hi
    On select of Combo box item in a form, text fields in the same form should be populated
    dynamically.Is it possible to call a bean method which does this,by calling onSelect() method
    of combo box ?
    Thanks in advance,
    Sridevi

    Uff, sorry!
    I ment that you write some code for the "onSelect" event which sends a request to the server with the selected value: onSelect="self.location.href='<%= request.getRequestURI()%>?selectedVal= ' + this.selectedIndex;"

  • How to show default value selected in combo box...

    Hi,
    I need an help...
    I have a combo box and i want to show the default value(coming from DB) selected on combo box on Page Render.
    Thanks,
    Neha

    Hi,
    Will this help?
    database default value in selectOneChoice
    Set default selected value in a SelectOneChoice
    Regards
    Vishal

  • Default Selection in Combo Box

    Hi,
    I have a query regarding combo box. I have populated combo box using UserDataSources. Is it possible to make a default selection of an Item in combo box.
    Regards
    Ronald

    Hi Ronald,
                   I  hope the following code helps
                           Dim oComboVal1 As SAPbouiCOM.ComboBox
                           Dim oCol As SAPbouiCOM.Column
                           oCol = oMatrix.Columns.Item("V_12")
                            oComboVal1 = oCol.Cells.Item(Row).Specific
                            oComboVal1.Select(0, SAPbouiCOM.BoSearchKey.psk_Index)
                            here
    Regards
    V.Rangarajan

  • How can I display JTextFields correctly on a JPanel using GridBagLayout?

    I had some inputfields on a JPanel using the boxLayout. All was ok. Then I decided to change the panellayout to GridBagLayout. The JLabel fields are displayed correctly but the JTextField aren't. They are at the JPanel but have a size of 0??? So we cannot see what we type in these fields... Even when I put some text in the field before putting it on the panel.
    How can I display JTextFields correctly on a JPanel using GridBagLayout?
    here is a shortcut of my code:
    private Dimension sFieldSize10 = new Dimension(80, 20);
    // Create and instantiate Selection Fields
    private JLabel lSearchAbrText = new JLabel();
    private JTextField searchAbrText = new JTextField();
    // Set properties for SelectionFields
    lSearchAbrNumber.setText("ABR Number (0-9999999):");
    searchAbrNumber.setText("");
    searchAbrNumber.createToolTip();
    searchAbrNumber.setToolTipText("enter the AbrNumber.");
    searchAbrNumber.setPreferredSize(sFieldSize10);
    searchAbrNumber.setMaximumSize(sFieldSize10);
    public void createViewSubsetPanel() {
    pSubset = new JPanel();
    // Set layout
    pSubset.setLayout(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    // Add Fields
    gbc.gridy = 0;
    gbc.gridx = GridBagConstraints.RELATIVE;
    pSubset.add(lSearchAbrNumber, gbc);
    // also tried inserting this statement
    // searchAbrNumber.setText("0000000");
    // without success
    pSubset.add(searchAbrNumber,gbc);
    pSubset.add(lSearchAbrText, gbc);
    pSubset.add(searchAbrText, gbc);
    gbc.gridy = 1;
    pSubset.add(lSearchClassCode, gbc);
    pSubset.add(searchClassCode, gbc);
    pSubset.add(butSearch, gbc);
    }

    import java.awt.*;
    import java.awt.event.*;
    import javax .swing.*;
    public class GridBagDemo {
      public static void main(String[] args) {
        JLabel
          labelOne   = new JLabel("Label One"),
          labelTwo   = new JLabel("Label Two"),
          labelThree = new JLabel("Label Three"),
          labelFour  = new JLabel("Label Four");
        JLabel[] labels = {
          labelOne, labelTwo, labelThree, labelFour
        JTextField
          tfOne   = new JTextField(),
          tfTwo   = new JTextField(),
          tfThree = new JTextField(),
          tfFour  = new JTextField();
        JTextField[] fields = {
          tfOne, tfTwo, tfThree, tfFour
        Dimension
          labelSize = new Dimension(125,20),
          fieldSize = new Dimension(150,20);
        for(int i = 0; i < labels.length; i++) {
          labels.setPreferredSize(labelSize);
    labels[i].setHorizontalAlignment(JLabel.RIGHT);
    fields[i].setPreferredSize(fieldSize);
    GridBagLayout gridbag = new GridBagLayout();
    JPanel panel = new JPanel(gridbag);
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.weightx = 1.0;
    gbc.weighty = 1.0;
    gbc.insets = new Insets(5,5,5,5);
    panel.add(labelOne, gbc);
    panel.add(tfOne, gbc);
    gbc.gridwidth = gbc.RELATIVE;
    panel.add(labelTwo, gbc);
    gbc.gridwidth = gbc.REMAINDER;
    panel.add(tfTwo, gbc);
    gbc.gridwidth = 1;
    panel.add(labelThree, gbc);
    panel.add(tfThree, gbc);
    gbc.gridwidth = gbc.RELATIVE;
    panel.add(labelFour, gbc);
    gbc.gridwidth = gbc.REMAINDER;
    panel.add(tfFour, gbc);
    final JButton
    smallerButton = new JButton("smaller"),
    biggerButton = new JButton("wider");
    final JFrame f = new JFrame();
    ActionListener l = new ActionListener() {
    final int DELTA_X = 25;
    int oldWidth, newWidth;
    public void actionPerformed(ActionEvent e) {
    JButton button = (JButton)e.getSource();
    oldWidth = f.getSize().width;
    if(button == smallerButton)
    newWidth = oldWidth - DELTA_X;
    if(button == biggerButton)
    newWidth = oldWidth + DELTA_X;
    f.setSize(new Dimension(newWidth, f.getSize().height));
    f.validate();
    smallerButton.addActionListener(l);
    biggerButton.addActionListener(l);
    JPanel southPanel = new JPanel(gridbag);
    gbc.gridwidth = gbc.RELATIVE;
    southPanel.add(smallerButton, gbc);
    gbc.gridwidth = gbc.REMAINDER;
    southPanel.add(biggerButton, gbc);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(panel);
    f.getContentPane().add(southPanel, "South");
    f.pack();
    f.setLocation(200,200);
    f.setVisible(true);

  • Dependent combo boxes using webservice

    Hi All,
    I'm trying to create a depended combo boxes using af:selectOneChoice, using webservice datacontrol. When i try to change the value of the first combo box which has hard coded values (eg. Continent), The depended combo box (eg.Country) is empty. (which is returned via webservice) When i again change the value of the first combo box, I get the corresponding values(Countries) generated. The very first time when a value is selected is not binded to the model. Why is this happening and how to overcome this issue. I tried using the value change listener and assigned the current value to binding but there was no change in the behaviour.

    Thanks for your response Frank. The Sample worked fine. But when i try to implement the same i ran into issues.
    First, I created a combo box for continents and a managed bean.
    <af:selectOneChoice label="Region" id="soc1" autoSubmit="true"
                                  valueChangeListener="#{locateBean.setRegion}">
                <af:selectItem label="Asia" value="Asia" id="si3"/>
                <af:selectItem label="Europe" value="Europe" id="si2"/>
                <af:selectItem label="NA" value="NA" id="si1"/>
              </af:selectOneChoice>Then I created a combo box for countries using the webservice data control.
              <af:selectOneChoice value="#{bindings.Country.inputValue}"
                                  label="Country"
                                  required="#{bindings.Country.hints.mandatory}"
                                  shortDesc="#{bindings.Country.hints.tooltip}"
                                  id="soc2" partialTriggers="soc1">
                <f:selectItems value="#{bindings.Country.items}" id="si4"/>
              </af:selectOneChoice>In the managed bean as
        public void setRegion(ValueChangeEvent event) {
            this.region = (String)event.getNewValue();
        }1. When i run and select an continent, the values are not getting populated in the country combo box. If i refresh the page or select another value for the continent, then its is getting populated.
    2. When i tried to execute the operation manually at pagedef on value change event,
            OperationBinding operBinding = getBindings().getOperationBinding("GetCountryList");
            operBinding.execute();I'm getting an warning as <FacesCtrlListBinding> <getInputValue> ADFv: Could not find selected item matching value Afghanistan of type: java.lang.String in the list-of-values.Why the value binded to the managed bean or model is not getting updated for the first time. Is this the expected behavior.

  • Display Record Based on Combo Box Selection

    Hi
    Using Flash Builder 4.6.
    I have a combo box that lists names stored in a mysql database. Once the user selects a name from the combo box, I would like to have the complete record display on a form.  Can you please point me in the right direction to accomplish this task?
    Thanks

    Hi
    Using Flash Builder 4.6.
    I have a combo box that lists names stored in a mysql database. Once the user selects a name from the combo box, I would like to have the complete record display on a form.  Can you please point me in the right direction to accomplish this task?
    Thanks

  • Can't select a combo box?

    I'm fairly new to Flash and am having a little problem.
    Basically I have a the top of a clipboard visible at the
    bottom of the screen. When it is rolled over the clipboard rises up
    from the bottom until it is completely visible on the stage. I did
    this by creating a movieclip containing the picture of a clipboard
    and tweening it to come up, and then reversing it to go back down.
    I placed stop actions at the beginning of the movieclip, the fully
    visible position, and a gotoAndStop command at the end of the
    movieclip to return it to the start. I placed the movieclip on the
    stage, and used onRollOver and onRollout events to trigger the
    tweens.
    To ensure that the bottom of the clipboard isn't visible when
    the clipboard is off screen, I added a mask over the stage area so
    that only the portion of the clipboard on the stage will ever be
    visible.
    Here comes the question: Now I need for the clipboard to
    display a few questions with combo boxes that the user can select
    and choose an answer from when the clipboard is in it's fully
    visible position. I can get the questions onto the clipboard by
    placing them in their own layer within the movieclip. However, I
    can't make the combo boxes selectable. Is this a focus problem? Do
    I just have the questions layer in the wrong place? Does any of
    this even make sense? Any help would be greatly appreciated.

    I'm fairly new to Flash and am having a little problem.
    Basically I have a the top of a clipboard visible at the
    bottom of the screen. When it is rolled over the clipboard rises up
    from the bottom until it is completely visible on the stage. I did
    this by creating a movieclip containing the picture of a clipboard
    and tweening it to come up, and then reversing it to go back down.
    I placed stop actions at the beginning of the movieclip, the fully
    visible position, and a gotoAndStop command at the end of the
    movieclip to return it to the start. I placed the movieclip on the
    stage, and used onRollOver and onRollout events to trigger the
    tweens.
    To ensure that the bottom of the clipboard isn't visible when
    the clipboard is off screen, I added a mask over the stage area so
    that only the portion of the clipboard on the stage will ever be
    visible.
    Here comes the question: Now I need for the clipboard to
    display a few questions with combo boxes that the user can select
    and choose an answer from when the clipboard is in it's fully
    visible position. I can get the questions onto the clipboard by
    placing them in their own layer within the movieclip. However, I
    can't make the combo boxes selectable. Is this a focus problem? Do
    I just have the questions layer in the wrong place? Does any of
    this even make sense? Any help would be greatly appreciated.

  • Displaying text in a combo box.

    Hi, i was wondering if anyone could help me finish an application i am working on. I have two forms, one inputs dat to a text file and another retrieves it. i want to display the text in a combo box and then click an event in the combo box and a description
    of the event will appear in a text  box, also if i select a date on the second form the events in the combo box change for that date if there is events for it. the first form is working fine , i was looking for help with the second one please. my code
    so far is:
    namespace TicketInformation
       public partial class TicketInformationForm : Form
          public TicketInformationForm()
             InitializeComponent();
          //creating the community events list.
          List<Community_Event> CommnunityEvents;
          //create the Create Event list method.
          private void CreateEventList()
             CommnunityEvents = new List<Community_Event>();
             // call the extract Data method.
             ExtractData();
             //Clear any events from the combo box before proceeding.
             eventComboBox.Items.Clear();
             //for each event item in the Commuity event list,add it to the eventComboBox.
             foreach (Community_Event item in CommnunityEvents)
                eventComboBox.Items.Add(item.Description);
             //if the events count is greater then 0, display the following
             if (CommnunityEvents.Count > 0)
                //if there are no events for the date selected display the following
                eventComboBox.Text = " -Events- ";
                descriptionTextBox.Text = "Pick an event";
             }//end if
             else
                //if there are no events for the date selected display the following
                eventComboBox.Text = " No Events ";
                descriptionTextBox.Text = "No events today.";
             }//end else
          //Creating the Method ExtractData
          private void ExtractData()
             CommnunityEvents.Clear();
             // load the data from the file
             List<Community_Event> tempList = new List<Community_Event>();
             //string[] fileLines = File.ReadLines(@"C:\Users\IAN\Documents\calendar.txt");
             foreach(string line in File.ReadLines("calendar.txt"))
                string[] items = line.Split(",".ToCharArray());
                if (items.Length >= 5)
                   Community_Event newEvent = new Community_Event();
                   newEvent.Day = Convert.ToInt32(items[0]);//Converting the Integer to a string.
                   newEvent.Time = items[1];
                   newEvent.Price = Convert.ToDecimal(items[2]);//Converting the decimal to a string.
                   newEvent.Event = items[3];
                   newEvent.Description = items[4];
                   //add the new events to the Comminity Events list.
                   CommnunityEvents.Add(newEvent);
             CommnunityEvents = (from ev in tempList
                                          where ev.Day == 1
                                          select ev).ToList();
          private void dateMonthCalendar_DateChanged(object sender, DateRangeEventArgs e)
             //calling the create event list method to display any events in the eventscombo box.
             CreateEventList();
          private void eventComboBox_SelectedIndexChanged(object sender, EventArgs e)
          private void descriptionTextBox_TextChanged(object sender, EventArgs e)
          private void TicketInformationForm_Load(object sender, EventArgs e)
             //calling the create event list to open the form with today's events displayed if any.
             CreateEventList();
     public class Community_Event
          //Declare a DayValue property of type int
          private int DayValue;//day of the event
          public int Day// Name of the Property
             get
                return DayValue;
             set
                DayValue = value;
          //Declare a TimeValue property of type string
          private string timeValue;//time of the event
          public string Time// Name of the Property
             get
                return timeValue;
             set
                timeValue = value;
          //Declare a priceValue property of type Decimal
          private decimal priceValue;//price of the event
          public decimal Price// Name of the Property
             get
                return priceValue;
             set
                priceValue = value;
          //Declare a eventNameValue property of type string
          private string eventNameValue;//name of the event
          public string Event// Name of the Property
             get
                return eventNameValue;
             set
                eventNameValue = value;
          //Declare a DescriptionValue of type string
          private string DescriptionValue;//description of the event
          public string Description// Name of the Property
             get
                return DescriptionValue;
             set
                DescriptionValue = value;
    Thanks
    D

    Hi Dylan2412,
    According to your description, you'd like to pass the ComboBox.Text to the second form's TextBox.
    In Form1:
    private void button1_Click(object sender, EventArgs e)
    Form2 f2 = new Form2(this.comboBox1.Text); //pass the comboBox1.Text
    f2.Show();
    In Form2:
    public Form2(string s) //get the string;
    InitializeComponent();
    this.textBox1.Text = s;
    You could get the comBoBox refer to this sample above.
    If you have any other concern regarding this issue, please feel free to let me know.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to populate a list box linked to selection in combo box?

    Hi All,
    I am a beginner in Xcelsius. I am having problem on how to populate a list box based on the selection on my combo box.
    I have a combo box and a list box.  The combo box value consist of Countries. Values are:
    Singapore
    Indonesia
    Thailand
    When I select, for i.e. Indonesia, I want to populate the list box with all the Postal Code of Indonesia. When I select Thailand, i want to do the same.
    Can anyone shed some lights on how to achieve this?
    My spreadsheet data is as follow
    Country         Postal Code
    Singapore     680123
    Singapore     680124
    Singapore     680125
    Indonesia     155123
    Indonesia     155124
    Indonesia     155125
    Indonesia     155126
    Thailand       333123
    Many Thanks,
    Harianto

    Hi,
    I am detailing the complete steps below:
    In the combobox select the entire range of Country while seeing the records from the Combobox, Xcelsius will automatically show the unique values in the selection.
    After that in the "Data Insertion" section for Combobox select the "Insertion Type" as "Filtered Rows" (please click on the question mark beside this option and it will show how the selection works).
    In the source select the postal code, in the destination select the range which will be used as a data source for the list box.
    This will resolve the concern. Please remember to select the question mark beside the "Insertion Type" option, it explains the working in specific details.
    Best of luck.
    Regards,
    Gourav

  • Default selection in combo box at struts form

    hi friends..i am new person in struts form..this is my prg.. display combo box value in 18. but i want 20...how to write program....plz anybody help me....thank you............
    <%
    for (int index = 18; index < 56; index++)                                                                           %>
    <html:option value="<%=index + ""%>">
    <%=index + ""%>
    </html:option>
    <% } %>

    what you need is field "value" in the select:
    [http://struts.apache.org/1.2.x/userGuide/struts-html.html#select]
    see "value" property
    (found it easily with "struts option selected" on google)

  • How to enable group label selectable on combo box?

    When we use the combo box, we can group the items as following
    group 1
    item 1 1
    item 1 2
    group 2
    item 2 1
    item 2 2
    How to enable user select the group 1 instead of select both item 1 1 & item 1 2 ?
    In the jsf rendered result, group 1 & group 2 just a label and not selectable option, we want change it to selectable option.
    Thanks

    When we use the combo box, we can group the items as following
    group 1
    item 1 1
    item 1 2
    group 2
    item 2 1
    item 2 2
    How to enable user select the group 1 instead of select both item 1 1 & item 1 2 ?
    In the jsf rendered result, group 1 & group 2 just a label and not selectable option, we want change it to selectable option.
    Thanks

  • Testing for no selection of combo box - mandatory combo

    What si the best way to see if a combo box has not been selected when it does not have a default value?
    if (ocombo.Selected.Value="")

    Hi,
    some solutions
    in c#
    if (((SAPbouiCOM.ComboBox)(oForm.Items.Item("cmbUID").Specific)).Selected != null) {
    in vb6
    if (NOT(oForm.Items.Item("cmbUID").Specific.Selected is nothing)) then
    you can also try
    if( oCombobox.Selected is null)
    lg David

  • How can I create a multi-line combo box?

    I am using Adobe Acrobat Pro 9 and I am trying to create a multi-line combo box on my fillable form.  At the bottom of this form/letter I would like to have a several paragraps that the user can choose from, but it's only allowing me to enter one line at a time.  Any help??

    Hi, Did you find the answer to this? I'm looking to create a combo box with multi-lines

Maybe you are looking for

  • How to use "put" function in Java.util.Map class

    intially an entry for key is null in a Map. then if I try to do put function on the map with the same key which had a null value previously It doesn't allow me to put the new value for the Key. Can anyone pleasee suggest as to how I can put a value o

  • Subtotal price, net due date, PPD discount, damage discount requirement

    Hi all, I have the following requirements for a change in a user exit. Can you please help me, i need to know which table and what field to get them from. 1.) damage discount 2.) PPD discount = ZPDZ in header level 3.) subtotal price = unit price * q

  • Any way to report mispronounced words/names? Phonics logic

    I've come across issues with voice command pronouncing some names incorrectly. It seems that perhaps not all Phonics rules were included for USA English? For instance Peden should be pronounced P'den similar to Eden with a P on the front. Phonics wou

  • FlexConnect (aka H-REAP) and Auto-Anchor functionality

    Hi Board, I never did H-REAP on my wireless deployments. Now, I have an H-REAP (FlexConnect) requirement for branch offices. Also there is the requirement for guest access at the same time. From my understanding those features (FlexConnect and Auto-A

  • Mouse hover issue

    Hover functions seems to be completely inop. Menu items will not highlight unless I keep the mouse button depressed. Hovering over link items in Safari does not change the cursor or display info banners. Most vexing of all, in Photoshop Elements 4.0,