Return-Path: Delivered-To: apmail-xml-cocoon-cvs-archive@xml.apache.org Received: (qmail 65945 invoked by uid 500); 4 Jun 2002 08:31:11 -0000 Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: cocoon-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 65936 invoked by uid 500); 4 Jun 2002 08:31:10 -0000 Delivered-To: apmail-xml-cocoon2-cvs@apache.org Date: 4 Jun 2002 08:31:18 -0000 Message-ID: <20020604083118.26165.qmail@icarus.apache.org> From: cziegeler@apache.org To: xml-cocoon2-cvs@apache.org Subject: cvs commit: xml-cocoon2/src/webapp/samples/portal sitemap.xmap X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N cziegeler 2002/06/04 01:31:18 Modified: src/java/org/apache/cocoon/components CocoonComponentManager.java src/webapp/samples/portal sitemap.xmap Log: Now it is possible to use the role hint for component configurations Revision Changes Path 1.25 +11 -9 xml-cocoon2/src/java/org/apache/cocoon/components/CocoonComponentManager.java Index: CocoonComponentManager.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/CocoonComponentManager.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- CocoonComponentManager.java 4 Jun 2002 07:52:01 -0000 1.24 +++ CocoonComponentManager.java 4 Jun 2002 08:31:18 -0000 1.25 @@ -82,7 +82,7 @@ * and by handling the lookup of the SourceResolver (in development) * * @author Carsten Ziegeler - * @version CVS $Id: CocoonComponentManager.java,v 1.24 2002/06/04 07:52:01 cziegeler Exp $ + * @version CVS $Id: CocoonComponentManager.java,v 1.25 2002/06/04 08:31:18 cziegeler Exp $ */ public final class CocoonComponentManager extends ExcaliburComponentManager @@ -242,22 +242,24 @@ if (component instanceof SitemapConfigurable) { for(int i=0; i < stack.size(); i++) { Object[] o = (Object[])stack.get(i); - Configuration cc = (Configuration)o[5]; - if ( null != cc ) { - cc = cc.getChild( role, false ); + Configuration parent = (Configuration)o[5]; + if ( null != parent ) { + Configuration cc = parent.getChild( role, false ); if ( null != cc ) { ((SitemapConfigurable) component).setSitemapConfiguration(cc); } else if ( null != this.roleManager) { -/* + // check for hint - Configuration[] childs = cc.getChildren(); + Configuration[] childs = parent.getChildren(); if ( null != childs ) { for(int m = 0; m < childs.length; m++) { - System.out.println("Testing: " + childs[m].getName()); final String r = this.roleManager.getRoleForName(childs[m].getName()); - System.out.println("Role: " + r); + if ( role.equals(r) ) { + ((SitemapConfigurable) component).setSitemapConfiguration(childs[m]); + m = childs.length; + } } - }*/ + } } } } 1.2 +2 -2 xml-cocoon2/src/webapp/samples/portal/sitemap.xmap Index: sitemap.xmap =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/portal/sitemap.xmap,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- sitemap.xmap 3 Jun 2002 11:45:53 -0000 1.1 +++ sitemap.xmap 4 Jun 2002 08:31:18 -0000 1.2 @@ -18,7 +18,7 @@ - + @@ -58,7 +58,7 @@ - + ---------------------------------------------------------------------- In case of troubles, e-mail: webmaster@xml.apache.org To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: cocoon-cvs-help@xml.apache.org