You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Juan Jose Fuentes Esteban <ju...@grupoica.com> on 2013/04/24 12:30:25 UTC

Generate PortletURL object with Struts framework

Hi everyone,

Which is the preferred way of generating a PortletURL object using Struts 2
portlet framework? I have the need to obtain a PortletURL object instead of
a String because after that I'll need to add parameters to this PortletURL.

Thank you in advance.

Re: Generate PortletURL object with Struts framework

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
It's been a while since I used it last, but underneath the hood, Struts 2
uses PortletUrl to create urls with the url-tag. So you should be able to
use the param tag to add parameters to the url. If that is not suitable,
use the PortletRequestAware to get the current PortletRequest injected to
your action.

Nils-H

On Fri, Apr 26, 2013 at 11:59 AM, Lukasz Lenart <lu...@apache.org>wrote:

> Feel free to request such a functionality via JIRA :-)
>
> https://issues.apache.org/jira/browse/WW
>
>
> Kind regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
>
> 2013/4/26 Juan Jose Fuentes Esteban <ju...@grupoica.com>:
> > It's just what I was afraid of... Well, it could be an interesting
> feature
> > to support in the future, if you ask me. The way it is now, we must
> > generate the PortletURL using the portal API, and after that we have to
> add
> > the parameters that'd make work with Struts2...
> >
> > Thank you Lukasz
> >
> >
> > 2013/4/26 Lukasz Lenart <lu...@apache.org>
> >
> >> 2013/4/24 Juan Jose Fuentes Esteban <ju...@grupoica.com>:
> >> > Which is the preferred way of generating a PortletURL object using
> >> Struts 2
> >> > portlet framework? I have the need to obtain a PortletURL object
> instead
> >> of
> >> > a String because after that I'll need to add parameters to this
> >> PortletURL.
> >>
> >> Hmm... I don't see support for that in Struts2
> >>
> >>
> >> Regards
> >> --
> >> Łukasz
> >> + 48 606 323 122 http://www.lenart.org.pl/
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Generate PortletURL object with Struts framework

Posted by Lukasz Lenart <lu...@apache.org>.
Feel free to request such a functionality via JIRA :-)

https://issues.apache.org/jira/browse/WW


Kind regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/


2013/4/26 Juan Jose Fuentes Esteban <ju...@grupoica.com>:
> It's just what I was afraid of... Well, it could be an interesting feature
> to support in the future, if you ask me. The way it is now, we must
> generate the PortletURL using the portal API, and after that we have to add
> the parameters that'd make work with Struts2...
>
> Thank you Lukasz
>
>
> 2013/4/26 Lukasz Lenart <lu...@apache.org>
>
>> 2013/4/24 Juan Jose Fuentes Esteban <ju...@grupoica.com>:
>> > Which is the preferred way of generating a PortletURL object using
>> Struts 2
>> > portlet framework? I have the need to obtain a PortletURL object instead
>> of
>> > a String because after that I'll need to add parameters to this
>> PortletURL.
>>
>> Hmm... I don't see support for that in Struts2
>>
>>
>> Regards
>> --
>> Łukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Generate PortletURL object with Struts framework

Posted by Juan Jose Fuentes Esteban <ju...@grupoica.com>.
It's just what I was afraid of... Well, it could be an interesting feature
to support in the future, if you ask me. The way it is now, we must
generate the PortletURL using the portal API, and after that we have to add
the parameters that'd make work with Struts2...

Thank you Lukasz


2013/4/26 Lukasz Lenart <lu...@apache.org>

> 2013/4/24 Juan Jose Fuentes Esteban <ju...@grupoica.com>:
> > Which is the preferred way of generating a PortletURL object using
> Struts 2
> > portlet framework? I have the need to obtain a PortletURL object instead
> of
> > a String because after that I'll need to add parameters to this
> PortletURL.
>
> Hmm... I don't see support for that in Struts2
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Generate PortletURL object with Struts framework

Posted by Lukasz Lenart <lu...@apache.org>.
2013/4/24 Juan Jose Fuentes Esteban <ju...@grupoica.com>:
> Which is the preferred way of generating a PortletURL object using Struts 2
> portlet framework? I have the need to obtain a PortletURL object instead of
> a String because after that I'll need to add parameters to this PortletURL.

Hmm... I don't see support for that in Struts2


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org