comboboxsearchable and event handling

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

comboboxsearchable and event handling

Postby ksmani » Thu Apr 01, 2010 11:16 am

I am using a searchable combobox. The wildcard search is enabled and will be used.

Requirement is that depending upon the selection on this searchableCombo, i have to update two other components. The problem is which listener should I use ? I tried itemListener, actionListener, popuplistener, keyListener (on editorcomponent) etc. They all fire straightway after the first key stroke and the popup closes. This defeats the puprpose of using the UP/DOWN arrow key for traversing through the subsequent occurrences of the searched items. Relevant part of code is:
Code: Select all
      iColumnNameComboBox.setModel(iColumnNameModel);
      
      ComboBoxSearchable mSearchableCombo = new ComboBoxSearchable(iColumnNameComboBox);
      
      
      iColumnNameComboBox.addItemListener(new ItemListener() {
         public void itemStateChanged(ItemEvent e) {
            if (e.getStateChange() == ItemEvent.SELECTED) {
               AdHocColumnDescriptor mDescriptor = (AdHocColumnDescriptor) iColumnNameComboBox
                     .getSelectedItem();
               if (mDescriptor != null) {
                  if (iSqlOperatorComboBox.getModel().getSize() > 0) {
                     iSqlOperatorComboBox.setSelectedIndex(0);
                  }
                  iOperatorModel.setColumn(mDescriptor);
                  replaceColumnValueEditor(mDescriptor.getValueEditor());
                  resize();
               }
            }
         }
      });
      
       add(iColumnNameComboBox);
      


Please help me !!
ksmani
 
Posts: 20
Joined: Tue Aug 29, 2006 12:28 pm

Re: comboboxsearchable and event handling

Postby JIDE Support » Thu Apr 01, 2010 11:34 am

Please try to register a popup menu listener and check from the stack trace about which reason causes the popup invisible. Looks to me, it is possible that focus is lost at that time, which causes the popup invisible..

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 33793
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 1 guest

cron