diff options
author | Marc Englund <marc.englund@itmill.com> | 2008-02-29 07:28:06 +0000 |
---|---|---|
committer | Marc Englund <marc.englund@itmill.com> | 2008-02-29 07:28:06 +0000 |
commit | 0b587b21aa3f52af8d8eecdc02e0b7097dd1b8a1 (patch) | |
tree | df830a22d0c0f97738f4888b8a1731562dc0e567 | |
parent | c89adea3f89ef951c84848f278d0181b3f540bd2 (diff) | |
download | vaadin-framework-0b587b21aa3f52af8d8eecdc02e0b7097dd1b8a1.tar.gz vaadin-framework-0b587b21aa3f52af8d8eecdc02e0b7097dd1b8a1.zip |
Now could items right when nullselectionallowed (1-9/10 -> 1-9/9). Fixes #1453
svn changeset:3946/svn branch:trunk
-rw-r--r-- | src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java index 63d30768cc..34ed706f35 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IFilterSelect.java @@ -137,13 +137,17 @@ public class IFilterSelect extends Composite implements Paintable, int y = tb.getAbsoluteTop(); y += tb.getOffsetHeight(); setPopupPosition(x, y); - final int first = currentPage * PAGELENTH + 1; + final int first = currentPage * PAGELENTH + + (nullSelectionAllowed && currentPage > 0 ? 0 : 1); final int last = first + currentSuggestions.size() - 1; final int matches = totalSuggestions - (nullSelectionAllowed ? 1 : 0); if (last > 0) { + // nullsel not counted, as requested by user DOM.setInnerText(status, (totalSuggestions == 0 ? 0 : first) - + "-" + last + "/" + matches); + + "-" + + (nullSelectionAllowed && currentPage == 0 ? last - 1 + : last) + "/" + matches); } else { DOM.setInnerText(status, ""); } |