Special characters in the combo box

Hi OIM Gurus,
I have populated some values with special characters in combo box,when i select the option it should show me the result set ,instead it shows"Illegal Characters Entered
The data provided contains special characters that are not allowed. "
is look-up a good option ? or any other fix for the combo box?
Thanks in advance,
Cats Paw

I forget what I used (combo box, enum, etc) but I tried to put a + and - sign in and switch between the two. While the - sign showed up correctly, when the user went to select from the drop down, it was a separator! Not very intuitive! I thought a \ would escape it, but no luck.
CLA, LabVIEW Versions 2010-2013

Similar Messages

  • Not able to populate data in the combo box

    Hi Guys,
    I m new to flex development and I want to populate the data
    coming from the databasein the combobox.I am able to get the length
    .but not able to populate the data.
    Can anyone helpme out?
    The code is below:
    The data displayed in the combox box is displayed as
    [object],[object] etc.I m sure that the data is coming from the
    database and its not populated in the combo box.any help is
    appreciated.
    private function getParkinfo(event:ResultEvent):void
    { Alert.show(event.result.length.toString());
    countries.dataProvider = event.result;
    <mx:ComboBox id="countries" />

    What does the data look like in the result? Is it XML? Post a
    sample of it.

  • How can I make the combo box turn to the value of black.

    When the show button is pressed (and not before), a filled black square should be
    displayed in the display area. The combo box (or drop down list) that enables the user to choose the colour of
    the displayed shape and the altering should take effect immediately.When the show button is pressed,
    the image should immediately revert to the black square, the combo box should show the value that
    correspond to the black.
    Now ,the problem is: after I pressed show button, the image is reverted to the black square,but I don't know
    how can I make the combo box turn to the value of black.
    Any help or hint?Thanks a lot!
    coding 1.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class test extends JFrame {
         private JPanel buttonPanel;
         private DrawPanel myPanel;
         private JButton showButton;
         private JComboBox colorComboBox;
    private boolean isShow;
         private int shape;
         private boolean isFill=true;
    private String colorNames[] = {"black", "blue", "cyan", "darkGray", "gray",
    "green", "lightgray", "magenta", "orange",
    "pink", "red", "white", "yellow"}; // color names list in ComboBox
    private Color colors[] = {Color.black, Color.blue, Color.cyan, Color.darkGray,
                              Color.gray, Color.green, Color.lightGray, Color.magenta,
                              Color.orange, Color.pink, Color.red, Color.white, Color.yellow};
         public test() {
         super("Draw Shapes");
         // creat custom drawing panel
    myPanel = new DrawPanel(); // instantiate a DrawPanel object
    myPanel.setBackground(Color.white);
         // set up showButton
    // register an event handler for showButton's ActionEvent
    showButton = new JButton ("show");
         showButton.addActionListener(
              // anonymous inner class to handle showButton events
         new ActionListener() {
                   // draw a black filled square shape after clicking showButton
         public void actionPerformed (ActionEvent event) {
                             // call DrawPanel method setShowStatus and pass an parameter
              // to decide if show the shape
         myPanel.setShowStatus(true);
                   isShow = myPanel.getShowStatus();
                                            shape = DrawPanel.SQUARE;
                        // call DrawPanel method setShape to indicate shape to draw
                                            myPanel.setShape(shape);
                        // call DrawPanel method setFill to indicate to draw a filled shape
                                            myPanel.setFill(true);
                        // call DrawPanel method draw
                                            myPanel.draw();
                             myPanel.setFill(true);
                             myPanel.setForeground(Color.black);
                   }// end anonymous inner class
         );// end call to addActionListener
    // set up colorComboBox
    // register event handlers for colorComboBox's ItemEvent
    colorComboBox = new JComboBox(colorNames);
    colorComboBox.setMaximumRowCount(5);
    colorComboBox.addItemListener(
         // anonymous inner class to handle colorComboBox events
         new ItemListener() {
         // select shape's color
         public void itemStateChanged(ItemEvent event) {
         if(event.getStateChange() == ItemEvent.SELECTED)
         // call DrawPanel method setForeground
         // and pass an element value of colors array
         myPanel.setForeground(colors[colorComboBox.getSelectedIndex()]);
    myPanel.draw();
    }// end anonymous inner class
    ); // end call to addItemListener
    // set up panel containing buttons
         buttonPanel = new JPanel();
    buttonPanel.setLayout(new GridLayout(4, 1, 0, 50));
         buttonPanel.add(showButton);
    buttonPanel.add(colorComboBox);
    JPanel radioButtonPanel = new JPanel();
    radioButtonPanel.setLayout(new GridLayout(2, 1, 0, 20));
    Container container = getContentPane();
    container.setLayout(new BorderLayout(10,10));
    container.add(myPanel, BorderLayout.CENTER);
         container.add(buttonPanel, BorderLayout.EAST);
    setSize(500, 400);
         setVisible(true);
         public static void main(String args[]) {
         test application = new test();
         application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    coding 2
    import java.awt.*;
    import javax.swing.*;
    public class DrawPanel extends JPanel {
         public final static int CIRCLE = 1, SQUARE = 2;
         private int shape;
         private boolean fill;
         private boolean showStatus;
    private int shapeSize = 100;
    private Color foreground;
         // draw a specified shape
    public void paintComponent (Graphics g){
              super.paintComponent(g);
              // find center
    int x=(getSize().width-shapeSize)/2;
              int y=(getSize().height-shapeSize)/2;
              if (shape == CIRCLE) {
         if (fill == true){
         g.setColor(foreground);
              g.fillOval(x, y, shapeSize, shapeSize);
    else{
                   g.setColor(foreground);
    g.drawOval(x, y, shapeSize, shapeSize);
              else if (shape == SQUARE){
         if (fill == true){
         g.setColor(foreground);
                        g.fillRect(x, y, shapeSize, shapeSize);
    else{
                        g.setColor(foreground);
    g.drawRect(x, y, shapeSize, shapeSize);
    // set showStatus value
    public void setShowStatus (boolean s) {
              showStatus = s;
         // return showstatus value
    public boolean getShowStatus () {
              return showStatus;
         // set fill value
    public void setFill(boolean isFill) {
              fill = isFill;
         // set shape value
    public void setShape(int shapeToDraw) {
              shape = shapeToDraw;
    // set shapeSize value
    public void setShapeSize(int newShapeSize) {
              shapeSize = newShapeSize;
    // set foreground value
    public void setForeground(Color newColor) {
              foreground = newColor;
         // repaint DrawPanel
    public void draw (){
              if(showStatus == true)
              repaint();

    Hello,
    does setSelectedIndex(int anIndex)
    do what you need?
    See Java Doc for JComboBox.

  • How I can stop the combo box with list of values from fireing validations

    Hi I'm using Jdeveloper 11.1.2.3.0
    Using Hr Schema employees table
    I Display employees data in af:table
    and I make List Of values on Department_id filed to easy change the employee department
    and another one on Job_id filed
    and Imake them UI Hints as ( combo box with list of values ) in the employeesVO
    the problem is when I Select a value from department or jobs ( combo box with list of values )
    fires the entire filed validations for mandatory atributes
    Note : the af:table Property ( contedelivery) is set to (immediate )
    How I can stop the combo box with list of values from fireing validations

    check it out.,
    http://andrejusb.blogspot.in/2012/09/what-to-do-when-adf-editable-table.html

  • How to use the Combo Box In MAtrix Colums

    HI Experts,
    Good Mornong.How to use the Combo Box In MAtrix Colums?
    Regards And Thanks,
    M.Thippa Reddy

    hi,
    loading data in to the combobox on form load.but, it should be done when atleast one row is active.
    the values what ever you are inserting in to combo should  be less than or eqhal to 100 or 150.if it exceeds beyond that performance issue arises.it takes more time to load all the data.so, it is better to have 100 or less.
    oMatrix.AddRow()
    RS = Nothing
    RS = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
    RS.DoQuery("select ItemCode,ItemName from oitm")
    oCombo = oMatrix.Columns.Item("ColumnUID").Cells.Item(oMatrix.RowCount).Specific
    For i = 1 To RS.RecordCount
          If RS.EoF = False Then
                oCombo.ValidValues.Add(RS.Fields.Item("ItemCode").Value,RS.Fields.Item("ItemName").Value)
                RS.MoveNext()
          End If
    Next
    the above code is inserting data from database to column combobox.
    you can fill combo directly also as shown below.
    oCombo.ValidValues.Add("x","1")
    oCombo.ValidValues.Add("y","2")
    oCombo.ValidValues.Add("z","3")
    oCombo.ValidValues.Add("","")
    and what ever the values you are filling into combo should be unique.other wise it shows valid value exists.
    regards,
    varma

  • Control the combo box select of COPY FROM in Delivery Order

    Dear all
    I have a requirement where in the user wants to restrict the "copy from" button on the delivery order. They want the delivery orders to be created only from Sales orders.
    So that would mean that i do a bubbleevent = false when any other row is selected in the combo box dropdown. But I am not able to get the control to the combobox.
    In the system information it says that the form is "-9876", but couldnt catch any event on it either.
    Any suggestions to control the selection of the "COPY FROM" combobox is most welcome.
    Thanks in advance
    Rashmi

    Hi Use This Ihave Checked This
    If pVal.Before_Action Then
                    If pVal.FormType = 140 And pVal.EventType = SAPbouiCOM.BoEventTypes.et_COMBO_SELECT And Not pVal.InnerEvent Then
                        If pVal.ItemUID = "10000330" Then
                            If pVal.PopUpIndicator = "2" Then
                                objAddOn.objApplication.SetStatusBarMessage("You Can Not Copy From Returns")
                                BubbleEvent = False
                                Exit Sub
                            ElseIf pVal.PopUpIndicator = "0" Then
                                objAddOn.objApplication.SetStatusBarMessage("You Can Not Copy From Sales Quotations")
                                BubbleEvent = False
                                Exit Sub
                            End If
                        End If
                    End If
                End If
    Mohamed Zubair

  • I have a MacBook purchased in 2009 with Snow Leopard. I tried to access "special characters" from the Finder menu and an intermittent blank pop ups and will not stop. It also happens when I run Word or Pages.

    The blank pop up began as I tried to access "special characters" from the finder menu. I restarted, turned off and restarted and it did not work. It interferes with any application because I cannot work fast. Every new step takes a few seconds longer such as saving, finding text, check spelling and many more. I am desperate to solve this. Thanks in advance for any help given.
    Consuelo Corretjer

    Use the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
    This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.

  • How do you use the combo box to populate a text box

    I am a beginner when it comes to Java Script.  I have viewed many different discussions, look at a lot of "help" articles dealing with Acrobat 9 and Java Script, but only to be left confused and dazed.  I am hoping someone will be able to tell me how to write a script that will populate a text box that is on my form with the combo box selection's export value...
    Thanks

    If you want the text box to be read-only, just set it up with the following custom calculate script:
    // Set this field value to the value of the combo box
    event.value = getField("combo1").value;
    but replace "combo1" with the actual name of the combo box field.
    If you want something else, post again with more information.

  • How to escape or remove the special characters in the xml element by regula

    Hi members,
    How to escape or remove the special characters in the xml element by regular expression  in java??
    For Example ,
    <my:name> aaaa </my:name>
    <my:age> 27 </my:age>
    In the above example , i have to retrieve the value of the <my:name> Element(For examlpe -- i have to get "aaaa" from <my:name> tag)...
    How to retreive this value by using DOM with XPATH in java
    Thanks in Advance

    Hi members,
    I forget to paste my coding for the above question....This is my coding......In this display the error...... Pls reply ASAP.......
    PROGRAM:
    import java.io.IOException;
    import java.util.Hashtable;
    import java.util.Map;
    import org.w3c.dom.*;
    import org.xml.sax.SAXException;
    import javax.xml.parsers.*;
    import javax.xml.xpath.*;
    public class DOMReaderForXMP {
         static Document doc;
         static XPath xpath;
         static Object result;
         static NodeList nodes;
         public DOMReaderForXMP() throws ParserConfigurationException, SAXException,
                   IOException, XPathExpressionException {
              DocumentBuilderFactory domFactory = DocumentBuilderFactory
                        .newInstance();
              domFactory.setNamespaceAware(true);
              DocumentBuilder builder = domFactory.newDocumentBuilder();
              doc = builder.parse("d:\\XMP.xml");
              XPathFactory factory = XPathFactory.newInstance();
              xpath = factory.newXPath();
         public static void perform(String path) throws Exception {
              result = xpath.evaluate(path, doc, XPathConstants.NODESET);
              nodes = (NodeList) result;
         public void check() throws Exception {
              perform("//my:name/text()");
              if (!nodes.item(0).getNodeValue().equals("application/pdf")) {
                   System.out.println("Mathces....!");
    ERROR:
    Exception in thread "main" net.sf.saxon.trans.StaticError: XPath syntax error at char 9 in {/my:name}:
    Prefix aas has not been declared

  • Special characters in the employee names is adding ASCII  to the file

    Hi Team,
    Iam working on a outbound interface which has a length of 3000. For the last name it is having some special charecters Vázquez . When downloading into application server, the special characters in the employee names is adding ASCII characters to the file Vázquez . This is increasing the record length to 3001.
    Please let me know how to remove this ASCII charecters. It is happening only for application server.
    Rgds
    Kishor

    Hi
    Please refer below link.
    [Re: Translation of special charachter like 'u00E3au00EA']
    ~~~Ganesh Kumar K.

  • Problem to get file with special characters in the message

    Hi, I'm developing an application that read the email and save the attached file. However, some files have special characters in the name, like: Documento de EspecificaÇÂO.doc
    I noticed the de name of the file in de message head is:
    "=?iso-8859-1?Q?Documento_de_Especifica=E7=E3o.doc?="
    I'm already using the JavaMil 1.4.5
    Tha is my code:
    package br.com.cesan.helpdesk;
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Properties;
    import javax.mail.Flags;
    import javax.mail.Folder;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Part;
    import javax.mail.Session;
    import javax.mail.Store;
    import javax.mail.search.FlagTerm;
    public class LerEmail2 {
         * @param args
         * @throws MessagingException
         * @throws IOException
         public static void main(String[] args) throws MessagingException, IOException {
              // TODO Auto-generated method stub
              // Get session
         Session session = Session.getInstance(new Properties(), null);
         // Get the store
         Store store = session.getStore("pop3");
         store.connect("pop.xxxxx.com.br", "user", "password");
         Folder folder = store.getFolder("INBOX");
              //folder.open(Folder.READ_ONLY);
              folder.open(Folder.READ_WRITE);
              // Show only unreaded Messages
              FlagTerm ft = new FlagTerm(new Flags(Flags.Flag.SEEN), false);
              // Get directory
         Message message[] = folder.getMessages();     
         //Message messages[] = folder.search(ft);
         for (int i=0, n=message.length; i<n; i++) {
              System.out.println(i + " - "+ message.getSubject() +" - " + message[i].getSentDate() );
              Object content = message[i].getContent();
              if (content instanceof Multipart) {
         handleMultipart((Multipart)content);
         } else {
         handlePart(message[i]);
         // Close connection
         folder.close(false);
         store.close();
         public static void handleMultipart(Multipart multipart) throws MessagingException, IOException {
              for (int i=0, n=multipart.getCount(); i<n; i++) {
                   handlePart(multipart.getBodyPart(i));
         public static void handlePart(Part part) throws MessagingException, IOException {
              String disposition = part.getDisposition();
         String contentType = part.getContentType();
         if (disposition == null) { // When just body
              System.out.println("Null: " + contentType);
              // Check if plain
              if ((contentType.length() >= 10) && (contentType.toLowerCase().substring(0, 10).equals("text/plain"))) {
                   part.writeTo(System.out);
              } else { // Don't think this will happen
                   System.out.println("Other body: " + contentType);
                   part.writeTo(System.out);
         } else if (disposition.equalsIgnoreCase(Part.ATTACHMENT)) {
              System.out.println("Attachment: " + part.getFileName() + " : " + contentType);
              saveFile(part.getFileName(), part.getInputStream());
         } else if (disposition.equalsIgnoreCase(Part.INLINE)) {
         System.out.println("Inline: " +
         part.getFileName() +
         " : " + contentType);
         saveFile(part.getFileName(), part.getInputStream());
         } else {  // Should never happen
         System.out.println("Other: " + disposition);
         public static void saveFile(String filename, InputStream input) throws IOException {
              if (filename == null) {
                   filename = File.createTempFile("xx", ".out").getName();
              // Do no overwrite existing file
              File file = new File(filename);
              for (int i=0; file.exists(); i++) {
                   file = new File(filename+i);
              System.setProperty("file.encoding", "iso-8859-1");
              FileOutputStream fos = new FileOutputStream(file);
              BufferedOutputStream bos = new BufferedOutputStream(fos);
              BufferedInputStream bis = new BufferedInputStream(input);
              int aByte;
              while ((aByte = bis.read()) != -1) {
                   bos.write(aByte);
              bos.flush();
              bos.close();
              bis.close();
    The problem occurs in:
    FileOutputStream fos = new FileOutputStream(file);
    BufferedOutputStream bos = new BufferedOutputStream(fos);
    BufferedInputStream bis = new BufferedInputStream(input);
    int aByte;
    while ((aByte = bis.read()) != -1) {
    bos.write(aByte);
    Thanks
    Edited by: user10283976 on 30/03/2012 07:36
    Edited by: user10283976 on 30/03/2012 07:37
    Edited by: user10283976 on 30/03/2012 07:37
    Edited by: user10283976 on 30/03/2012 07:38
    Edited by: user10283976 on 30/03/2012 07:40
    Edited by: user10283976 on 30/03/2012 07:41
    Edited by: user10283976 on 30/03/2012 07:42

    http://www.oracle.com/technetwork/java/javamail/faq/index.html#encodefilename

  • Combo box in JavaScript and store the combo box values into database

    i am a developer, i have a task ie.. i have combo box in JavaScript and i have to store the combo box values into database through JavaServerPage..
    i please every one to have a look on this and please reply soon....

    dear sir,
    your suggestions are really greater the god.............
    i have applied as you said , now i am the page as updated and also i nform you that its multi select ....
    i will show the codings , then u will get a clear identification
    <script language= "JavaScript">
    <!--
    function one2two() {
        m1len = m1.length ;
        for ( i=0; i<m1len ; i++){
            if (m1.options.selected == true ) {
    m2len = m2.length;
    m2.options[m2len]= new Option(m1.options[i].text);
    for ( i = (m1len -1); i>=0; i--){
    if (m1.options[i].selected == true ) {
    m1.options[i] = null;
    function two2one() {
    m2len = m2.length ;
    for ( i=0; i<m2len ; i++){
    if (m2.options[i].selected == true ) {
    m1len = m1.length;
    m1.options[m1len]= new Option(m2.options[i].text);
    for ( i=(m2len-1); i>=0; i--) {
    if (m2.options[i].selected == true ) {
    m2.options[i] = null;
    //-->
    </script>
    <form method="POST" name="theForm" action="update.jsp">
    <table bgcolor="white" border="1" cellpadding="5" cellspacing="2" align="center">
    <tr><td align="center">
    <select id=menu1 size=10 multiple>
    <option>javascript</option>
    <option>php</option>
    <option>Zeo</option>
    <option>asp</option>
    <option>jsp</option>
    <option>ajax</option>
    <option>struts</option>
    </select>
    <p align="center"><input type="button" onClick="one2two()" value=" >> "></p>
    </td><td align="center">
    Languages you know:<BR>
    <SELECT NAME="language" multiple>
    <OPTION VALUE="c">C
    <OPTION VALUE="c++">C++
    </SELECT>
    <p align="center"><input type="button" onClick="two2one()" value=" << " ></p>
    </td></tr></table>
    <center><input type="submit" value="update"></center>
    </form>
    <h4><u>Back<h4>
    <script language= "JavaScript">
    var m1 = document.theForm.menu1;
    var m2 = document.theForm.language;
    </script>
    </body>
    </html>

  • How to populate the combo boxes that are created dynamically in jsp

    Hi,
    I am using JSP.
    I am creating combo boxes dynamically (based on the num selected by the user). These dynamically created combo boxes need to have A-Z as options (each box) . Now, when the user chooses the option A in any of the combo-boxes,the rest should not have this option. so on..
    how do i achieve this.Kindly help.

    You'll need to use JavaScript...I have a complicated example and a simple example, however, I cannot really understand the complex example but I know how it works. The looping is too complex for me.
    First you'll need to populate a server side variable...depending on how often the data is updated you may want this to run each time a new session is created...this example is run each time Tomcat is started and the application context is initialized:
    package kms.web;
    // Servlet imports
    import javax.servlet.ServletContextListener;
    import javax.servlet.ServletContextEvent;
    import javax.servlet.ServletContext;
    // utility imports
    import java.util.Map;
    // domain imports
    import kms.domain.LocationService;
    import kms.domain.DeptService;
    import kms.domain.PatentService;
    * This listenter is used to initialize
    * the Maps of Locations, Patents & Depts used to populate
    * pulldown lists in JSPs
    public class InitializeData implements ServletContextListener {
        * This method creates the Maps.
       public void contextInitialized(ServletContextEvent sce) {
          ServletContext context = sce.getServletContext();
          LocationService lServ = new LocationService();
          // Create the Maps
          Map campuses = lServ.getCampuses();
          Map buildings = lServ.getBuildings();
          Map floors = lServ.getFloors();
          Map locs = lServ.getLocations();
          // And store them in the "context" (application) scope
          context.setAttribute("campuses", campuses);
          context.setAttribute("buildings", buildings);
          context.setAttribute("floors", floors);
          context.setAttribute("locs", locs);
          DeptService dServ = new DeptService();
          Map depts = dServ.getDepts();
          context.setAttribute("depts", depts);
          PatentService pServ = new PatentService();
          Map patents = pServ.getPatents();
          context.setAttribute("patents", patents);
          //I did this one myself
    /*    CodeService cServ = new CodeService();
          Map masterMks = cServ.getCodes();
          context.setAttribute("masterMks", masterMks);
        * This method is necessary for interface.
       public void contextDestroyed(ServletContextEvent sce) {
       // I have no clue what the heck this is for???
       // Let me know if you do!
    }So now we travel into the PatentService method called 'getPatents();' which in turn calls a PatentDAO method
    Map patents = pServ.getPatents();
    Below is the code for the PatentService object:
    package kms.domain;
    import kms.util.ObjectNotFoundException;
    import java.util.*;
    * This object performs a variety of dept services, like retrieving
    * a dept object from the database, or creating a new dept object.
    public class PatentService {
       * The internal Data Access Object used for database CRUD operations.
      private PatentDAO patentDAO;
       * This constructor creates a Dept Service object.
      public PatentService() {
        patentDAO = new PatentDAO();
    public Map getPatents() {
          Map patents = null;
          try {
            patents = patentDAO.retrieveAll();
          // If the dept object does not exist, simply return null
          } catch (ObjectNotFoundException onfe) {
            patents = null;
          return patents;
    }It may be useful for you to see the code of the Patent class:
    package kms.domain;
    /*** This domain object represents a dept.
    public class Patent implements java.io.Serializable {
      private int codeGgm;
      private String name = "";
      private String description = "";
      private int creator;
      private String creationDate = "";
      private int used;
       * This is the full constructor.
      public Patent(int codeGgm, String name, String desc, int creator, String creationDate, int used) {
        this.codeGgm = codeGgm;
        this.name = name;
        this.description = desc;
        this.creator = creator;
        this.creationDate = creationDate;
        this.used = used;
      public Patent() { }
      public int getCodeGgm() {
          return codeGgm;
      public void setCodeGgm(int codeGgm) {
           this.codeGgm = codeGgm;
      public String getName() {
        return name;
      public void setName(String name) {
          this.name = name;
      public String getDesc() {
        return description;
      public void setDesc(String desc) {
          this.description = desc;
      public int getCreator() {
          return creator;
      public void setCreator(int creator) {
             this.creator = creator;
      public String getCreationDate() {
          return creationDate;
      public void setCreationDate(String creationDate) {
             this.creationDate = creationDate;
      public int getUsed() {
           return used;
      public void setUsed(int used){
           this.used = used;
    }And here is the Database table which stores the Patents:
    DESC PATENT:
    CODE_GGM NUMBER(3)
    NAME VARCHAR2(15)
    DESCRIPTION VARCHAR2(250)
    CREATOR NUMBER(10)
    CREATION_DATE DATE
    USED NUMBER(1)
    So, we then travel into the code of the PatentDAO to see how the DAO object executes the DB query to get all of the Data we need for the select list:
    package kms.domain;
    import javax.naming.*;
    import javax.sql.*;
    import java.util.*;
    import java.sql.*;
    import kms.util.*;
    * This Data Access Object performs database operations on Patent objects.
    class PatentDAO {
       * This constructor creates a Patent DAO object.
       * Keep this package-private, so no other classes have access
    PatentDAO() {
    * This method returns a Map of all the Dept names
    * The key is the Dept id
    Map retrieveAll()
           throws ObjectNotFoundException {
          Connection connection = null;
          ResultSet results = null;
          // Create the query statement
          PreparedStatement query_stmt = null;
          try {
            // Get a database connection
          Context initContext = new InitialContext();
           DataSource ds = (DataSource)initContext.lookup("java:/comp/env/jdbc/keymanOracle");
           connection = ds.getConnection();
            // Create SQL SELECT statement
            query_stmt = connection.prepareStatement(RETRIEVE_ALL_NAMES);
            results = query_stmt.executeQuery();
            int num_of_rows = 0;
          Map patents = new TreeMap();
             // Iterator over the query results
            while ( results.next() ) {
                patents.put(new Integer(results.getInt("code_ggm")), results.getString("name"));
             if ( patents != null ) {
                      return patents;
                    } else {
                      throw new ObjectNotFoundException("patent");
           // Handle any SQL errors
         } catch (SQLException se) {
            se.printStackTrace();
           throw new RuntimeException("A database error occured. " + se.getMessage());
        } catch (NamingException se) {
          throw new RuntimeException("A JNDI error occured. " + se.getMessage());
          // Clean up JDBC resources
          } finally {
            if ( results != null ) {
              try { results.close(); }
              catch (SQLException se) { se.printStackTrace(System.err); }
            if ( query_stmt != null ) {
              try { query_stmt.close(); }
              catch (SQLException se) { se.printStackTrace(System.err); }
            if ( connection != null ) {
              try { connection.close(); }
              catch (Exception e) { e.printStackTrace(System.err); }
    private static final String RETRIEVE_ALL_NAMES
          = "SELECT code_ggm, name FROM patent ";
    }Now when you wish to use the 'combo box' (also called select lists), you insert this code into your jsp:
    <TR>
    <%@ include file="../incl/patent.jsp" %>
    </TR>
    depending on how your files on your server are organized, the "../incl/patent.jsp"
    tells the container to look up one directory from where the main jsp is to find the 'patent.jsp' file in the 'incl' directory.
    I need some help creating multi-level select lists with JavaScript:
    Can anyone explain this code:
    <%@ page import="java.util.*,kms.domain.*" %>
    <jsp:useBean id="campuses" scope="application" class="java.util.Map" />
    <TR><TD ALIGN='right'>Campus: </TD>
    <TD>
    <select name="campus" size="1" onChange="redirect(this.options.selectedIndex)">
    <option value="0" selected>No Campus</option>
    <% LocationService ls = new LocationService();
       Iterator c = campuses.keySet().iterator();
       Map[] bm = new Map[campuses.size()];
       Map[][] fm = new Map[campuses.size()][0];
       Map[][][] lm = new Map[campuses.size()][0][0];
       int i2 = 0;
       int j2 = 0;
       int k2 = 0;
       int jj = 0;
       int kk = 0;
       while (c.hasNext()) {
          Integer i = (Integer)c.next();
          out.print("<OPTION ");
          out.print("VALUE='" + i.intValue()+ "'>");
          out.print( (String) campuses.get(i) );
          out.print("</OPTION>");
          bm[i2] =  ls.getBuildingsByCampus(i.intValue());
          fm[i2] = new Map[bm[i2].size()];
          lm[i2] = new Map[bm[i2].size()][];
          Iterator b = bm[i2].keySet().iterator();
          j2 = 0;
          while (b.hasNext()) {
            Integer j = (Integer)b.next();
            fm[i2][j2] = ls.getFloorsByBuilding(j.intValue());
            lm[i2][j2] = new Map[fm[i2][j2].size()];
            Iterator f = fm[i2][j2].keySet().iterator();
            k2 = 0;
            while (f.hasNext()) {
              Integer k = (Integer)f.next();
              lm[i2][j2][k2] = ls.getLocationsByFloor(k.intValue());
              k2++;
              kk++;
            j2++;
            jj++;
          i2++;
       } %>
    </select></TD>
    </TR>
    <TR><TD ALIGN='right'>Building: </TD>
    <TD>
    <select name="building" size="1" onChange="redirect1(this.options.selectedIndex)">
    <option value="0" selected>No Building</option>
    </select></TD>
    </TR>
    <TR><TD ALIGN='right'>Floor: </TD>
    <TD>
    <select name="floor" size="1" onChange="redirect2(this.options.selectedIndex)">
    <option value="0" selected>No Floor</option>
    </select></TD>
    </TR>
    <TR><TD ALIGN='right'>Room: </TD>
    <TD>
    <select name="location_id" size="1">
    <option value="0" selected>No Room</option>
    </select></TD>
    </TR>
    <script>
    var cNum = <%=i2%>
    var bNum = <%=jj%>
    var fNum = <%=kk%>
    var cc = 0
    var bb = 0
    var ff = 0
    var temp=document.isc.building
    function redirect(x){
    cc = x
    for (m=temp.options.length-1;m>0;m--)
      temp.options[m]=null
      temp.options[0]=new Option("No Building", "0")
      if (cc!=0) {
        for (i=1;i<=group[cc-1].length;i++){
          temp.options=new Option(group[cc-1][i-1].text,group[cc-1][i-1].value)
    temp.options[0].selected=true
    redirect1(0)
    var group=new Array(cNum)
    for (i=0; i<cNum; i++) {
    group[i]=new Array()
    <% for (int i=0; i< bm.length; i++) {
    Iterator bldgs = bm[i].keySet().iterator();
    int j = 0;
    while (bldgs.hasNext()) {
    Integer intJ =(Integer) bldgs.next(); %>
    group[<%=i%>][<%=j%>] = new Option("<%=bm[i].get(intJ)%>", "<%=intJ%>");
    <% j++;
    } %>
    var group2=new Array(cNum)
    for (i=0; i<cNum; i++) {
    group2[i] = new Array()
    for (j=0; j<=bNum; j++) {
    group2[i][j] = new Array()
    <% for (int i=0; i< fm.length; i++) {
    for (int j=0; j< fm[i].length; j++) {
    Iterator flrs = fm[i][j].keySet().iterator();
    int k = 0;
    while (flrs.hasNext()) {
    Integer intK =(Integer) flrs.next(); %>
    group2[<%=i%>][<%=j%>][<%=k%>] = new Option("<%=fm[i][j].get(intK)%>", "<%=intK%>");
    <% k++;
    } %>
    var temp1=document.isc.floor
    var camp=document.isc.campus.options.selectedIndex
    function redirect1(x){
    bb = x
    for (m=temp1.options.length-1;m>0;m--)
    temp1.options[m]=null
    temp1.options[0]=new Option("No Floor", "0")
    if (cc!=0 && bb!=0) {
    for (i=1;i<=group2[cc-1][bb-1].length;i++){
    temp1.options[i]=new Option(group2[cc-1][bb-1][i-1].text,group2[cc-1][bb-1][i-1].value)
    temp1.options[0].selected=true
    redirect2(0)
    var group3=new Array(cNum)
    for (i=0; i<cNum; i++) {
    group3[i] = new Array()
    for (j=0; j<=bNum; j++) {
    group3[i][j] = new Array()
    for (k=0; k<=fNum; k++) {
    group3[i][j][k] = new Array()
    <% for (int i=0; i< lm.length; i++) {
    for (int j=0; j< lm[i].length; j++) {
    for (int k=0; k< lm[i][j].length; k++) {
    Iterator locs = lm[i][j][k].keySet().iterator();
    int m = 0;
    while (locs.hasNext()) {
    Integer intM =(Integer) locs.next(); %>
    group3[<%=i%>][<%=j%>][<%=k%>][<%=m%>] = new Option("<%=lm[i][j][k].get(intM)%>", "<%=intM%>");
    <% m++;
    } %>
    var temp2=document.isc.location_id
    function redirect2(x){
    ff = x
    for (m=temp2.options.length-1;m>0;m--)
    temp2.options[m]=null
    temp2.options[0]=new Option("No Room", "0")
    if (cc!=0 && bb!=0 && ff!=0) {
    for (i=1;i<=group3[cc-1][bb-1][ff-1].length;i++){
    temp2.options[i]=new Option(group3[cc-1][bb-1][ff-1][i-1].text,group3[cc-1][bb-1][ff-1][i-1].value)
    temp2.options[0].selected=true
    </script>
    This produces a related select list with 4 related lists by outputting JavaScript to the page being served. It works the same way as the first example that I describe but I don't understand the looping...maybe someone could explain how to go from the single select list to a double and/or triple level drill down?

  • Contact form not accepting certain characters in the email box

    Hi, i am currently using a flash template from flashmo.com and i have installed it etc... The problem i have is that when you go to send a message in the contact form you cannot enter certain characters in the email box, especially the '@' symbol, hw do i go about fixing this?
    Thanks a lot

    for each textfield you see in the ide, click it (to select it) and check the properties panel/embed fonts to make sure all characters needed in your app are checked.

  • Question about using the Combo Box feature!

    I have a form that I am trying to create for our company that will allow our field nurses to select what they need and print it more effieciently.  The problem is that some of the selections are too long and I can't get the Combo box feature to allow them to be printed on multiple lines:
    I have spoken to my supervisor about redoing the form to look like this:
    But in order for us to meet state guidelines it has to be formated like the first because that is the state form given to us.  I want to be able to either:
    A) have the combo box multi-line auto text sized so it will get all the information into each box
    OR
    B) create text boxes at the end of the form that auto enteries the selected data from the second picture into boxes that look like the first picture.
    Is there any way to do either of these?

    A) No.
    B) Yes. Create a text box with the following code as the custom calculation
    script (assuming the name of the combo is "Combo Box1"):
    event.value = this.getField("Combo Box1").value;
    That way, when the user makes a selection in the combo-box, the value will
    also appear in the text box. Just make sure to make the text box read-only
    and set the combo-box to apply the selection immediately.

Maybe you are looking for

  • How do I fix my Resolution ?

    Can any one tell me how to put my resolution back to 2048 x 1536... I have the iPad 3 and after upgrading from IOS 6 to the IOS 7 my screen is 768 x 1024  surely some one out there can help me with this problem!

  • Working with RAW and JPEG Images in Aperture (2 part question)

    I just edited a RAW file and stamped the adjustments into the JPEG file. Then applied some RAW fine tuning to the RAW image. For the life of me I cannot tell the difference between the two images and I will not blow up beyond 8 x 10. So is shooting R

  • Timed out using .Mac

    I am being timed out even when composing an email in .Mac which seems to be part of .Mac security. Can I increase my "timed in" quota? What happens to the email I am in the middle of composing which did not get sent.

  • Conflicts with two phones on itunes

    My husband iphone 4 stopped working so he got the iphone5 which he gave to me and I gave him my 4s.  I have an Itunes account and when I set up an account for him it now effects both us each time we make changes to our phones.  I was able to transfer

  • Vendor consigment process

    Hi, I want to know the detail step of customizing and also how to process a consigment PO and how to clear the vendor payment, and initially as in consignment we are giving payment after consuming of material then how to make GR if vendor is under ex