How to generate PortletURL in Event / Action Phase?

2008-11-21 Thread Torsten Krah
Hi. I need to programmatically create an PortletURL to include in an email. Trying to use the PortletHelper to build the URL does not help because it does fail with this exception: RenderRequest cannot be obtained in event phase RenderRequest request = PortletActionContext.getRenderRequest();

Re: How to generate PortletURL in Event / Action Phase?

2008-11-21 Thread Nils-Helge Garli Hegvik
You can't. It's a limitation of the portlet spec. URLs can only be created (in a portable manner) through the RenderResponse (or MimeResponse in the 2.0 spec) interface which is only available in the render phase. I'm not even sure that it's guaranteed that the generated url would be "static" anywa

Re: How to generate PortletURL in Event / Action Phase?

2008-11-21 Thread Nils-Helge Garli Hegvik
Yes, I would handle this outside the portlet. As you say, it's not than uncommon, and it should be easily solved using a servlet. Nils-H On Fri, Nov 21, 2008 at 2:07 PM, Torsten Krah <[EMAIL PROTECTED]> wrote: > Am Friday 21 November 2008 13:57:26 schrieben Sie: >> You can't. It's a limitation of

Re: How to generate PortletURL in Event / Action Phase?

2008-11-21 Thread Torsten Krah
Am Friday 21 November 2008 13:57:26 schrieben Sie: > You can't. It's a limitation of the portlet spec. Ok. Lets take this scenario: User fill out some registration form (portlet) and want to receive a optin email with a activation "link". How would this be done with portlets (spec v1)? Is it not

Re: How to generate PortletURL in Event / Action Phase?

2008-11-21 Thread Torsten Krah
Am Freitag, 21. November 2008 14:16:31 schrieb Nils-Helge Garli Hegvik: > Yes, I would handle this outside the portlet. As you say, it's not > than uncommon, and it should be easily solved using a servlet. I used buildResourceUrl on PortletUrlHelper to generate my servlet urls handled by FilterDi

Re: How to generate PortletURL in Event / Action Phase?

2008-11-21 Thread Nils-Helge Garli Hegvik
Yhea, I noticed a JIRA issue for that. However, it should be possible to construct the urls "by hand". Nils-H On Fri, Nov 21, 2008 at 3:14 PM, Torsten Krah <[EMAIL PROTECTED]> wrote: > Am Freitag, 21. November 2008 14:16:31 schrieb Nils-Helge Garli Hegvik: >> Yes, I would handle this outside the