]> source.dussan.org Git - vaadin-framework.git/commitdiff
Better positioning for selects with lazy loading
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 12 Sep 2007 12:47:53 +0000 (12:47 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 12 Sep 2007 12:47:53 +0000 (12:47 +0000)
svn changeset:2291/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java

index b9bafd2640b552ca3cd07f82e144d2c6dec63d20..787b65d9e00f2a030b85a759715034709f406156 100644 (file)
@@ -73,6 +73,10 @@ public class IFilterSelect extends Composite implements Paintable,
                }
        }
 
+       /**
+        * @author mattitahvonen
+        *
+        */
        public class SuggestionPopup extends PopupPanel implements PositionCallback {
                private SuggestionMenu menu;
 
@@ -186,11 +190,16 @@ public class IFilterSelect extends Composite implements Paintable,
                                DOM.setStyleAttribute(this.up, "display", "none");
                                DOM.setStyleAttribute(this.status, "display", "none");
                        }
+                       isPagingEnabled = paging;
                }
 
+               
+               /* (non-Javadoc)
+                * @see com.google.gwt.user.client.ui.PopupPanel$PositionCallback#setPosition(int, int)
+                */
                public void setPosition(int offsetWidth, int offsetHeight) {
                        ApplicationConnection.getConsole().log("callback");
-                       if (offsetHeight > Window.getClientHeight()) {
+                       if (!isPagingEnabled && offsetHeight > Window.getClientHeight()) {
                                offsetHeight = Window.getClientHeight();
                                menu.setHeight(offsetHeight + "px");
                                DOM.setStyleAttribute(menu.getElement(), "overflow", "auto");