Set ComboBox AutoReducible

Help is preferred to those who publish their work as Open Source and not as private branches rejecting collaboration. Such projects are not maintainable and shall be deleted.
Forum rules
This forum is personally pruned to avoid redundant posts. Related topics are grouped together. IF YOU HAVE REGISTERED, you need to send email to red1(a)red1.org with your username in the subject title to get me to activate you.

Set ComboBox AutoReducible

Postby yansolo » Wed Mar 30, 2011 4:58 pm

In Compiere, when you have a Combobox, you can type any character from the line and the list reduct itself automatically.
In Adempiere, you have to write the character in the correct order.

I found this behaviour very boring, and i'm trying to implement the Compiere solution into Adempiere (firstly in swing, and maybe later in webUI)

I have updated CCombobox by including missins methods.

Now, it works perfectly on forms (eg : language on login, bpartner on VPaySelect, ...)
But not at all in windows.

I have 2 questions :
1 - do you know where in the code, i should look at ?
2 - why adempiere choose to give up this useful device ? (and maybe on an older version, this was implemented, so i can have a look on a "vintage" code ?)


Of course, if you're interested in, i would be happy to share

Thanks,

Yan
yansolo
 
Posts: 48
Joined: Tue Mar 22, 2011 9:28 pm

Re: Set ComboBox AutoReducible

Postby red1 » Sat Apr 02, 2011 10:56 am

Thanks Yan, this looks like a useful piece!. And of course you are welcomed to contribute anyway you prefer. Either write about how it is done with reference to the Java classes or send it to me to publish them. I will ask for rights to Carlos Ruiz branch on how best to incorporate such features into his for our benefit later.
red1
Site Admin
 
Posts: 2762
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Set ComboBox AutoReducible

Postby yansolo » Wed Apr 06, 2011 3:40 am

Red1, I send you the CCombobox class by mail.

I'm not a real developer, just doing it because anyone else can do it for me.
I compare CCombobox from Compiere(302) & Adempiere (trunk) and added missing methods into.

It seems to work properly on forms but in windows, it's catastrophic.

Do you why this functionality was given up ? I think it was still implanted in the earlier Compiere version (and thus, in adempiere too)

Thanks
yansolo
 
Posts: 48
Joined: Tue Mar 22, 2011 9:28 pm

Re: Set ComboBox AutoReducible

Postby red1 » Thu Apr 07, 2011 5:40 pm

Here is the code conveyed by Yansolo:
Code: Select all
Index: CComboBox.java
===================================================================
--- CComboBox.java   (rÈvision 180)
+++ CComboBox.java   (copie de travail)
@@ -17,16 +17,32 @@
package org.compiere.swing;

import java.awt.Color;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
+import java.util.ArrayList;
import java.util.Vector;

import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
+import javax.swing.FocusManager;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JComponent;
+import javax.swing.JTextField;
+import javax.swing.MutableComboBoxModel;
+import javax.swing.SwingUtilities;
+import javax.swing.event.EventListenerList;
+import javax.swing.event.ListDataEvent;
+import javax.swing.event.ListDataListener;
import javax.swing.plaf.ComboBoxUI;
+import javax.swing.text.JTextComponent;

import org.adempiere.plaf.AdempierePLAF;
import org.compiere.plaf.CompiereComboBoxUI;
@@ -140,13 +156,89 @@
   
   /** Field Height              */
   public static int           FIELD_HIGHT = 0;
+   
+   /** Property key for auto-reduction.             */
+   public static final String AUTO_REDUCIBLE_PROPERTY = "autoReducible";

+   /** Property key for case sensitive auto-reduction.             */
+   public static final String CASE_SENSITIVE_PROPERTY = "caseSensitive";
+
+   /** View model for hiding showing only filtered data             */
+   ReducibleModel m_reducibleModel;
+
+   /** Key listener for triggering an update the filtering model .             */
+   private ReducibleKeyListener reducibleKeyListener = new ReducibleKeyListener();
+
+   /** Reference Field         */
+   private static  JTextField  s_text = new JTextField(15);
+
   /**
    *  Common Init
    */
   private void init()
   {
      FIELD_HIGHT = getPreferredSize().height;
+      
+      setEditable(true);
+       setAutoReducible(true);
+       
+       addMouseListener(new MouseAdapter()
+      {
+         public void mousePressed(MouseEvent me) {
+            if (SwingUtilities.isLeftMouseButton(me) && isAutoReducible())
+               updateReducibleModel(false);
+         }
+      });
+      
+      // when auto-reducing, the focus listener will ensure all data choices
+      // are shown on initial focus, and that a valid selection is in place
+      // when focus is lost
+      final JTextComponent textComponent =
+         (JTextComponent)getEditor().getEditorComponent();
+      textComponent.addFocusListener(new FocusListener()
+      {
+         public void focusGained(FocusEvent fe)
+         {
+            if (isEditable())
+               textComponent.selectAll();
+            textComponent.repaint();
+         }
+         
+         public void focusLost(FocusEvent fe)
+         {
+            if (isAutoReducible())
+            {
+               Object item = m_reducibleModel.getSelectedItem();
+               item = (item == null && m_reducibleModel.getSize() != 0) ?
+                  m_reducibleModel.getElementAt(0) : item;
+               if (item == null)
+               {
+                  updateReducibleModel(false);
+                  if (m_reducibleModel.getSize() != 0)
+                     item = m_reducibleModel.getElementAt(0);
+                  else
+                     return;
+               }
+               m_reducibleModel.setSelectedItem(item);
+            }
+            textComponent.setCaretPosition(0);
+            hidePopup();
+            textComponent.repaint();
+         }
+      });
+      
+      textComponent.addMouseListener(new MouseAdapter()
+      {
+         public void mouseClicked(MouseEvent me) {
+            if (SwingUtilities.isLeftMouseButton(me) &&
+               isAutoReducible() &&
+               !isPopupVisible())
+            {
+               updateReducibleModel(false);
+               showPopup();
+            }
+         }
+      });
   }   //  init


@@ -166,7 +258,25 @@
      m_icon = defaultIcon;
   }   //  setIcon

+   
+   public ComboBoxModel getCompleteComboBoxModel()
+   {
+      return m_reducibleModel.getModel();
+   }   //   getCompleteComboBoxModel
+   
   /**
+    * @see javax.swing.JComboBox#setModel(javax.swing.ComboBoxModel)
+    */
+   public void setModel(ComboBoxModel aModel)
+   {
+      m_reducibleModel = (m_reducibleModel == null) ? new ReducibleModel() : m_reducibleModel;
+      m_reducibleModel.setModel(aModel);
+      
+      super.setModel(m_reducibleModel);
+   }   //   setModel
+   
+   
+   /**
    *  Set UI and re-set Icon for arrow button
    *  @param ui
    */
@@ -345,4 +455,538 @@
         setName(actionCommand);
   }   //   setActionCommand

+   
+   /**
+    * Called only when auto-reducing.  By default, does a case insensitive
+    * string search for a match in the string representation of the given
+    * element.
+    *
+    * @param element an element in the combo box model
+    *
+    * @return true if the choice is to be displayed in the popup menu
+    */
+   protected boolean isMatchingFilter(Object element)
+   {
+      String str = (element != null) ? element.toString().trim() : "";
+      str = isCaseSensitive() ? str : str.toLowerCase();
+
+      return str.indexOf(m_reducibleModel.getMatchingFilter()) > -1;
+   }
+   
+   /**
+    * Is the combo box auto-reducible?
+    *
+    * @return true if isAutoReducible()
+    */
+   public boolean isAutoReducible()
+   {
+      Boolean b = (Boolean)getClientProperty(AUTO_REDUCIBLE_PROPERTY);
+      return (b != null) && b.booleanValue();
+   }
+   
+   /**
+    * Set whether the combo box is auto-reducible.  The combo box must also be editable
+    * for auto-reduction to fully functional.  Auto-reduction of data will preclude
+    * the ability for users to enter in their own choices.
+    *
+    * @param autoreducible true will activate auto-reduction of choices when user enters text
+    */
+   public void setAutoReducible(boolean autoreducible)
+   {
+      if (isAutoReducible() != autoreducible)
+      {
+         putClientProperty(AUTO_REDUCIBLE_PROPERTY, Boolean.valueOf(autoreducible));
+         updateReducibleModel(false);
+
+         JTextComponent textComponent =
+            (JTextComponent)getEditor().getEditorComponent();
+         if (autoreducible)
+            textComponent.addKeyListener(reducibleKeyListener);
+         else
+            textComponent.removeKeyListener(reducibleKeyListener);
+      }
+   }
+   
+   /**
+    * Is the auto-reduction case sensitive?
+    *
+    * @return true if case sensitive
+    */
+   public boolean isCaseSensitive()
+   {
+      Boolean b = (Boolean)getClientProperty(CASE_SENSITIVE_PROPERTY);
+      return (b != null) && b.booleanValue();
+   }
+   
+   /* (non-Javadoc)
+    * @see javax.swing.JComboBox#removeAllItems()
+    */
+   public void removeAllItems()
+   {
+      m_reducibleModel.removeAllElements();
+   }
+   
+   /**
+    * Set whether auto-reduction is case sensitive.
+    *
+    * @param caseSensitive true will make auto-reduction is case sensitive
+    */
+   public void setCaseSensitive(boolean caseSensitive)
+   {
+      putClientProperty(CASE_SENSITIVE_PROPERTY, Boolean.valueOf(caseSensitive));
+   }
+   
+   /**
+    * Updates the auto-reduction model.
+    *
+    * @param filtering true if the underlying data model should be filtered
+    */
+   void updateReducibleModel(boolean filtering)
+   {
+      if (filtering ||
+         m_reducibleModel.getSize() != m_reducibleModel.getModel().getSize())
+      {
+         if (getParent() != null)
+            hidePopup();
+         
+         // remember to caret position
+         JTextComponent textComponent =
+            (JTextComponent)getEditor().getEditorComponent();
+         int pos = textComponent.getCaretPosition();
+         m_reducibleModel.setFilter(textComponent.getText());
+         
+         // update the model
+         m_reducibleModel.updateModel(filtering);
+
+         // reset the caret
+         textComponent.setText(m_reducibleModel.getFilter());
+         textComponent.setCaretPosition(pos);
+         
+         // ensure the combo box is resized to match the popup, if necessary
+         if (getParent() != null)
+         {
+            getParent().validate();
+            getParent().repaint();
+            
+            if (isShowing() && m_reducibleModel.getSize() > 0) {
+               // only show the popup if there is something to show
+               showPopup();
+            }
+         }
+      }
+   }
+   
+   /**
+    * A view adapter model to hide filtered choices in the underlying combo box model.
+    */
+   private class ReducibleModel implements MutableComboBoxModel, ListDataListener
+   {
+      /**
+       * Default constructor.  Creates a ReducibleModel.
+       */
+      public ReducibleModel()
+      {
+      }
+      
+      /** The wrapped data model. */
+      private ComboBoxModel m_model;
+      
+      /** The wrapped data model. */
+      private EventListenerList m_listenerList = new EventListenerList();
+      
+      /** The filtered data. */
+      private ArrayList<Object> m_visibleData = new ArrayList<Object>();
+      
+      /** The filtered data. */
+      private ArrayList<Object> m_modelData = new ArrayList<Object>();
+
+      /** The current filter. */
+      private String m_filter = "";
+
+      /** The cached filter for case insensitive filtering. */
+      private String m_lcFilter = "";
+      
+      /**
+       * Pass through to the wrapped model if underlying model is MutableComboBoxModel.
+       *
+       * @see javax.swing.DefaultComboBoxModel#addElement(java.lang.Object)
+       */
+      public void addElement(Object anObject)
+      {
+         checkMutableComboBoxModel();
+         m_modelData.add(anObject);
+         ((MutableComboBoxModel)m_model).addElement(anObject);
+      }
+      
+      /* (non-Javadoc)
+       * @see javax.swing.ListModel#addListDataListener(javax.swing.event.ListDataListener)
+       */
+      public void addListDataListener(ListDataListener ldl)
+      {
+         m_listenerList.remove(ListDataListener.class, ldl);
+         m_listenerList.add(ListDataListener.class, ldl);
+      }
+
+       /**
+        * Checks that the <code>dataModel</code> is an instance of
+        * <code>MutableComboBoxModel</code>.  If not, it throws an exception.
+        *
+        * @exception RuntimeException if <code>dataModel</code> is not an
+        *      instance of <code>MutableComboBoxModel</code>.
+        */
+       void checkMutableComboBoxModel()
+       {
+           if ( !(m_model instanceof MutableComboBoxModel) )
+               throw new RuntimeException("Cannot use this method with a non-Mutable data model.");
+       }
+      
+      /* (non-Javadoc)
+       * @see javax.swing.event.ListDataListener#contentsChanged(javax.swing.event.ListDataEvent)
+       */
+      public void contentsChanged(ListDataEvent lde)
+      {
+         updateDataModel();
+         updateModel(false);
+         
+         if (isPopupVisible())
+         {
+            hidePopup();
+            showPopup();
+         }
+      }
+      
+      /**
+       *
+       */
+      private void fireContentsChanged()
+      {
+         ListDataEvent lde = null;
+         for (ListDataListener ldl : getListDataListeners())
+         {
+            lde = (lde == null) ?
+               new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, 0, getSize()) : lde;
+            ldl.contentsChanged(lde);
+         }
+      }
+      
+      /* (non-Javadoc)
+       * @see javax.swing.ListModel#getElementAt(int)
+       */
+      public Object getElementAt(int index)
+      {
+         return m_visibleData.get(index);
+      }
+      
+      /**
+       * Return the current filter.
+       *
+       * @return the filter
+       */
+      public String getFilter()
+      {
+         return m_filter;
+      }
+      
+      /**
+       *
+       */
+      public ListDataListener[] getListDataListeners()
+      {
+         return (ListDataListener[])m_listenerList.getListeners(ListDataListener.class);
+      }
+      
+      /**
+       * @return the filter to use for matching; hecks case sensistivity
+       */
+      protected String getMatchingFilter()
+      {
+         return isCaseSensitive() ? m_filter : m_lcFilter;
+      }
+      
+      /**
+       * @return the wrapped model
+       */
+      public ComboBoxModel getModel()
+      {
+         return m_model;
+      }
+      
+      /**
+       * @return the selected item in the wrapped model
+       *
+       * @see javax.swing.DefaultComboBoxModel#getSelectedItem()
+       */
+      public Object getSelectedItem()
+      {
+         return m_model.getSelectedItem();
+      }
+      
+      /* (non-Javadoc)
+       * @see javax.swing.ListModel#getSize()
+       */
+      public int getSize()
+      {
+         return m_visibleData.size();
+      }
+      
+      /**
+       * Pass through to the wrapped model if underlying model is MutableComboBoxModel.
+       *
+       * @see javax.swing.DefaultComboBoxModel#insertElementAt(java.lang.Object, int)
+       */
+      public void insertElementAt(Object anObject, int index)
+      {
+         checkMutableComboBoxModel();
+         m_modelData.add(index, anObject);
+         ((MutableComboBoxModel)m_model).insertElementAt(anObject, index);
+      }
+      
+      /**
+       * Pass through to the wrapped model if underlying model is MutableComboBoxModel.
+       *
+       * @see javax.swing.event.ListDataListener#intervalAdded(javax.swing.event.ListDataEvent)
+       */
+      public void intervalAdded(ListDataEvent lde)
+      {
+         updateDataModel();
+         updateModel(false);
+      }
+      
+      /**
+       * Pass through to the wrapped model if underlying model is MutableComboBoxModel.
+       *
+       * @see javax.swing.event.ListDataListener#intervalRemoved(javax.swing.event.ListDataEvent)
+       */
+      public void intervalRemoved(ListDataEvent lde)
+      {
+         updateDataModel();
+         updateModel(false);
+      }
+      
+      /**
+       *
+       */
+      public void removeAllElements()
+      {
+         checkMutableComboBoxModel();
+         
+         ListDataListener[] listeners = getListDataListeners();
+         for (int i = 0; i < listeners.length; i++)
+            removeListDataListener(listeners[i]);
+         m_model.removeListDataListener(this);
+
+         m_modelData.clear();
+         m_visibleData.clear();
+         while (m_model.getSize() > 0)
+            ((MutableComboBoxModel)m_model).removeElementAt(0);
+
+         for (ListDataListener ldl : listeners)
+            addListDataListener(ldl);
+         m_model.addListDataListener(this);
+         
+         updateModel(false);
+      }
+      
+      /**
+       * Pass through to the wrapped model if underlying model is MutableComboBoxModel.
+       *
+       * @see javax.swing.DefaultComboBoxModel#removeElement(java.lang.Object)
+       */
+      public void removeElement(Object anObject)
+      {
+         checkMutableComboBoxModel();
+         m_modelData.remove(anObject);
+         m_visibleData.clear();
+         ((MutableComboBoxModel)m_model).removeElement(anObject);
+      }
+      
+      /**
+       * Pass through to the wrapped model if underlying model is MutableComboBoxModel.
+       *
+       * @see javax.swing.DefaultComboBoxModel#removeElementAt(int)
+       */
+      public void removeElementAt(int index)
+      {
+         checkMutableComboBoxModel();
+         m_modelData.remove(index);
+         m_visibleData.clear();
+         ((MutableComboBoxModel)m_model).removeElementAt(index);
+      }
+      
+      /* (non-Javadoc)
+       * @see javax.swing.ListModel#removeListDataListener(javax.swing.event.ListDataListener)
+       */
+      public void removeListDataListener(ListDataListener ldl)
+      {
+         m_listenerList.remove(ListDataListener.class, ldl);
+      }
+      
+      /**
+       * @param filter the filter to set
+       */
+      public void setFilter(String filter)
+      {
+         this.m_filter = (filter != null) ? filter : "";
+         m_lcFilter = filter.trim().toLowerCase();
+      }
+      
+      /**
+       * Set the wrapped combo box model.
+       *
+       * @param model the model to set
+       */
+      public void setModel(ComboBoxModel model)
+      {
+         if (this.m_model != null)
+            this.m_model.removeListDataListener(this);
+         
+         this.m_model = model;
+         updateDataModel();
+         m_filter = "";
+         
+         model.addListDataListener(this);
+         updateModel(false);
+      }
+      
+      /**
+       * Set the selected item in the wrapped model.
+       *
+       * @see javax.swing.DefaultComboBoxModel#setSelectedItem(java.lang.Object)
+       */
+      public void setSelectedItem(Object anObject)
+      {
+         if (anObject == null || m_modelData.contains(anObject))
+            m_model.setSelectedItem(anObject);
+      }
+
+      /**
+       * Updates the view model based on whether filtering or not.
+       *
+       * @param filtering true if the underlying model is to be filtered
+       */
+      public void updateDataModel()
+      {
+         m_modelData.clear();
+         int size = m_model.getSize();
+         for (int i = 0; i < size; i++)
+            m_modelData.add(m_model.getElementAt(i));
+      }
+
+      /**
+       * Updates the view model based on whether filtering or not.
+       *
+       * @param filtering true if the underlying model is to be filtered
+       */
+      public void updateModel(boolean filtering)
+      {
+         boolean includeAll = !filtering || !isAutoReducible() || "".equals(m_lcFilter);
+         if (includeAll)
+         {
+            m_visibleData.clear();
+            m_visibleData.addAll(m_modelData);
+         }
+         else
+         {
+            m_visibleData.clear();
+            Object selected = getSelectedItem();
+            ListDataListener[] listeners = getListDataListeners();
+            for (int i = 0; i < listeners.length; i++)
+               removeListDataListener(listeners[i]);
+            m_model.removeListDataListener(this);
+            
+            
+            int size = m_model.getSize();
+                     
+            for (int i = 0; i < size; i++)
+            {
+               Object element = m_model.getElementAt(i);
+               if (element == null || isMatchingFilter(element))
+               {
+                  m_visibleData.add(element);
+               }
+            }
+            
+            if (m_visibleData.contains(selected) || selected == null)
+               setSelectedItem(selected);
+   
+            for (ListDataListener ldl : listeners)
+               addListDataListener(ldl);
+            m_model.addListDataListener(this);
+         }
+         
+         fireContentsChanged();
+      }
+   }   //   ReducibleModel
+      
+   /**
+    * Key listener for editor's text compontent to trigger auto-reduction.  Only
+    * used when auto-reduction is enabled.
+    */
+   class ReducibleKeyListener extends KeyAdapter
+   {
+      /** Invokes autoreduction. */
+      private Runnable m_invoker = new Runnable()
+      {
+         public void run()
+         {
+            updateReducibleModel(true);
+         }
+      };
+
+      /** Visibly updates the popup menu. */
+      private Runnable m_updateMenu = new Runnable()
+      {
+         public void run()
+         {
+            hidePopup();
+            getParent().validate();
+            getParent().repaint();
+            showPopup();
+         }
+      };
+      
+      /* (non-Javadoc)
+       * @see java.awt.event.KeyAdapter#keyPressed(java.awt.event.KeyEvent)
+       */
+      public void keyPressed(KeyEvent ke)
+      {   
+         if (ke.getKeyCode() != KeyEvent.VK_CONTROL &&
+            ke.getKeyCode() != KeyEvent.VK_ALT &&
+            ke.getKeyCode() != KeyEvent.VK_SHIFT &&
+            ( ke.getModifiersEx() & InputEvent.ALT_DOWN_MASK ) == 0 )
+         {
+            if (ke.getKeyCode() == KeyEvent.VK_ENTER ||
+                    ke.getKeyCode() == KeyEvent.VK_TAB)
+            {
+               // enter key pressed, so complete editing and select item
+               Object selObject = getSelectedItem();
+               selObject = (selObject == null && getItemCount() > 0) ? getItemAt(0) : selObject;
+               setSelectedItem(selObject);
+               getEditor().setItem(getSelectedItem());
+            }
+             else if (ke.getKeyCode() == KeyEvent.VK_ESCAPE)
+             {
+                // escape key ends editing and rejects focus of text editor
+                FocusManager.getCurrentManager().upFocusCycle();
+             }
+             else if (ke.getKeyCode() == KeyEvent.VK_UP ||
+                   ke.getKeyCode() == KeyEvent.VK_KP_UP ||
+                   ke.getKeyCode() == KeyEvent.VK_DOWN ||
+                   ke.getKeyCode() == KeyEvent.VK_KP_DOWN)
+            {
+               // up or down selects new value
+               SwingUtilities.invokeLater(m_updateMenu);
+            }
+            else
+            {
+               // key typed, so filter
+               SwingUtilities.invokeLater(m_invoker);
+               setSelectedItem(null);
+            }
+         }
+      }
+   }   //   ReducibleKeyListener
+
+   
+   
}   //  CComboBox
red1
Site Admin
 
Posts: 2762
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Set ComboBox AutoReducible

Postby Derek » Sat Apr 30, 2011 11:37 am

Hi, Yansolo, pls check the sulotion :

except CCombobox.java,
three modifications are needed to be applied:
1.in VComboBox.getDisplay()
modify "if (getSelectedIndex() == -1)" to "if (getSelectedItem() == null)"
2.in VComboBox.java
add a method as below:
@Override
protected boolean isMatchingFilter(Object element)
{
if (element instanceof NamePair)
element = ((NamePair)element).getName();
return super.isMatchingFilter(element);
}
3.in VLookup.java
search and comment the line as below:
//AutoCompletion.enable(m_combo);

then it should work properly.
If any bugs found, pls inform me here, I will try to fix, thx.
Derek
 
Posts: 35
Joined: Mon Mar 21, 2011 9:21 pm

Re: Set ComboBox AutoReducible

Postby yansolo » Sat Apr 30, 2011 4:18 pm

Hi Derek,

I've apply your modifications and it seems to work fine !
I've try different windows and forms and no error message, just autoreducible comboboxes !

I'm on a customer site but i will try to deploy this modification to our internal Adempiere so we can test it.
When done, i will post the entire solution

A big thankyou !

Yan
yansolo
 
Posts: 48
Joined: Tue Mar 22, 2011 9:28 pm

Re: Set ComboBox AutoReducible

Postby Derek » Sat Apr 30, 2011 11:18 pm

seems not work well with other look and feel (not adempiere).....have no idea...
Derek
 
Posts: 35
Joined: Mon Mar 21, 2011 9:21 pm

Re: Set ComboBox AutoReducible

Postby yansolo » Wed May 04, 2011 6:33 pm

i noticed it with Nimbus theme.
Exit and lon on the application and change theme and it was ok.

Let's hope nobody know how to change theme :-)

Yan
yansolo
 
Posts: 48
Joined: Tue Mar 22, 2011 9:28 pm

Re: Set ComboBox AutoReducible

Postby globalqss » Thu May 05, 2011 10:53 am

Thanks guys, I tested it and liked it.

Integrated to branches globalqss adempiere361 and iDempiere:
http://hg.idempiere.com/idempiere/issue ... oreducible

Regards,

Carlos Ruiz
globalqss
Senior
 
Posts: 599
Joined: Thu Dec 29, 2005 4:15 am
Location: Bogotá, Colombia

Re: Set ComboBox AutoReducible

Postby Derek » Thu May 05, 2011 8:54 pm

hi, Carlos, if you got the idea to solve the problem under other look and feel, pls let me know, thx.
Derek
 
Posts: 35
Joined: Mon Mar 21, 2011 9:21 pm

Re: Set ComboBox AutoReducible

Postby globalqss » Fri May 06, 2011 12:34 am

Hi Derek, I've seen lot of other things broken in other L&F - so I consider that those are not maintained.

For example in windows L&F the horizontal tab is not properly implemented.
In some L&F the right click doesn't work!

In iDempiere I think we're going to deprecate things that don't have a proper maintainer.

Regards,

Carlos Ruiz
globalqss
Senior
 
Posts: 599
Joined: Thu Dec 29, 2005 4:15 am
Location: Bogotá, Colombia

Re: Set ComboBox AutoReducible

Postby tspc » Tue Jul 12, 2011 3:55 pm

Has anyone experienced any problems with this change using swing client and the advanced search tab?
For example, log into swing client, select product window. In the "Lookup Record" window, which is displayed, click on the "Advanced" tab. If you try to create a new query, it cannot be saved. Also if an existing saved query exists, it is displayed when the window first opens. The tests were performed on recent 360 + latest patches from globalqss.
Regards,
Tony
tspc
 
Posts: 5
Joined: Mon Mar 21, 2011 3:09 pm

Re: Set ComboBox AutoReducible

Postby a42niem » Tue Jul 12, 2011 4:22 pm

I can confirm that behavior.

Regards,

Dirk
a42niem
 
Posts: 30
Joined: Fri Apr 01, 2011 3:00 pm

Re: Set ComboBox AutoReducible

Postby globalqss » Tue Aug 23, 2011 11:19 am

globalqss
Senior
 
Posts: 599
Joined: Thu Dec 29, 2005 4:15 am
Location: Bogotá, Colombia

Re: Set ComboBox AutoReducible

Postby hahmed » Tue Sep 06, 2011 7:59 pm

The new ComboBox seems to be breaking the keyboard shortcut for save functionality. Tried on Linux and Windows and got the same error. To reproduce do this:

- Open Product Window with any product, try to change the anything that uses the ComboBox (e.g. UoM) which STILL IN THE Combobox, press F4 to save.

It will give the error that UoM has to be selected. My first guess (I haven't checked the code at all) is that the ComboBox is not filtering Function keys.
hahmed
 
Posts: 12
Joined: Tue Sep 06, 2011 4:55 pm

Re: Set ComboBox AutoReducible

Postby globalqss » Sun Sep 25, 2011 5:57 am

Hi Hahmed, thanks for reporting.

Solved here:
http://jira.idempiere.com/browse/IDEMPIERE-72

Regards,

Carlos Ruiz
globalqss
Senior
 
Posts: 599
Joined: Thu Dec 29, 2005 4:15 am
Location: Bogotá, Colombia

Re: Set ComboBox AutoReducible

Postby edwinang » Fri Nov 04, 2011 4:08 pm

Hi Carlos,

This is causing issue with Location form, field Country. Details have been posted in:

http://jira.idempiere.com/browse/IDEMPIERE-94

Regards,

Edwin Ang
edwinang
 
Posts: 35
Joined: Tue Jul 05, 2011 11:00 pm


Return to HELP ME!!!

Who is online

Users browsing this forum: No registered users and 3 guests

cron