Retrieving selected AutoComplete Object
2013-05-19 19:21:29 GMT
I have a setback in using GlazedLists within my program and would love your assistance in solving this (probably simple) problem. I'm using an autocomplete text box: AutoCompleteSupport support = AutoCompleteSupport.install( comboBox, dataCenter.createCommands()); BasicEventList<Command> is what is used, and Command contains both a String and unique ID #. Essentially, right now I have the code working such that when the user presses enter, I look at the text inside the text box after an ActionEvent via: ((JTextField) comboBox.getEditor().getEditorComponent()).getText(); The problem with this is that I could have two Commands, both with the same name (which is the toString) but different unique ID's. Visually, I could overcome this via color coding, but functionally, I cannot determine the difference as the Strings are the same. Essentially what I'm asking is, Is there any way that I can see which Command (Object) was selected on ActionEvent? As opposed to just the String?
RSS Feed