ICEfaces
  1. ICEfaces
  2. ICE-1320

AutoComplete Component Returning Inaccurate Number of Rows

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.3
    • Fix Version/s: 1.6.1
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Windows XP Professional
      jboss 4.0.3 SP1
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      In the backing bean logic, where

      int maxMatches = ((SelectInputText)event.getComponent()).getRows();

      is located in the setMatches() method, hard code maxMatches to equal the rows attribute on the component.
      Show
      In the backing bean logic, where int maxMatches = ((SelectInputText)event.getComponent()).getRows(); is located in the setMatches() method, hard code maxMatches to equal the rows attribute on the component.

      Description

      In the security demo, I have set the rows for the autocomplete component at 15 and my matchesList bound to the component has 7 items. The first time I use the autocomplete component and type in the letter "a" it brings up all 7 items from the list that is bound to the component. After I make a selection, and type in "a" again, it returns a list ranging from 1 item to 6 items. In the bean, I found

      int maxMatches = ((SelectInputText)event.getComponent()).getRows();

      was returning an inaccurate number after the first selection was made. In the bean logic, this number is used to populate the matchesList in the bean. Further debugging code in the getRows() method of the component revealed that under these circumstances when getRows() is called, the itemMap size is inaccurate.

      I was able to re-create this issue with component-showcase on the icefaces.org site. This issue does not manifest itself when the number of items in the matchesList matches the number of rows (which is set to 15). However, when you input "zu" you get the last 7 items in the matchesList. After making a selection, if you use the component again, you will see less than 15 items in the matchesList where previously there were 15. For example, when entering the letter "a".

        Activity

        Hide
        Lars-fredrik Smedberg added a comment -

        Still in 1.6.0

        Show
        Lars-fredrik Smedberg added a comment - Still in 1.6.0

          People

          • Assignee:
            Unassigned
            Reporter:
            Brad Kroeger
          • Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: