Hmm... are you testing not uploading a file? because if there is no
file uploaded then the UploadFile object will be null. You should make
sure you handle that case because I don't believe the javascript
validation will work on a file upload field.

You might want to grab the source for the upload component and step
through the processSubmission method.

Josh

On Fri, May 2, 2008 at 11:32 AM, zack1403 <[EMAIL PROTECTED]> wrote:
>
>
>
> Your example is very incomplete and thus hard to debug. What version
> of tapestry are you using?
>
> I'm guessing that the "web" in your method is supposed to be "up"? Do
> you have proper getter/setter methods for your uploadfile?
>
> Josh
>
> On Fri, May 2, 2008 at 11:05 AM, zack1403 <[EMAIL PROTECTED]> wrote:
> >
> > hey all, i am trying to use the onValidate method to verify an uploaded
> > file
> > but am getting an npe on the UploadedFile.
> >
> > Even just trying to record error on form period does nothing as well.  Am
> > I
> > using the onValidate/recordError incorrectly?
> >
> > @Component
> > private Form form;
> > private UploadedFile up;
>
> Sorry about that.  My form works fine outside of any validation so I assumed
> getters/setters were given.  Yes, web==up :/.  No getters/setters for form
> though (I have tried that though).  The files can be saved and modified in
> the onSuccess method just fine.  I no other components in the page.
>
> My tml basically consists of:
>
> <form t:type="form" t:id="form">
> <div class="t-beaneditor-row">
>                                <label t:type="label" for="up" />
>                                <input t:type="upload" t:id="up" 
> validate="required"/>
>                        </div>
>
>                        <div class="t-beaneditor-row">
>                                <input t:type="submit" value="Add" />
>                        </div>
> </form>
>
> By the way, thank you for the quick response!
> --
> View this message in context: 
> http://www.nabble.com/onValidate-NPE-tp17024869p17025322.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]
>
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to