portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weaver, Scott" <Swea...@rippe.com>
Subject RE: [PATCH] Root portlet set's skin not recognized by children
Date Fri, 03 Jan 2003 19:30:11 GMT
Glen,

I had to totally re-think my approach to this issue, as the patch I submitted does not pass
the 4 test cases provided.  However, my new solution does.  The only thing that might stop
it from being committed is the fact that I had to add 2 methods to the Portlets interface
and in turn to the PsmlPortlets class: 

Portlets getParentPortlets();

void setParentPortlets(Portlets portlets);

This allows a Portlets collection to access its parent Portlets collection.  Now for a simple
recursive look-up can be performed to locate the proper skin or use the system default if
no skins are defined.

I have been using this patch all day and everything seems fine.  The modification is not very
invasive as the only class that really needed to implement the 2 methods was PsmlPortlets.

Let me know if this approach sounds acceptable and I will post the patch.

Scott

> -----Original Message-----
> From: Glen Carl [mailto:carl@csc-monterey.com]
> Sent: Tuesday, December 31, 2002 2:13 PM
> To: Jetspeed Developers List
> Subject: Re: [PATCH] Root portlet set's skin not recognized by children
> 
> Scott,
> Below is info from bugzilla, my proposed fix and my test results on Dec.
> 16, 2002. However, Dec. 26, 2002 David said test case 1 did not work
> with my proposed fix. I have not had a chance to verify. It is possible
> your fix is better, and you may want to run through the test cases to
> verify the algorithm matches what is specified in bugzilla.
> Thanks,
> Glen
> 
>  From bugzilla bug 14909,
> When resolving the skin to use on a portlet, the skin is found using the
> global setting, but doesn't check the parent. The algorithm should:
> - first check the current portlet(set), if no skin then
>    - fallback to its parent, if no skin then
>      - fallback to global setting
> 
> proposed changes to fix issue with portlet skin use.
>   /services/portaltoolkit/JetspeedPortalToolkitService.java
> protected PortletConfig getPortletConfig( Portlets portlets )
>              if (portlets.getSkin()!=null)
>              {
>                  pc.setPortletSkin( getSkin( portlets.getSkin() ) );
>              }
>   remove        else
>   remove        {
>   remove            pc.setPortletSkin( getSkin( this.defaultSkin ) );
>   remove        }
> 
> 
> I ran the following tests.
>  >
>  > 1) no skin ref in PSML
>  > RESULT: uses default skin
>  >
>  > 2) skin set a top level, no skin setting for children portlets
>  > RESULT: children portlets use the top level skin setting
>  >
>  > 3) skin set at top level, and skin set in child portlet
>  > RESULT: uses skin assigned for child portlet
>  >
>  > 4) no skin at top level, and skin set in child portlet
>  > RESULT: uses skin assigned for child portlet, and all other portlets
> use
>  > default
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:jetspeed-dev-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:jetspeed-dev-
> help@jakarta.apache.org>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message