You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Fernando Benjamin <fe...@gmail.com> on 2011/04/09 00:52:30 UTC

Re: Setting contenttype of T5 form

Hi again,

I am still working on the same form!
I have managed to get my javascript initialized and uploaded to the client!
Everything works great until I get in the onActivate method.

Then I get an exception, which I can't figure out the problem, I have also
explicit changed the Form.method to Post!

TapestryModule.RequestExceptionHandler Processing of request failed with
uncaught exception: Forms require that the request method be POST and that
the t:formdata query parameter have values.

org.apache.tapestry5.ioc.internal.OperationException: Forms require that the
request method be POST and that the t:formdata query parameter have values.
[at classpath:nl/test/web/pages/personal/AddProduct.tml, line 6]



THIS IS MY PAGE WITH FORM
#################################

<html t:type="layout"

title="${message:title}"

      xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"

      xmlns:p="tapestry:parameter">

    <p>Post a new product:</p>

     <t:form t:id="upload" >

        <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>

</html>



THIS IS MY JAVA PAGE
#################################

@Import(library = { "context:javascript/swfupload.js",
"context:javascript/test.js", "context:javascript/addproduct.js" })

@PluginPageMenu(className = Personal.class, label = "Post a new product")

public class AddProduct {



 @Inject

private Logger logger;

 @Property

private Product product;

 @Component(id = "upload")

private Form _form;

  /* UPLOAD SERVICE*/

@Inject

private MyFileUploadService uploadService;

/*    ** START JAVASCRIPT  ** */

@Inject

private JavaScriptSupport javaScriptSupport;

/* END JAVASCRIPT */





public void afterRender(final MarkupWriter writer) {

 javaScriptSupport.addInitializerCall("upload","");

  }


 public void onSuccess() {

 logger.debug("############# SUCCES ##########");

}


 public void onActivate() {


 logger.debug("############# On Activate  ##########");

}




}



This is my javascript

   Tapestry.Initializer.upload = function(element)

{

document.forms['upload'].enctype = "multipart/form-data";

document.forms['upload'].method = "POST";

}



I hope someone can help me with this error!

Cheers,

Fernando


On 31 March 2011 00:15, Fernando Benjamin <fe...@gmail.com>wrote:

> Haaa, I overlooked the other option, I'll try with javascript!
>
> Thank you!
>
>
> On 31 March 2011 00:14, Fernando Benjamin <fe...@gmail.com>wrote:
>
>> 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 <hl...@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
>>> <fe...@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-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>

Re: Setting contenttype of T5 form

Posted by Fernando Benjamin <fe...@gmail.com>.
The forms elements were beeing wrapped in the wrong way!
I changed the processFileItems to this:

   protected HttpServletRequest processFileItems(HttpServletRequest request,
FileItemIterator fileItems) {

 if (uploadException == null && (fileItems == null)) {

 return request;

 }

 ParametersServletRequestWrapper wrapper = newParametersServletRequestWrapper(
request);

 String charset = request.getCharacterEncoding();

 try {

 for (FileItemIterator it = fileItems; it.hasNext();) {

  FileItemStream item;

  item = it.next();

  final byte[] buffer = IOUtils.toByteArray(item.openStream());

  logger.debug("########" + item.getName());

  logger.debug("########" + item.getFieldName());

  if (item.isFormField()) {

  wrapper.addParameter(item.getFieldName(), new String(buffer, charset));

  } else {

  wrapper.addParameter(item.getFieldName(), item.getName());

   wrapper.addParameter(item.getFieldName(), item.getName());

                 addUploadedFile(item.getFieldName(),
newByteArrayInputStream(buffer));

  }

 }

 } catch (FileUploadException e) {

 e.printStackTrace();

 } catch (IOException e) {

 e.printStackTrace();

 }

 return wrapper;

}

Everything works again!






On 16 April 2011 15:31, Fernando Benjamin <fe...@gmail.com>wrote:

> Hi All,
>
> Thank you for all your answers, I've read the form specification (
> http://www.w3.org/TR/html4/interact/forms.html)
> and then I looked into Tapestry's upload component! I understand this
> component and forms much better now.
> Again, my goal is: An upload form that uploads files and stores it in
> GAE(BLOB) with Tapestry5!
>
>
> I've made my own ServletFilter, with an own MultipartDecodeImpl and a
> request which decodes the form before passing it to the page Class.
> I've pretty much used a lot of aspects of the Upload component.
> But instead of making a new component, I've handled everything in my own
> MultpartDecoder and filter!
>
> The problem right now is, that I get an exception: after passing the
> handler to the chain!
> java.util.zip.ZipException: Not in GZIP format
>
>
>
> It looks like I've forgot to zip something? But I don't know what, why and
> where?
>
>
>
>
> ###################################   This is My RequestFilter
>
> public class MyProjectUploadFilter implements HttpServletRequestFilter {
>
> @Inject
>
> private Logger logger;
>
>
>
> private final MyProjectMultipartDecoder decoder;
>
> private final String method = "post";
>
> /**
>
> * Part of HTTP content type header.
>
> */
>
> public static final String MULTIPART = "multipart/";
>
>
> public MyProjectUploadFilter(MyProjectMultipartDecoder decoder) {
>
> this.decoder = decoder;
>
> }
>
>
> @Override
>
> public boolean service(HttpServletRequest request, HttpServletResponse
> response, HttpServletRequestHandler handler) throws IOException {
>
> if (method.equalsIgnoreCase(request.getMethod()) ) {
>
> HttpServletRequest newRequest = ServletFileUpload.isMultipartContent(
> request) ? decoder.decode(request) : request;
>
> return handler.service(newRequest, response);
>
> }
>
> return handler.service(request, response);
>
> }
>
>
> }
>
>
> ################# This is my MultpartdecoderImpl
>
>
> public class MyProjectMultipartDecoderImpl implements
> MyProjectMultipartDecoder {
>
> private final Map<String, Blob> uploads = CollectionFactory.newMap();
>
> private final Logger logger;
>
> private final FileItemFactory fileItemFactory;
>
> //
>
> // private final long maxRequestSize;
>
> //
>
> private final long maxFileSize = 250000;
>
>
> private final String requestEncoding;
>
>
> private FileUploadException uploadException;
>
>
> public MyProjectMultipartDecoderImpl(Logger log, FileItemFactory
> fileItemFactory) {
>
> this.logger = log;
>
> this.fileItemFactory = fileItemFactory;
>
> this.requestEncoding = "UTF-8";
>
> }
>
>
> @Override
>
> public HttpServletRequest decode(HttpServletRequest request) {
>
> try {
>
> request.setCharacterEncoding(requestEncoding);
>
> } catch (UnsupportedEncodingException ex) {
>
> throw new RuntimeException(ex);
>
> }
>
> FileItemIterator fileItems = parseRequest(request);
>
>
> return processFileItems(request, fileItems);
>
> }
>
>
> @Override
>
> public Blob getFileUpload(String parameterName) {
>
> return uploads.get(parameterName);
>
> }
>
>
> @Override
>
> public FileUploadException getUploadException() {
>
> return uploadException;
>
> }
>
>
>
>
> protected FileItemIterator parseRequest(HttpServletRequest request) {
>
>
> try {
>
> return createFileUpload().getItemIterator(request);
>
> } catch (FileUploadException e) {
>
> // TODO Auto-generated catch block
>
> e.printStackTrace();
>
> } catch (IOException e) {
>
> // TODO Auto-generated catch block
>
> e.printStackTrace();
>
> }
>
> return null;
>
> }
>
>
> protected ServletFileUpload createFileUpload() {
>
> ServletFileUpload upload = new ServletFileUpload(fileItemFactory);
>
>
> // // set maximum file upload size
>
> // upload.setSizeMax(maxRequestSize);
>
> upload.setFileSizeMax(maxFileSize);
>
>
> return upload;
>
> }
>
>
> protected HttpServletRequest processFileItems(HttpServletRequest request,
> FileItemIterator fileItems) {
>
> if (uploadException == null && (fileItems == null)) {
>
> return request;
>
> }
>
> ParametersServletRequestWrapper wrapper = new
>  ParametersServletRequestWrapper(request);
>
>
> try {
>
> for (FileItemIterator it = fileItems; it.hasNext();) {
>
> FileItemStream item;
>
> item = it.next();
>
> if (item.isFormField()) {
>
> wrapper.addParameter(item.getFieldName(), item.getFieldName());
>
> } else {
>
> logger.debug("########" + item.getName());
>
> logger.debug("########" + item.getFieldName());
>
> wrapper.addParameter(item.getFieldName(), item.getName());
>
>
>
> }
>
> }
>
> } catch (FileUploadException e) {
>
> e.printStackTrace();
>
> } catch (IOException e) {
>
> e.printStackTrace();
>
> }
>
>
> return wrapper;
>
> }
>
>
> protected void addUploadedFile(String name, Blob file) {
>
> uploads.put(name, file);
>
> }
>
> }
>
>
> ################################ THIS IS MY FORM
>
> <html t:type="layout"
>
> title="${message:title}"
>
>       xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
>
>       xmlns:p="tapestry:parameter">
>
>     <p>Post a new product:</p>
>
>      <t:form t:id="upload" method="POST" >
>
>         <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>
>
> </html>
>
>
>
>
> #################################### THIS IS MY EXCEPTION
>
>    -
>       - Triggering event 'action' on personal/AddProduct:upload
>    - org.apache.tapestry5.runtime.ComponentEventException
>    java.util.zip.ZipException: Not in GZIP format
>
>
> On 9 April 2011 16:31, Taha Hafeez <ta...@gmail.com> wrote:
>
>>
>> If you can use an ajax file uploader then you can modify this to meet your
>> needs
>>
>>
>> http://tapestry.1045711.n5.nabble.com/Tapestry-FileUploader-Integration-td4268987.html
>>
>> regards
>> Taha
>>
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/Setting-contenttype-of-T5-form-tp4270175p4292978.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>

Re: Setting contenttype of T5 form

Posted by Fernando Benjamin <fe...@gmail.com>.
Hi All,

Thank you for all your answers, I've read the form specification (
http://www.w3.org/TR/html4/interact/forms.html)
and then I looked into Tapestry's upload component! I understand this
component and forms much better now.
Again, my goal is: An upload form that uploads files and stores it in
GAE(BLOB) with Tapestry5!


I've made my own ServletFilter, with an own MultipartDecodeImpl and a
request which decodes the form before passing it to the page Class.
I've pretty much used a lot of aspects of the Upload component.
But instead of making a new component, I've handled everything in my own
MultpartDecoder and filter!

The problem right now is, that I get an exception: after passing the handler
to the chain!
java.util.zip.ZipException: Not in GZIP format



It looks like I've forgot to zip something? But I don't know what, why and
where?




###################################   This is My RequestFilter

public class MyProjectUploadFilter implements HttpServletRequestFilter {

@Inject

private Logger logger;



private final MyProjectMultipartDecoder decoder;

private final String method = "post";

/**

* Part of HTTP content type header.

*/

public static final String MULTIPART = "multipart/";


public MyProjectUploadFilter(MyProjectMultipartDecoder decoder) {

this.decoder = decoder;

}


@Override

public boolean service(HttpServletRequest request, HttpServletResponse
response, HttpServletRequestHandler handler) throws IOException {

if (method.equalsIgnoreCase(request.getMethod()) ) {

HttpServletRequest newRequest = ServletFileUpload.isMultipartContent(request)
? decoder.decode(request) : request;

return handler.service(newRequest, response);

}

return handler.service(request, response);

}


}


################# This is my MultpartdecoderImpl


public class MyProjectMultipartDecoderImpl implements
MyProjectMultipartDecoder {

private final Map<String, Blob> uploads = CollectionFactory.newMap();

private final Logger logger;

private final FileItemFactory fileItemFactory;

//

// private final long maxRequestSize;

//

private final long maxFileSize = 250000;


private final String requestEncoding;


private FileUploadException uploadException;


public MyProjectMultipartDecoderImpl(Logger log, FileItemFactory
fileItemFactory) {

this.logger = log;

this.fileItemFactory = fileItemFactory;

this.requestEncoding = "UTF-8";

}


@Override

public HttpServletRequest decode(HttpServletRequest request) {

try {

request.setCharacterEncoding(requestEncoding);

} catch (UnsupportedEncodingException ex) {

throw new RuntimeException(ex);

}

FileItemIterator fileItems = parseRequest(request);


return processFileItems(request, fileItems);

}


@Override

public Blob getFileUpload(String parameterName) {

return uploads.get(parameterName);

}


@Override

public FileUploadException getUploadException() {

return uploadException;

}




protected FileItemIterator parseRequest(HttpServletRequest request) {


try {

return createFileUpload().getItemIterator(request);

} catch (FileUploadException e) {

// TODO Auto-generated catch block

e.printStackTrace();

} catch (IOException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

return null;

}


protected ServletFileUpload createFileUpload() {

ServletFileUpload upload = new ServletFileUpload(fileItemFactory);


// // set maximum file upload size

// upload.setSizeMax(maxRequestSize);

upload.setFileSizeMax(maxFileSize);


return upload;

}


protected HttpServletRequest processFileItems(HttpServletRequest request,
FileItemIterator fileItems) {

if (uploadException == null && (fileItems == null)) {

return request;

}

ParametersServletRequestWrapper wrapper = new
 ParametersServletRequestWrapper(request);


try {

for (FileItemIterator it = fileItems; it.hasNext();) {

FileItemStream item;

item = it.next();

if (item.isFormField()) {

wrapper.addParameter(item.getFieldName(), item.getFieldName());

} else {

logger.debug("########" + item.getName());

logger.debug("########" + item.getFieldName());

wrapper.addParameter(item.getFieldName(), item.getName());



}

}

} catch (FileUploadException e) {

e.printStackTrace();

} catch (IOException e) {

e.printStackTrace();

}


return wrapper;

}


protected void addUploadedFile(String name, Blob file) {

uploads.put(name, file);

}

}


################################ THIS IS MY FORM

<html t:type="layout"

title="${message:title}"

      xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"

      xmlns:p="tapestry:parameter">

    <p>Post a new product:</p>

     <t:form t:id="upload" method="POST" >

        <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>

</html>




#################################### THIS IS MY EXCEPTION

   -
      - Triggering event 'action' on personal/AddProduct:upload
   - org.apache.tapestry5.runtime.ComponentEventException
   java.util.zip.ZipException: Not in GZIP format


On 9 April 2011 16:31, Taha Hafeez <ta...@gmail.com> wrote:

>
> If you can use an ajax file uploader then you can modify this to meet your
> needs
>
>
> http://tapestry.1045711.n5.nabble.com/Tapestry-FileUploader-Integration-td4268987.html
>
> regards
> Taha
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Setting-contenttype-of-T5-form-tp4270175p4292978.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Setting contenttype of T5 form

Posted by Taha Hafeez <ta...@gmail.com>.
If you can use an ajax file uploader then you can modify this to meet your
needs

http://tapestry.1045711.n5.nabble.com/Tapestry-FileUploader-Integration-td4268987.html

regards
Taha

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Setting-contenttype-of-T5-form-tp4270175p4292978.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Setting contenttype of T5 form

Posted by Josh Canfield <jo...@gmail.com>.
You should really take Howard's advice and look at how the upload
component works. You can't just change the content type of the form
because this changes how servlets behave. Try googling for "servlet
multipart/form-data" and find that since the beginning of time people
have been writing libraries to work around the gap in the java
servlet's handling of multipart/form-data...

Essentially getParameter stops working and tapestry can't find it's
hidden form fields. You could grab the source for the upload component
and change the offending bits...

Josh

On Fri, Apr 8, 2011 at 3:52 PM, Fernando Benjamin
<fe...@gmail.com> wrote:
> Hi again,
>
> I am still working on the same form!
> I have managed to get my javascript initialized and uploaded to the client!
> Everything works great until I get in the onActivate method.
>
> Then I get an exception, which I can't figure out the problem, I have also
> explicit changed the Form.method to Post!
>
> TapestryModule.RequestExceptionHandler Processing of request failed with
> uncaught exception: Forms require that the request method be POST and that
> the t:formdata query parameter have values.
>
> org.apache.tapestry5.ioc.internal.OperationException: Forms require that the
> request method be POST and that the t:formdata query parameter have values.
> [at classpath:nl/test/web/pages/personal/AddProduct.tml, line 6]
>
>
>
> THIS IS MY PAGE WITH FORM
> #################################
>
> <html t:type="layout"
>
> title="${message:title}"
>
>      xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
>
>      xmlns:p="tapestry:parameter">
>
>    <p>Post a new product:</p>
>
>     <t:form t:id="upload" >
>
>        <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>
>
> </html>
>
>
>
> THIS IS MY JAVA PAGE
> #################################
>
> @Import(library = { "context:javascript/swfupload.js",
> "context:javascript/test.js", "context:javascript/addproduct.js" })
>
> @PluginPageMenu(className = Personal.class, label = "Post a new product")
>
> public class AddProduct {
>
>
>
>  @Inject
>
> private Logger logger;
>
>  @Property
>
> private Product product;
>
>  @Component(id = "upload")
>
> private Form _form;
>
>  /* UPLOAD SERVICE*/
>
> @Inject
>
> private MyFileUploadService uploadService;
>
> /*    ** START JAVASCRIPT  ** */
>
> @Inject
>
> private JavaScriptSupport javaScriptSupport;
>
> /* END JAVASCRIPT */
>
>
>
>
>
> public void afterRender(final MarkupWriter writer) {
>
>  javaScriptSupport.addInitializerCall("upload","");
>
>  }
>
>
>  public void onSuccess() {
>
>  logger.debug("############# SUCCES ##########");
>
> }
>
>
>  public void onActivate() {
>
>
>  logger.debug("############# On Activate  ##########");
>
> }
>
>
>
>
> }
>
>
>
> This is my javascript
>
>   Tapestry.Initializer.upload = function(element)
>
> {
>
> document.forms['upload'].enctype = "multipart/form-data";
>
> document.forms['upload'].method = "POST";
>
> }
>
>
>
> I hope someone can help me with this error!
>
> Cheers,
>
> Fernando
>
>
> On 31 March 2011 00:15, Fernando Benjamin <fe...@gmail.com>wrote:
>
>> Haaa, I overlooked the other option, I'll try with javascript!
>>
>> Thank you!
>>
>>
>> On 31 March 2011 00:14, Fernando Benjamin <fe...@gmail.com>wrote:
>>
>>> 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 <hl...@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
>>>> <fe...@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-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org