Hi,
I have a file upload form that requires user to encode a caption, I'm
trying to validate it on onValidateForm, but this is called after file has
been uploaded,
is there a way to check first the caption before uploading taking place?
this will save time.
Angelo
< t:form t:id="upload_form">
<input t:type="upload" t:id="file" size="40" validate="required"/><br/>
<input t:type="textfield" t:id="caption" size="40" maxlength="40"
/><br/>
<input t:type="submit" value="Upload" name="submit" t:id="submit"
<t:errors/>
< /t:form>
@Property
private String caption;
@Component
private Form upload_form;
void onValidateForm() {
if (!caption) {
upload_form.recordError("caption is empty");
}
}
--
View this message in context:
http://www.nabble.com/T5%3A-Tapestry-upload-and-onValidationForm-tp19196916p19196916.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]