Foros de discusión
Form with file upload problem....!
Ramesh K, modificado hace 13 años.
Form with file upload problem....!
Junior Member Mensajes: 53 Fecha de incorporación: 26/07/10 Mensajes recientes
Hi to All,
i have a form with name,dob and a file fields
how to retrieve all the fields in to my processAction method
any one help me
Thanks & Regards
Ramesh K
i have a form with name,dob and a file fields
how to retrieve all the fields in to my processAction method
any one help me
Thanks & Regards
Ramesh K
Raja Nagendra Kumar, modificado hace 13 años.
RE: Form with file upload problem....!
Expert Mensajes: 484 Fecha de incorporación: 2/03/06 Mensajes recientes
All the form submited parameters can be access from ActionRequest parameter.
sudo code
public void processAction(ActionRequest aRequest, ActionResponse aResponse)..
{
String sYourname = (String) aRequest.getParameter("yourformfieldname");
}
Regards,
Nagendra
sudo code
public void processAction(ActionRequest aRequest, ActionResponse aResponse)..
{
String sYourname = (String) aRequest.getParameter("yourformfieldname");
}
Regards,
Nagendra
Arun Kumar S, modificado hace 13 años.
RE: Form with file upload problem....!
Regular Member Mensajes: 182 Fecha de incorporación: 23/06/08 Mensajes recientesRamesh K:
Hi to All,
i have a form with name,dob and a file fields
how to retrieve all the fields in to my processAction method
any one help me
Thanks & Regards
Ramesh K
1. Use the below code to get the uploaded file
UploadPortletRequest uploadRequest = PortalUtil
.getUploadPortletRequest(req);
File file = uploadRequest.getFile("file");
2. Below code to get fields
ParamUtil.getString(request, param)
HTH,
Arun
Zeeshan Khan, modificado hace 12 años.
RE: Form with file upload problem....!
Expert Mensajes: 349 Fecha de incorporación: 21/07/11 Mensajes recientesArun Kumar S:
Ramesh K:Hi to All,
i have a form with name,dob and a file fields
how to retrieve all the fields in to my processAction method
any one help me
Thanks & Regards
Ramesh K
1. Use the below code to get the uploaded fileUploadPortletRequest uploadRequest = PortalUtil .getUploadPortletRequest(req); File file = uploadRequest.getFile("file");
2. Below code to get fields
ParamUtil.getString(request, param)
HTH,
Arun
Hi Arun !!
the code that u have given here, is it for uploading a document in WEB FORM portlet......?? i f yes then where to add this.....???
thnx !!
Ravi Kumar Gupta, modificado hace 12 años.
RE: Form with file upload problem....!
Liferay Legend Mensajes: 1302 Fecha de incorporación: 24/06/09 Mensajes recientes
That code to get file from request will go to saveData() method of WebFormPortlet.java