-
1. Re: How to get parameter's value from URL in Gatein Portlet?
rutlucas Mar 21, 2014 4:25 AM (in response to terry.lin)Hello,
Portlets specification doesn't define how URL are managed. It's part of
portal implementation.
Having said that, your "id" parameters should be visible from action phase
but not from render phase.
In master we are patching this to allow to get also public render
parameters from URL:
https://github.com/gatein/gatein-portal/commit/51456e416e717a10b2a0a6410d0019468228a327
Meanwhile you can use two workarounds:
- One can be to import private packages of gatein and get the underlying
HttpRequest object.
- Other can be to access to PortalRequest object and maps your parameter in
the path like a "rest-style" parameter
http://localhost:8080/portal/lipc_patent/ptSearch?id=234
should be http://localhost:8080/portal/lipc_patent/ptSearch/id/234
and then you can access full path using public gatein api:
PortalRequest pRequest = PortalRequest.getInstance();
String path = pRequest.getNodePath().toString();
I have an example here:
*But as I said, in gatein master, the patch for Public Render
Parameters from URL allows to perform this functionality.*
Hope this helps,
Lucas
-
2. Re: How to get parameter's value from URL in Gatein Portlet?
terry.lin Mar 23, 2014 8:59 PM (in response to rutlucas)Hi Lucas,
Thanks for your reply, i will give it a try.
Terry