Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.1.2
-
None
-
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)
else
{ setSearchList(Arrays.asList("today", "tomorrow", "yesterday")); }}