From: Marc Englund Date: Fri, 29 Feb 2008 07:28:06 +0000 (+0000) Subject: Now could items right when nullselectionallowed (1-9/10 -> 1-9/9). Fixes #1453 X-Git-Tag: 6.7.0.beta1~5001 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0b587b21aa3f52af8d8eecdc02e0b7097dd1b8a1;p=vaadin-framework.git Now could items right when nullselectionallowed (1-9/10 -> 1-9/9). Fixes #1453 svn changeset:3946/svn branch:trunk --- 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, ""); }