Hi Howard,

The Upload component requires a UploadFile as a value!
I want to use here a plain html input file and not one of tapestry
components!
If I replace
<input type="file" id="ga" name="file"/>
WITH

<input t:type="upload" t:id="file" />
It does change the contenttype of the form as I wanted, but this means I
have to use UploadedFile, because its value is required in Upload?

I would like to use tapestry's form and just change the contenttype!








On 30 March 2011 00:04, Howard Lewis Ship <hls...@gmail.com> wrote:

> Look at the Upload component source; you'll see how it does it.
>
> On Tue, Mar 29, 2011 at 2:07 PM, Fernando Benjamin
> <fernandobenja...@gmail.com> wrote:
> > Hi everybody,
> >
> >
> > I am trying to upload a file to GAE by using a tapestry form, but I can't
> > use tapestry 5 Upload component because it depends on a class writing to
> the
> > filesystem!
> > I need to set the contenttype of the form to "multipart/form-data" so I
> can
> > retrieve the file on the servlet(filter).
> >
> > This is my example which does not work!
> >
> >  <t:form   t:id="upload" t:contenttype="multipart/form-data" >
> >
> >        <t:errors/>
> >
> >        <t:beaneditor t:id="product" object="product" />
> >
> >        <br/><br/>
> >
> >        <input type="file" id="ga" name="file"/>
> >
> >
> >        <br/><br/>
> >
> >        <input t:type="submit" t:id="button"
> t:value="message:button-label"
> > />
> >
> >
> >
> >    </t:form>
> >
> >
> > Is there any other form to change the content type of the  form here
> above?
> >
> > Otherwise I'll have to use normal html form wich does not support:
> errors,
> > beaneditor en etc...
> >
> >
> > Cheers,
> >
> > Fernando
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to