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

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568170 ] jira [ 12591253 ]
        Mark Thomas made changes -
        Workflow jira [ 12405491 ] Default workflow, editable Closed status [ 12568170 ]
        Jesse Kuhnert made changes -
        Field Original Value New Value
        Fix Version/s 4.1.2 [ 12312202 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Assignee Jesse Kuhnert [ jkuhnert ]
        Ben Dotte created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development