ICEfaces
  1. ICEfaces
  2. ICE-6705

ice:selectInputText minChars does not work

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0, EE-1.8.2.GA_P04, 3.1
    • Fix Version/s: 3.2, EE-1.8.2.GA_P05
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Ubuntu 10.10, Eclipse Helios, Dynamic Web Project deployed under JBoss 6.0 Final

      Description

      minChars option in h:selectInputText element does not work at all.
      I created a componenent:
      <ice:selectInputText rows="6" width="300"
      listVar="comune"
      options="{minChars:3}"
      valueChangeListener="#{myBean.updateList}"
      listValue="#{myBean.listComuni}">
      ...
      </ice:selectInputText>

      but the method updateList() is called also with just one character

        Activity

        Hide
        Arran Mccullough added a comment -

        Attached test case that reproduces this issue.

        Show
        Arran Mccullough added a comment - Attached test case that reproduces this issue.
        Hide
        yip.ng added a comment - - edited

        Mysterious TypeError from anonymous function when you start typing. No way to debug. See screenshot-01.png. Same in component showcase. Error line is in bind() function in Prototype JS file lang.js. Need to fix this first.

        Show
        yip.ng added a comment - - edited Mysterious TypeError from anonymous function when you start typing. No way to debug. See screenshot-01.png. Same in component showcase. Error line is in bind() function in Prototype JS file lang.js. Need to fix this first.
        Hide
        yip.ng added a comment - - edited

        Error is caused by: (changes to bridge/lib/event.js)

        Revision: 29817, ICE-8038

        Reverted locally for now to proceed.

        Show
        yip.ng added a comment - - edited Error is caused by: (changes to bridge/lib/event.js) Revision: 29817, ICE-8038 Reverted locally for now to proceed.
        Hide
        yip.ng added a comment - - edited

        Exception in backing bean in test app.:

        5-Sep-2012 5:29:36 PM com.icesoft.icefaces.tutorial.component.autocomplete.AutoCompleteBean setMatches
        SEVERE: Erorr finding autocomplete matches
        java.lang.NullPointerException
        at java.util.Collections.binarySearch(Collections.java:306)
        at com.icesoft.icefaces.tutorial.component.autocomplete.AutoCompleteBean.setMatches(AutoCompleteBean.java:153)
        at com.icesoft.icefaces.tutorial.component.autocomplete.AutoCompleteBean.updateList(AutoCompleteBean.java:77)

        Tried debugging and fixing. Time-consuming. Don't want to waste any more time on it. Use component showcase instead for testing.

        Show
        yip.ng added a comment - - edited Exception in backing bean in test app.: 5-Sep-2012 5:29:36 PM com.icesoft.icefaces.tutorial.component.autocomplete.AutoCompleteBean setMatches SEVERE: Erorr finding autocomplete matches java.lang.NullPointerException at java.util.Collections.binarySearch(Collections.java:306) at com.icesoft.icefaces.tutorial.component.autocomplete.AutoCompleteBean.setMatches(AutoCompleteBean.java:153) at com.icesoft.icefaces.tutorial.component.autocomplete.AutoCompleteBean.updateList(AutoCompleteBean.java:77) Tried debugging and fixing. Time-consuming. Don't want to waste any more time on it. Use component showcase instead for testing.
        Hide
        yip.ng added a comment - - edited

        minChars is set to zero and then ignored to boot by us on purpose. The original Scriptaculous code doesn't have such logic. See screenshot-02.png. If we comment out our changes, then it works. See video: http://screencast.com/t/4RYGB5qmd.

        Our code dates back to the oldest revisions shown in svn log: (but it seems huge chunks of code were just copied/modified from somewhere else.)

        Setting minChars to 0:

        Revision: 11998
        Author: mircea
        Date: November-13-06 3:36:00 PM
        Message: Fix potential memory leak.

        Ignoring minChars in making calls to update:

        Revision: 13146
        Author: rmayhew
        Date: February-06-07 3:30:09 PM
        Message: Autocomplete fixed. IRAP 1300

        Show
        yip.ng added a comment - - edited minChars is set to zero and then ignored to boot by us on purpose. The original Scriptaculous code doesn't have such logic. See screenshot-02.png. If we comment out our changes, then it works. See video: http://screencast.com/t/4RYGB5qmd . Our code dates back to the oldest revisions shown in svn log: (but it seems huge chunks of code were just copied/modified from somewhere else.) Setting minChars to 0: Revision: 11998 Author: mircea Date: November-13-06 3:36:00 PM Message: Fix potential memory leak. Ignoring minChars in making calls to update: Revision: 13146 Author: rmayhew Date: February-06-07 3:30:09 PM Message: Autocomplete fixed. IRAP 1300
        Hide
        yip.ng added a comment - - edited

        Code restored to like originally in Scriptaculous. Error caused by bridge code changes mentioned above (http://jira.icesoft.org/browse/ICE-6705?focusedCommentId=42020&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_42020) still exists. (In 1.8 only. 3.2 seems fine.)

        Modified: C:\svn\ossrepo\icefaces\trunk\icefaces\bridge\lib\extras\autocomplete_ext.js
        Completed: At revision: 30751

        Modified: C:\svn\ossrepo\icefaces3\trunk\icefaces\compat\core\src\main\javascript\extras\extras.js
        Completed: At revision: 30755

        Show
        yip.ng added a comment - - edited Code restored to like originally in Scriptaculous. Error caused by bridge code changes mentioned above ( http://jira.icesoft.org/browse/ICE-6705?focusedCommentId=42020&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_42020 ) still exists. (In 1.8 only. 3.2 seems fine.) Modified: C:\svn\ossrepo\icefaces\trunk\icefaces\bridge\lib\extras\autocomplete_ext.js Completed: At revision: 30751 Modified: C:\svn\ossrepo\icefaces3\trunk\icefaces\compat\core\src\main\javascript\extras\extras.js Completed: At revision: 30755

          People

          • Assignee:
            yip.ng
            Reporter:
            Alessandro Rodi
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: