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" anyway. Depending on your requirement,
your portal server might have some sort of support for "bookmarkable
urls" that might can be used instead.

Nils-H

On Fri, Nov 21, 2008 at 1:41 PM, Torsten Krah
<[EMAIL PROTECTED]> wrote:
> 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();
>
> If it can not be obtained, how can i generate an action url in the event
> phase?
>
>
>
> --
> Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
> Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
>
> Really, I'm not out to destroy Microsoft. That will just be a
> completely unintentional side effect."
>        -- Linus Torvalds
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to