>From skimming the sources I would guess that you need to provide your own
FieldValidator<Object> as a component parameter to <t:upload>



2009/8/14 Stephan Windmüller <stephan.windmuel...@cs.tu-dortmund.de>

> Hello!
>
> We are using the upload component of tapestry and want to validate the
> content type during the upload. To accomplish this we wrote the
> following code:
>
> | @Property
> | private UploadedFile file;
> |
> | [...]
> |
> | void onValidate() {
> |
> |       if(file.getContentType().toLowerCase(Locale.ENGLISH)
> |               .equals("application/pdf")) {
> |               [...]
> |       }
> | }
>
> To our surprise, the field "file" is always null during the validation,
> but not in onSuccess.
>
> Is it not possible to validate this? Or do we have to put a manual
> validation in onSuccess?
>
> TIA
>  Stephan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to