You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "Dutertry, Nicolas" <Ni...@HRACCESS.com> on 2006/10/25 10:25:22 UTC
psml preferences while using portlet-pipeline
Hi,
I've noticed that when I use the portlet pipeline to retrieve a portlet
entity of a psml, the preferences specified in the psml where ignored.
I looked into jetspeed code and I've found a way to correct this problem.
In the method build(RequestContext) of the class
org.apache.jetspeed.aggregator.impl.PortletAggregatorImpl, I've replaced the
following lines :
PortletAggregatorFragmentImpl fragment = new
PortletAggregatorFragmentImpl(entity);
fragment.setType(Fragment.PORTLET);
fragment.setName(name);
By :
Fragment fragment = context.getPage().getFragmentById(entity);
if(fragment == null) {
fragment = new PortletAggregatorFragmentImpl(entity);
fragment.setType(Fragment.PORTLET);
fragment.setName(name);
}
It seems to work fine.
Can someone integrate this correction or something similar or can you tell
me if it is wrong and why ?
Thanks.
--
Nicolas Dutertry
Re: psml preferences while using portlet-pipeline
Posted by David Sean Taylor <da...@bluesunrise.com>.
Dutertry, Nicolas wrote:
> Hi,
>
> I've noticed that when I use the portlet pipeline to retrieve a portlet
> entity of a psml, the preferences specified in the psml where ignored.
> I looked into jetspeed code and I've found a way to correct this problem.
> In the method build(RequestContext) of the class
> org.apache.jetspeed.aggregator.impl.PortletAggregatorImpl, I've replaced the
> following lines :
>
> PortletAggregatorFragmentImpl fragment = new
> PortletAggregatorFragmentImpl(entity);
> fragment.setType(Fragment.PORTLET);
> fragment.setName(name);
>
> By :
> Fragment fragment = context.getPage().getFragmentById(entity);
> if(fragment == null) {
> fragment = new PortletAggregatorFragmentImpl(entity);
> fragment.setType(Fragment.PORTLET);
> fragment.setName(name);
> }
>
> It seems to work fine.
>
> Can someone integrate this correction or something similar or can you tell
> me if it is wrong and why ?
>
That makes sense. The fragment created in the first case does not have
any PSML preferences, or any other information associated via the PSML.
Your patch is the better solution.
I checked it in, thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org