myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "a clem" <a.p.clem...@gmail.com>
Subject Re: Ajax, pprPanelGroup and Portlets working together...
Date Fri, 28 Mar 2008 08:53:36 GMT
On Fri, Mar 28, 2008 at 9:41 AM, Ernst Fastl <ernst.fastl@gmail.com> wrote:
> +1 for ExternalContextUtils
>  Good idea Scott
>
>  In this case I wait for those utils before doing the changes in the
>  PPRPhaseListener
>
>  greez
>
>  E
>
>
>
>  On Fri, Mar 28, 2008 at 1:15 AM, Scott O'Bryan <darkarena@gmail.com> wrote:
>  > Take a look at Trinidad's ExternalContextUtils class.  It uses
>  >  reflection.  I'm also going to try to get something like this in the
>  >  myfaces commons, probably in the configurator package if I end up
>  >  submitting my current code.
>  >
>  >  If you don't have time to find the ExternalContextUtils on your own,
>  >  I'll try to post some source tomorrow.
>  >
>  >  Scott
>  >
>  >
>  >
>  >  Leonardo Uribe wrote:
>  >  > Hi
>  >  >
>  >  > I have seen lines like this on the attached files:
>  >  >
>  >  >         //Don't do the rendering twice
>  >  >         if (request instanceof PortletRequest &&
>  >  > ((PortletRequest)request).getAttribute(PPR_DONE_ATTR) != null) {
>  >  >             return;
>  >  >         }
>  >  >
>  >  > The problem here is that doing this makes that tomahawk requires
>  >  > portlet api to work, in non portlet environments.
>  >  >
>  >  > The same problem is present on MYFACES-434 patch.
>  >  >
>  >  > Can anyone suggest a way to avoid this dependency? or we should put
>  >  > portlet api as compile dependency for tomahawk?

I don't think this is a problem to have a dependancy on a standard API
since this an API (not an implementation) and a standard one.
This is known as the pattern 'dependency inversion'.
One alternative could be to develop a abstraction layer on top of the
standard servlet and portlet apis (to hide them).

regards

>  >  >
>  >  > regards
>  >  >
>  >  > Leonardo Uribe
>  >  >
>  >  >
>  >
>  >
>

Mime
View raw message