cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl TabContentAspect.java
Date Fri, 12 Dec 2003 08:17:27 GMT
cziegeler    2003/12/12 00:17:27

  Modified:    src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl
                        TabContentAspect.java
  Log:
  A tab can now also contain simpley items
  
  Revision  Changes    Path
  1.12      +6 -3      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java
  
  Index: TabContentAspect.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TabContentAspect.java	20 Aug 2003 12:05:35 -0000	1.11
  +++ TabContentAspect.java	12 Dec 2003 08:17:27 -0000	1.12
  @@ -59,6 +59,7 @@
   import org.apache.cocoon.portal.aspect.impl.DefaultAspectDescription;
   import org.apache.cocoon.portal.event.impl.ChangeAspectDataEvent;
   import org.apache.cocoon.portal.layout.CompositeLayout;
  +import org.apache.cocoon.portal.layout.Item;
   import org.apache.cocoon.portal.layout.Layout;
   import org.apache.cocoon.portal.layout.NamedItem;
   import org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext;
  @@ -101,11 +102,13 @@
               
               // loop over all tabs
               for (int j = 0; j < tabLayout.getSize(); j++) {
  -                NamedItem tab = (NamedItem) tabLayout.getItem(j);
  +                Item tab = tabLayout.getItem(j);
   
                   // open named-item tag
                   attributes.clear();
  -                attributes.addCDATAAttribute("name", String.valueOf(tab.getName()));
  +                if ( tab instanceof NamedItem ) {
  +                    attributes.addCDATAAttribute("name", String.valueOf(((NamedItem)tab).getName()));
  +                }
                   if (j == selected) {
                       attributes.addCDATAAttribute("selected", "true");
                   } else {
  
  
  

Mime
View raw message