You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Todd O'Bryan <to...@mac.com> on 2005/01/28 05:07:05 UTC
IUploadFile in Upload component
Is there an easy way to make sure the user has actually chosen a file
to upload when they click the upload button in the Upload component?
I checked to see if the IUploadFile was null, but that didn't work. Is
there anything that will be null for sure only if there was no file
selected?
Thanks,
Todd
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: IUploadFile in Upload component
Posted by cesar saenz <ja...@gmail.com>.
Todd On Thu, 27 Jan 2005 23:07:05 -0500, Todd O'Bryan
<to...@mac.com> wrote:
> Is there an easy way to make sure the user has actually chosen a file
> to upload when they click the upload button in the Upload component?
>
> I checked to see if the IUploadFile was null, but that didn't work. Is
> there anything that will be null for sure only if there was no file
> selected?
I check the following:
if(IUploadFile!=null && IUploadFile.getFileName().length()>0)
//file was selected
else
// no file was selected
This works for me.
Cheers,
Cesar
On Thu, 27 Jan 2005 23:07:05 -0500, Todd O'Bryan <to...@mac.com> wrote:
> Is there an easy way to make sure the user has actually chosen a file
> to upload when they click the upload button in the Upload component?
>
> I checked to see if the IUploadFile was null, but that didn't work. Is
> there anything that will be null for sure only if there was no file
> selected?
>
> Thanks,
> Todd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org