Dear all,
I've done this through creating component which extends
AbstractFormComponent.
protected void renderFormComponent(IMarkupWriter w, IRequestCycle c)
{
IForm form = getForm();
form.setEncodingType("multipart/form-data");
}
Now, the form renders as enctype="multipart/form-data" :
<form method="post" action="/blabla/viewWorkflowForm,$Form.sdirect"
name="Form" id="Form" enctype="multipart/form-data">
Another problem occured....
I'm using common file upload to get the files uploaded by user:
FileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
List items = upload.parseRequest(getRequest()); //request injected
using: <inject property="request"
object="service:tapestry.globals.HttpServletRequest"/>
why the parseRequest always return no items?
Is it because tapestry already consumed it?
Thanks,
Yohan Yudanara
On Tue, 2007-10-23 at 13:04 +0700, Yohan Yudanara wrote:
> Dear all,
>
> I need a way to set the enctype of a form. Could anyone help me, plz.
>
> I'm using tapestry form, and I fill in the controls within the form
> dynamically. (which is can contains <input type="file"/>)
> That's why I need to set enctype="multipart/form-data" without using
> Tapestry's upload components.
>
> I'm using Tapestry 4.0
>
> Thanks,
> Yohan
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]