Fórum

request.getParameter is undefined in Application Display Termplate

thumbnail
Daniel Breitner, modificado 9 Anos atrás.

request.getParameter is undefined in Application Display Termplate

Regular Member Postagens: 105 Data de Entrada: 16/07/08 Postagens Recentes
Hi everyone,

I am trying to read request parameters in my Application Display Template like this:

<#assign myvalue = request.getParameter("param")/>



But all I get is:

Error on line 5, column 1 in 10154#10194#11902
request.getParameter("param") is undefined.
It cannot be assigned to myvalue.



Does anyone know how to solve this ? The built-in editor itself and its code completion told me everything is fine ;)
thumbnail
Pankaj Kathiriya, modificado 9 Anos atrás.

RE: request.getParameter is undefined in Application Display Termplate

Liferay Master Postagens: 722 Data de Entrada: 05/08/10 Postagens Recentes
See if second answer at http://stackoverflow.com/questions/14372165/get-querystring-of-a-url-on-freemarker is useful.
thumbnail
Sorin Pop, modificado 9 Anos atrás.

RE: request.getParameter is undefined in Application Display Termplate

New Member Postagens: 2 Data de Entrada: 20/03/14 Postagens Recentes
Hi Daniel,

Just wondering if you could find the solution for this?... I am having the same issue.
thumbnail
Olaf Kock, modificado 9 Anos atrás.

RE: request.getParameter is undefined in Application Display Termplate

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
Debugging tipp: Check request.getClass().getName() to see what you're actually dealing with. You might also want to check themeDisplay.getRequest(), which is - if I remember correctly - a HttpServletRequest. Here you might need to add namespace to construct the actual parameter name.