Hi all.
I have a multiple form problem .. and after having search and thought
many on this, can't find a solution.
<table t:type="loop" t:source="receivedMessages" t:value="message" >
<tbody>
<tr style="horizontal-align: middle">
<td style="vertical-align: top; horizontal-align: middle width: 323px;">
<form t:type="form" t:id="edit" context="${message.id}"
clientValidation="false">
</t:errors>
<input t:type="textfield" t:id="phone" />
<input value="Save" t:id="save" t:type="submit" />
<input value="Reject" t:id="reject" t:type="submit" />
</form>
</td>
</tr>
</tbody>
</table>
Well, that's a sample of what i have.
I'll tell my usage :
When the user clicks Reject, no clientValidation is done. That's why
i disabled clientvalidation.
When the user clicks Accept, serverside validation is done against
real required fields, but as the form id
is inside a loop, i can't get the validation to show the errors in
it's own form.
private Form edit;
@OnEvent(value=EventConstants.VALIDATE_FORM)
void validateForm() {
edit.clearErrors();
if (phone==null) edit.recordError("Sorry, phone is mandatory");
}
While this works, it shows errors on every form ( currently 3 form
), so i see the famous red-banner thrice.
I can't add edit_0 nor edit_1, because while they are real names in
rendered tml, they are not before, so tapestry gives me an error.
Is there any way i can fix this ?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org