Importing a list into a combo box.

I need to import several large lists into combo boxes in a form I am creating in AcrobatPro XI. I found the comboPopulateTest.pdf in another discussion; however, this only populates the items in the list. I need to import the Export Values associated with each item as well. Can the Java Script be modified to include two items on each line? I have tried but cannot get it to work -- I don't know if I have the correct name for the Export Values field, or if I'm doing something else incorrectly.

It can be done with a script. Have a look at the setItems method of the Field object.

Similar Messages

  • Please help with: A date split into 3 Combo Boxes ....

    Can someone help me with this Please?
    I have a date for a Date of Birth i.e. dd/MM/yyyy
    I need to split it up an place it into 3 combo boxes i.e. Day Combo, Month Combo and Year Combo.
    This is the code I have to set the combo boxes, now I need to bring it back into the combo boxes.
    can someone help me with the code as I need to have this finish on friday and I am running out of time. I just dont know what to do PLEASE SOMEONE HELP...
    Thanks
    Craig
    // List days
      private void DayOfTheMonth(int highNumber,JComboBox comboBox){
        comboBox.addItem(" ");
        for (int index = 1; index < highNumber; index++) {
          comboBox.addItem(String.valueOf(index));
      private void DaySpecificComboBox()
        DayOfTheMonth( 32, DayjComboBox);
    // List Months
      private void Month(){
        MonthjComboBox.addItem("");
        MonthjComboBox.addItem("January");
        MonthjComboBox.addItem("February");
        MonthjComboBox.addItem("March");
        MonthjComboBox.addItem("April");
        MonthjComboBox.addItem("May");
        MonthjComboBox.addItem("June");
        MonthjComboBox.addItem("July");
        MonthjComboBox.addItem("August");
        MonthjComboBox.addItem("September");
        MonthjComboBox.addItem("October");
        MonthjComboBox.addItem("November");
        MonthjComboBox.addItem("December");
    //List Years
      private void Year(int highNumber,JComboBox comboBox){
        comboBox.addItem(" ");
        for (int index = 2002; index > highNumber; index--) {
          comboBox.addItem(String.valueOf(index));
      private void YearSpecificComboBox()
        Year( 1900, YearjComboBox);
    private String StringFromDateFields(){
        int month =1;
        if (MonthjComboBox.getSelectedItem().equals(JANUARY))
          month = 1;
        else
          if (MonthjComboBox.getSelectedItem().equals(FEBRUARY))
            month = 2;
          else
            if (MonthjComboBox.getSelectedItem().equals(MARCH))
              month = 3;
            else
              if (MonthjComboBox.getSelectedItem().equals(APRIL))
                month = 4;
              else
                if (MonthjComboBox.getSelectedItem().equals(MAY))
                  month = 5;
                else
                  if (MonthjComboBox.getSelectedItem().equals(JUNE))
                    month = 6;
                  else
                    if (MonthjComboBox.getSelectedItem().equals(JULY))
                      month = 7;
                    else
                      if (MonthjComboBox.getSelectedItem().equals(AUGUST))
                        month = 8;
                      else
                        if (MonthjComboBox.getSelectedItem().equals(SEPTEMBER))
                          month = 9;
                        else
                          if (MonthjComboBox.getSelectedItem().equals(OCTOBER))
                            month = 10;
                          else
                            if (MonthjComboBox.getSelectedItem().equals(NOVEMBER))
                              month = 11;
                            else
                              if (MonthjComboBox.getSelectedItem().equals(DECEMBER))
                                month = 12;
                              String
                              DOB = DayjComboBox.getSelectedItem()+"/"+String.valueOf(month)+"/"+YearjComboBox.getSelectedItem();
                              return DOB;

    Thanks for your time.
    I could not get that to work ??
    I have come up with this code whitch seams to work. Thought you may like to see it
         String dobxml = xmlDoc.getValueOf(clientInfo, "DOB");
          String dob = dobxml.replace('/', ' ');
          System.out.println(dob);
          StringTokenizer tokenizer = new StringTokenizer(dob);
          String day = tokenizer.nextToken();
          String month = tokenizer.nextToken();
          String year = tokenizer.nextToken();
          System.out.println(dob);
          DayjComboBox.setSelectedItem(day);
          MonthjComboBox.setSelectedIndex(Integer.parseInt(month));
          YearjComboBox.setSelectedItem(year);ps thankyou
    Craig

  • How to fetch records from the database into a combo box?

    Hi:
    I&acute;m really new with ABLBPM and I&acute;m trying to fetch records from the database to display them into a combo box as valid values for a presentation but I&acute;m using a dynamic method with this code:
    <em>for each row in SELECT campo1, campo2 from TABLE</em>
    <em>do</em>
    <em>solicitudes[] = [row.campo1, row.campo2]</em>
    <em>end</em>
    <em>return solicitudes
    </em>And the debugger says that SQL instructions can be used only in fuctions and procedures that are executed on the server.
    Do you know another way to do it?
    P.D. Sorry for my terrible english
    Greetings

    Hi Steve,
    Thank you, your idea is perfect, but when I try to run the screenflow where the combo should be filled I get this error:
    fuego.lang.ComponentExecutionException: No se ha podido ejecutar correctamente la tarea.
    Motivo: 'java.lang.NullPointerException'.
         at fuego.web.execution.InteractiveExecution.setExecutionError(InteractiveExecution.java:307)
         at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:166)
         at fuego.web.execution.impl.WebInteractiveExecution.process(WebInteractiveExecution.java:54)
         at fuego.webdebugger.servlet.DebuggerServlet.redirect(DebuggerServlet.java:136)
         at fuego.webdebugger.servlet.DebuggerServlet.doPost(DebuggerServlet.java:85)
         at fuego.webdebugger.servlet.DebuggerServlet.doGet(DebuggerServlet.java:66)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         at fuego.web.execution.servlet.ServletExternalContext.forwardInternal(ServletExternalContext.java:197)
         at fuego.web.execution.servlet.ServletExternalContext.processAction(ServletExternalContext.java:110)
         at fuego.webdebugger.servlet.DebuggerExecution.dispatchComponentExecution(DebuggerExecution.java:64)
         at fuego.web.execution.InteractiveExecution.invokePrepare(InteractiveExecution.java:351)
         at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:192)
         at fuego.web.execution.impl.WebInteractiveExecution.process(WebInteractiveExecution.java:54)
         at fuego.web.execution.InteractiveExecution.process(InteractiveExecution.java:223)
         at fuego.webdebugger.servlet.DebuggerServlet.doDebug(DebuggerServlet.java:148)
         at fuego.webdebugger.servlet.DebuggerServlet.doPost(DebuggerServlet.java:82)
         at fuego.webdebugger.servlet.DebuggerServlet.doGet(DebuggerServlet.java:66)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    Any ideas??
    Thanks and greetings

  • Changing the Entry list title in Combo box

    Hi,
      i want to give title for the entry list displayed in Combo box.but itz displaying some default title "Extended value selector".is there anyway to remove this? please help me.
    Thanks,
    Priya

    Hi Shai,
         Thanks for ur reply.please let me know if there is a way to do that.
    Regards,
    Priya

  • Populating Database values into a combo box in STRUTS Framework

    Hi Guys,
    I am currently working on a STRUTS Framework project and I can't get much resources related to the problems that I'm facing.
    Currently I need to populate a JSP file's Combo box with database values. What I don't know here is the syntax used to in STRUTS framework to populate the Combo box with database values. Anyone with experience related to this topic, please kindly help me out.

    Struts doesn't define anything about the datab layer. You're free to implement how you will.
    Struts instead guides you into following an MVC pattern.
    You populate a combo box with values from a bean.
    So you need to set up a bean for this page to talk to.
    That bean can be populated from the database - but at that point you're in java/jdbc code - and away from the struts layer.
    My suggestions
    1 - Define a bean to represent the information from the database.
    2 - write a method that queries the database, and copies the data into a List of those beans. This will be your Data access layer.
    3 - in your action, call that method, and then set the list of beans as a request attribute. Or maybe as a property on a form.
    4 - use that list of beans to populate your dropdown box.

  • How to populate values from database into a Combo Box?

    Hi,
    How to display all the values of a field of a database table in a combo box inside a grid in B1 user defined form?
    Regards,
    Sudeshna.

    Hi,
    If you are trying to do this on a system form (I gues this is your case, reading the other question), for example Sales Orders, and you want to show the values from a User Defined Table (UDT), you just need to add a User Defined Field on Marketing Documents Line level, and say it is linked to the UDT.
    SBO will automatically show the combo with the values on the Code field of the UDT.
    Regards,
    Ibai Peña
    Sorry, I didn´t read the post well.
    What you could do is each time the form is loaded, read the values from the table, and asign them as Valid Values for the combobox column. You can do this programatically, or using XML (which is recommended becouse of better performance).
    Message was edited by: Ibai Peña

  • How do you Import .csv list into Contacts on iPad?

    Can some point me in the right direction to import .csv contact list exported from a PC in an iPad? Thanks

    Importing a Contact List CSV to the iPad
    http://techchannel.radioshack.com/importing-contact-list-csv-ipad-2235.html
     Cheers, Tom

  • I can't import keyword list into Aperture

    I want to import a big keyword list from last years photo library into this years, but when I export the keyword list from my 2012 library it's greyed out and won't import into my 2013 library. The Aperture help says it should work just fine, any tips on what I / Aperture / Apple are doing wrong here greatly appreciated: I have a big family keyword list which I don't want to have to recreate from scratch!
    Thanks all, James

       You are welcome, James! Thanks for the virtual flowers and chocolate! 
    Very pretty!
    Léonie

  • How to import excel list into drop down menu in acrobat pro DC

    Does anyone know if an excel list of 527 items can be imported into a drop down menu in adobe acrobat DC? I am on a mac v10.10.

    I would convert the Excel worksheet into a tab delimited file. Edit that file in a text editor, not Word, into a list that meets the formatting for the array for the setItems. method. Then add the code to use that array to set the items for the drop down field. So you have something like:
    var MyItems = new Array("One", "Two", "Three");
    this.getField("Dropdown1").setItems(MyItems);
    You can then cut and paste this into the JavaScript console, highlight text and execute the text. Or cut and paste the code into a document level JavaScript.

  • Importing a list into Purchase order

    Hi,
    I have a list on purchase order entries (Lines) in EXCEL. I would create PO in EBS and import line data from my excel. Is this possible?.
    Alternatively, I a have another PO in system that have similar lines as the one I want to create . I was wondering if import is not possible then is it possible I can copy a PO and edit the new one.
    I am new to EBS; I will appreciate if you can give me navigation details too. Thanks for your help in advance
    Aali

    Hi,
    If you are using R12 then this is possible through buyer's work center...
    E.g. You create a BPA Header.. and you want to upload the lines of this BPA by using source file in excel or text format.
    Under Buyer work center :
    1) click on the agreement tab .. click on the search button.. search for the BPA number you have just created with header info only
    2) Query will fetch your BPA... In Select Agreement option, select "Update" option..and press GO
    3) It will take you to a page : Update Blanket Purchase Agreement XXXXXXXXX
    4) Click on Lines tab of this page
    5) In this page you will see Add Line (fields) : select Via Upload from the LOV. Press GO
    6) Sytem will prompt you for File Type : Tab-Delimited text, XML. CXML etc...you selct your file ...
    7) If you are not sure about file format.. CLICK on DOWNLOAD Resources Button in this page...
    8) Now system will take you to Download Resource page... press Download.. save the template in your local m/c..
    8) Use (texttemplate.txt) the template, build you flat file for BPA lines... and upload it..
    It's easy.. :)
    Hope this will help.
    /S.P DASH

  • ISO country list in combo box

    I have tried searching the forums and am really surprised I did not fine any questions about importing a list into a combo box.  Maybe I am not seeing how to do something simple.
    I have a list of ISO country codes that I would like to have in a combo box on an acrobat form.  I don't really want to type each one in individually and have tried pasting the list in which did not work.  Is there any way of doing this without retyping the whole list?

    Not necessarily. I created a tool that does exactly that. Have a look at
    this page from my website:
    http://try67.blogspot.com/2009/11/acrobat-import-text-file-to-drop-down.html
    You can contact me privately if you're interested in purchasing it.

  • Can I have a blank field on my document when using a combo box with a drop down list in Word 2011 for Mac?

    I am creating a drop down list using a combo box in the Developer tab. Once I protect my document I want the field to remain empty and not show any of the items on my drop down list. Is there a way to do this? Currently it shows one of the items on my list.
    Thanks

    Paul's answer is correct.
    Since this is a Word IT forum for Windows, in the future you should use the
    answers.microsoft.com forum. It specializes in Word for the Mac. BTW - Paul stops by there also, so you'll still get his advice from there. :-)
    Kind Regards, Rich ... http://greatcirclelearning.com

  • Editable Combo box in a JTable

    Hi,
    Is it possible to have an editable combo Box in a JTable with an item Listener attached to the combo Box?
    Based on whatever value the user enters in that column that is rendered as a combo Box(editable) i should be able to do some validation. Is this possible?
    Thanks in advance for your time and patience.
    Archana

    Here's a start:
    public class FileModel5 extends AbstractTableModel
    public boolean isEditable = false;
    protected static int NUM_COLUMNS = 3;
    // initialize number of rows to start out with ...
    protected static int START_NUM_ROWS = 0;
    protected int nextEmptyRow = 0;
    protected int numRows = 0;
    static final public String file = "File";
    static final public String mailName = "Mail Id";
    static final public String postName = "Post Office Id";
    static final public String columnNames[] = {"File", "Mail Id", "Post Office Id"};
    // List of data
    protected Vector data = null;
    public FileModel5()
    data = new Vector();
    public boolean isCellEditable(int rowIndex, int columnIndex)
    // The 2nd & 3rd column or Value field is editable
    if(isEditable)
    if(columnIndex > 0)
    return true;
    return false;
    * JTable uses this method to determine the default renderer/
    * editor for each cell. If we didn't implement this method,
    * then the last column would contain text ("true"/"false"),
    * rather than a check box.
    public Class getColumnClass(int c)
    return getValueAt(0, c).getClass();
    * Retrieves number of columns
    public synchronized int getColumnCount()
    return NUM_COLUMNS;
    * Get a column name
    public String getColumnName(int col)
    return columnNames[col];
    * Retrieves number of records
    public synchronized int getRowCount()
    if (numRows < START_NUM_ROWS)
    return START_NUM_ROWS;
    else
    return numRows;
    * Returns cell information of a record at location row,column
    public synchronized Object getValueAt(int row, int column)
    try
    FileRecord5 p = (FileRecord5)data.elementAt(row);
    switch (column)
    case 0:
    return (String)p.file;
    case 1:
    return (String)p.mailName;
    case 2:
    return (String)p.postName;
    catch (Exception e)
    return "";
    public void setValueAt(Object aValue, int row, int column)
    FileRecord5 arow = (FileRecord5)data.elementAt(row);
    arow.setElementAt((String)aValue, column);
    fireTableCellUpdated(row, column);
    * Returns information of an entire record at location row
    public synchronized FileRecord5 getRecordAt(int row) throws Exception
    try
    return (FileRecord5)data.elementAt(row);
    catch (Exception e)
    throw new Exception("Record not found");
    * Used to add or update a record
    * @param tableRecord
    public synchronized void updateRecord(FileRecord5 tableRecord)
    String file = tableRecord.file;
    FileRecord5 p = null;
    int index = -1;
    boolean found = false;
    boolean addedRow = false;
    int i = 0;
    while (!found && (i < nextEmptyRow))
    p = (FileRecord5)data.elementAt(i);
    if (p.file.equals(file))
    found = true;
    index = i;
    } else
    i++;
    if (found)
    { //update
    data.setElementAt(tableRecord, index);
    else
    if (numRows <= nextEmptyRow)
    //add a row
    numRows++;
    addedRow = true;
    index = nextEmptyRow;
    data.addElement(tableRecord);
    //Notify listeners that the data changed.
    if (addedRow)
    nextEmptyRow++;
    fireTableRowsInserted(index, index);
    else
    fireTableRowsUpdated(index, index);
    * Used to delete a record
    public synchronized void deleteRecord(String file)
    FileRecord5 p = null;
    int index = -1;
    boolean found = false;
    int i = 0;
    while (!found && (i < nextEmptyRow))
    p = (FileRecord5)data.elementAt(i);
    if (p.file.equals(file))
    found = true;
    index = i;
    } else
    i++;
    if (found)
    data.removeElementAt(i);
    nextEmptyRow--;
    numRows--;
    fireTableRowsDeleted(START_NUM_ROWS, numRows);
    * Clears all records
    public synchronized void clear()
    int oldNumRows = numRows;
    numRows = START_NUM_ROWS;
    data.removeAllElements();
    nextEmptyRow = 0;
    if (oldNumRows > START_NUM_ROWS)
    fireTableRowsDeleted(START_NUM_ROWS, oldNumRows - 1);
    fireTableRowsUpdated(0, START_NUM_ROWS - 1);
    * Loads the values into the combo box within the table for mail id
    public void setUpMailColumn(JTable mapTable, ArrayList mailList)
    TableColumn col = mapTable.getColumnModel().getColumn(1);
    javax.swing.JComboBox comboMail = new javax.swing.JComboBox();
    int s = mailList.size();
    for(int i=0; i<s; i++)
    comboMail.addItem(mailList.get(i));
    col.setCellEditor(new DefaultCellEditor(comboMail));
    //Set up tool tips.
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for mail Id list");
    col.setCellRenderer(renderer);
    //Set up tool tip for the mailName column header.
    TableCellRenderer headerRenderer = col.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer)
    ((DefaultTableCellRenderer)headerRenderer).setToolTipText(
    "Click the Mail Id to see a list of choices");
    * Loads the values into the combo box within the table for post office id
    public void setUpPostColumn(JTable mapTable, ArrayList postList)
    TableColumn col = mapTable.getColumnModel().getColumn(2);
    javax.swing.JComboBox combo = new javax.swing.JComboBox();
    int s = postList.size();
    for(int i=0; i<s; i++)
    combo.addItem(postList.get(i));
    col.setCellEditor(new DefaultCellEditor(combo));
    //Set up tool tips.
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for post office Id list");
    col.setCellRenderer(renderer);
    //Set up tool tip for the mailName column header.
    TableCellRenderer headerRenderer = col.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer)
    ((DefaultTableCellRenderer)headerRenderer).setToolTipText(
    "Click the Post Office Id to see a list of choices");
    }

  • Problem in event handling of combo box in JTable cell

    Hi,
    I have a combo box as an editor for a column cells in JTable. I have a event listener for this combo box. When ever I click on the JTable cell whose editor is combo box,
    I get the following exception,
    Exception occurred during event dispatching:
    java.lang.NullPointerException
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.setDispatchComponent(Unknown Source)
         at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.mousePressed(Unknown Source)
         at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Can any one tell me how to over come this problem.
    Thanks,
    Raghu

    Here's an example of the model I used in my JTable. I've placed 2 comboBoxes with no problems.
    Hope this helps.
    public class FileModel5 extends AbstractTableModel
    public boolean isEditable = false;
    protected static int NUM_COLUMNS = 3;
    // initialize number of rows to start out with ...
    protected static int START_NUM_ROWS = 0;
    protected int nextEmptyRow = 0;
    protected int numRows = 0;
    static final public String file = "File";
    static final public String mailName = "Mail Id";
    static final public String postName = "Post Office Id";
    static final public String columnNames[] = {"File", "Mail Id", "Post Office Id"};
    // List of data
    protected Vector data = null;
    public FileModel5()
    data = new Vector();
    public boolean isCellEditable(int rowIndex, int columnIndex)
    // The 2nd & 3rd column or Value field is editable
    if(isEditable)
    if(columnIndex > 0)
    return true;
    return false;
    * JTable uses this method to determine the default renderer/
    * editor for each cell. If we didn't implement this method,
    * then the last column would contain text ("true"/"false"),
    * rather than a check box.
    public Class getColumnClass(int c)
    return getValueAt(0, c).getClass();
    * Retrieves number of columns
    public synchronized int getColumnCount()
    return NUM_COLUMNS;
    * Get a column name
    public String getColumnName(int col)
    return columnNames[col];
    * Retrieves number of records
    public synchronized int getRowCount()
    if (numRows < START_NUM_ROWS)
    return START_NUM_ROWS;
    else
    return numRows;
    * Returns cell information of a record at location row,column
    public synchronized Object getValueAt(int row, int column)
    try
    FileRecord5 p = (FileRecord5)data.elementAt(row);
    switch (column)
    case 0:
    return (String)p.file;
    case 1:
    return (String)p.mailName;
    case 2:
    return (String)p.postName;
    catch (Exception e)
    return "";
    public void setValueAt(Object aValue, int row, int column)
    FileRecord5 arow = (FileRecord5)data.elementAt(row);
    arow.setElementAt((String)aValue, column);
    fireTableCellUpdated(row, column);
    * Returns information of an entire record at location row
    public synchronized FileRecord5 getRecordAt(int row) throws Exception
    try
    return (FileRecord5)data.elementAt(row);
    catch (Exception e)
    throw new Exception("Record not found");
    * Used to add or update a record
    * @param tableRecord
    public synchronized void updateRecord(FileRecord5 tableRecord)
    String file = tableRecord.file;
    FileRecord5 p = null;
    int index = -1;
    boolean found = false;
    boolean addedRow = false;
    int i = 0;
    while (!found && (i < nextEmptyRow))
    p = (FileRecord5)data.elementAt(i);
    if (p.file.equals(file))
    found = true;
    index = i;
    } else
    i++;
    if (found)
    { //update
    data.setElementAt(tableRecord, index);
    else
    if (numRows <= nextEmptyRow)
    //add a row
    numRows++;
    addedRow = true;
    index = nextEmptyRow;
    data.addElement(tableRecord);
    //Notify listeners that the data changed.
    if (addedRow)
    nextEmptyRow++;
    fireTableRowsInserted(index, index);
    else
    fireTableRowsUpdated(index, index);
    * Used to delete a record
    public synchronized void deleteRecord(String file)
    FileRecord5 p = null;
    int index = -1;
    boolean found = false;
    int i = 0;
    while (!found && (i < nextEmptyRow))
    p = (FileRecord5)data.elementAt(i);
    if (p.file.equals(file))
    found = true;
    index = i;
    } else
    i++;
    if (found)
    data.removeElementAt(i);
    nextEmptyRow--;
    numRows--;
    fireTableRowsDeleted(START_NUM_ROWS, numRows);
    * Clears all records
    public synchronized void clear()
    int oldNumRows = numRows;
    numRows = START_NUM_ROWS;
    data.removeAllElements();
    nextEmptyRow = 0;
    if (oldNumRows > START_NUM_ROWS)
    fireTableRowsDeleted(START_NUM_ROWS, oldNumRows - 1);
    fireTableRowsUpdated(0, START_NUM_ROWS - 1);
    * Loads the values into the combo box within the table for mail id
    public void setUpMailColumn(JTable mapTable, ArrayList mailList)
    TableColumn col = mapTable.getColumnModel().getColumn(1);
    javax.swing.JComboBox comboMail = new javax.swing.JComboBox();
    int s = mailList.size();
    for(int i=0; i<s; i++)
    comboMail.addItem(mailList.get(i));
    col.setCellEditor(new DefaultCellEditor(comboMail));
    //Set up tool tips.
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for mail Id list");
    col.setCellRenderer(renderer);
    //Set up tool tip for the mailName column header.
    TableCellRenderer headerRenderer = col.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer)
    ((DefaultTableCellRenderer)headerRenderer).setToolTipText(
    "Click the Mail Id to see a list of choices");
    * Loads the values into the combo box within the table for post office id
    public void setUpPostColumn(JTable mapTable, ArrayList postList)
    TableColumn col = mapTable.getColumnModel().getColumn(2);
    javax.swing.JComboBox combo = new javax.swing.JComboBox();
    int s = postList.size();
    for(int i=0; i<s; i++)
    combo.addItem(postList.get(i));
    col.setCellEditor(new DefaultCellEditor(combo));
    //Set up tool tips.
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for post office Id list");
    col.setCellRenderer(renderer);
    //Set up tool tip for the mailName column header.
    TableCellRenderer headerRenderer = col.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer)
    ((DefaultTableCellRenderer)headerRenderer).setToolTipText(
    "Click the Post Office Id to see a list of choices");
    }

  • Database - Combo box

    Hi,i'am facing a problem when i'am adding the values retrived from a query into the combo box.
    1)when the query is "order by" only few items are getting added to the list and the rest of the elements below this are not displayed.
    2)when i remove the "order by" from the query every thing is fine.all the items are getting added to the list and rest of the items are also displayed
    Below is the code,i'am using.Can any one help me in analysing the problem
    <tr>
    <td><font face="verdana" size="1"><b>Account Category </b> </font> </td>
    <td>
    <select name="txtActCat" size="1">
    <%
    rs1=stmt1.executeQuery("select * from costcenter");
    while(rs1.next())
    %>
    <option value="<%=rs1.getString("cost_id")%>"><%=rs1.getString("cost_desc")%></option>
    <%
    %></select><b><font FACE="tahoma" SIZE="1" COLOR="red"> * </font></b>
    </td>
    </tr>
    thanx,

    write the code which was not executed.

Maybe you are looking for

  • How do I connect multiple telnet clients to a telnet server in LabVIEW?

    Good afternoon, I'm writing a telnet server in LabView 6.1 that needs to handle multiple clients. To do this, I modified the "viserver\runvi.llb" example to use the telnet VI's from the Internet Toolkit instead of the TCP VI's. Then I changed the Ope

  • [resolved] Can not install mysql

    Oooops, I fixed it. Somehow /tmp had wrong permissions.. Hello, after an upgrade my mysql dameon did not work anymore so I did what https://bbs.archlinux.org/viewtopic.php?pid=889846 says and removed all configs and removed it. Now pacman -S mysql gi

  • "mode not supported"ATV3 VGA Kanex ATV Pro

    hi Apple TV3 Samsung LED projector via VGA Kanex ATV Pro VGA-HDMI convertor Macbook Mavericks all i get is mode not supported? ta JJ

  • DSC 8 custom timestamp

    Is there a way to write a custom timestamp to a published shared variable in DSC 8.0, as we could in older DSC versions with VI-based servers?

  • How to put RAC database in restricted mode?is it with srvctl?

    I know for standalone database its SQL> startup restrict --if its down SQL> alter system enable restricted session; --if its up Any idea for RAC ? any option with srvctl ? what are the steps ..... Thanks in advance for help Gagan