Forums de discussion
send parameter from action method to JSP in liferay 7.0
fernando tapia, modifié il y a 7 années.
send parameter from action method to JSP in liferay 7.0
New Member Publications: 4 Date d'inscription: 13/09/16 Publications récentes
Hi, i've been trying to send a String object from my controller class to JSP but i can't get it to work.
Here is my codein the action method:
then, in the render method:
and in my jsp:
Can someone explain me how to do that in liferay 7.0?
Here is my codein the action method:
actionResponse.setRenderParameter("idArchivoGuardado", idArchivo);
then, in the render method:
String idArchivoGuardado = (String)renderRequest.getParameter("idArchivoGuardado");
renderRequest.setAttribute("idArGuardado", idArchivoGuardado);
and in my jsp:
String idArchivoGuardado = "";
if(renderRequest.getAttribute("idArGuardado") != null){
idArchivoGuardado = (String)renderRequest.getAttribute("idArGuardado");
System.out.println(idArchivoGuardado);
}
Can someone explain me how to do that in liferay 7.0?