Tapestry
  1. Tapestry
  2. TAPESTRY-1535

Suggest component doesn't work in a loop

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.1.2
    • Component/s: XHR/dhtml/Ajax
    • Labels:
      None
    • Environment:
      Tapestry 4.1.2 snapshot from 6-4, WinXP, Firefox 2

      Description

      When the Suggest component is used in a loop, the dropdown of available values appears for the first textfield in the loop after you begin typing, but it does not appear for any of the remaining textfields. Here is some code that demonstrates the problem:

      .html:
      <form jwcid="@Form">
      <for jwcid="@For" source="ognl:autocompleterLists" value="ognl:curList">
      <span jwcid="@FieldLabel" field="component:lists" />
      <input jwcid="lists@Suggest" displayName="ognl:'list' + curList" updateElementClass="auto_complete" listSource="ognl:searchList" listener="listener:searchTheList" parameters="ognl:curList" value="ognl:curValue" />
      <br />
      </for>
      </form>

      .java:
      public abstract int getCurList();

      public abstract String getCurValue();

      public abstract List<String> getSearchList();
      public abstract void setSearchList(List<String> values);

      public List<Integer> getAutocompleterLists()
      {
      return Arrays.asList(1, 2);
      }

      public void searchTheList(String searchString, int theList)
      {
      if (theList == 1)

      { setSearchList(Arrays.asList("blah", "test", "joeblow")); }

      else

      { setSearchList(Arrays.asList("today", "tomorrow", "yesterday")); }

      }

        Activity

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Ben Dotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development