Hi. I'm new to Tapestry... trying hard to make a transition from WebObjects
:)
Here's my problem:
I have a List of Strings through which I iterate, displaying one checkbox
for each item in the List. In the form's submit action method, I add an
item to the List. This is what happens after the first submit:
You have clicked on a stale link.
Rewind of form Home/$Form expected only 1 form elements, but an additional
id was requested by component Home/$Checkbox.
I suppose that the "1 form element" mentioned is the form's submit button.
Any hints/clues/suggestions? What am I doing wrong here?
Thanks!
The code:
public class Home extends BasePage {
private List<String> someList = new LinkedList<String>();
public String listElement;
public void formSubmit(IRequestCycle cycle) {
someList.add("hooohaw");
}
public boolean isCheckboxSelected() {
return true;
}
public void setCheckboxSelected(boolean val) {
}
public Iterator<String> getSomeList() {
// someList.add("hooohaw"); // putting this here instead of in
formSubmit results in the same error
return someList.iterator();
}
}
The HTML:
<html>
<body>
<form jwcid="@Form">
<input type="submit" jwcid="@Submit" value="Submit"
listener="ognl:listeners.formSubmit"/>
<span jwcid="@Foreach" source="ognl:someList"
value="ognl:listElement" >
<input type="checkbox" jwcid="@Checkbox"
selected="ognl:checkboxSelected"/>
</span>
<br/>
</form>
</body>
</html>
The environment:
JDK 1.5.0_02
Tapestry 3.0.3
Windows XP
Tomcat 5.5
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]