org.apache.cocoon.portal.layout.renderer.aspect.impl
Class TabContentAspect

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.portal.layout.renderer.aspect.impl.AbstractAspect
          extended by org.apache.cocoon.portal.layout.renderer.aspect.impl.AbstractCompositeAspect
              extended by org.apache.cocoon.portal.layout.renderer.aspect.impl.CompositeContentAspect
                  extended by org.apache.cocoon.portal.layout.renderer.aspect.impl.TabContentAspect
All Implemented Interfaces:
Component, LogEnabled, Serviceable, ThreadSafe, RendererAspect

public class TabContentAspect
extends CompositeContentAspect

Example XML:

   <composite>
     <named-item name="..." parameter="link-event"/>
     <named-item name="..." selected="true">
       <!-- output from processing layout -->
     </named-item>
     <named-item name="..." parameter="link-event"/>
     <named-item name="..." parameter="link-event"/>
   </composite>
 

Example XML with sub-navigation (child-tag-name enabled):

   <composite>
     <named-item name="..." parameter="link-event"/>
     <named-item name="..." selected="true">
       <!-- output from processing layout -->
     </named-item>
     <named-item name="..." parameter="link-event"/>
     <named-item name="..." parameter="link-event">
       <child-tag-name>
         <named-item name="..." parameter="link-event"/>
         <named-item name="..." parameter="link-event"/>
       </child-tag-name>
     </named-item>
   </composite>
 

Example XML with sub-navigation (show-all-nav without child-tag-name enabled):

   <composite>
     <named-item name="..." parameter="link-event"/>
     <named-item name="..." selected="true">
       <!-- output from processing layout -->
     </named-item>
     <named-item name="..." parameter="link-event"/>
     <named-item name="..." parameter="link-event">
         <named-item name="..." parameter="link-event"/>
         <named-item name="..." parameter="link-event"/>
     </named-item>
   </composite>
 
*

Applicable to:

Parameters

storereqStringnull
aspect-nameAspect holding the current tab state.reqString"tab"
tag-nameName of the tag enclosing the following output. String"composite"
root-tagShould a tag enclosing the following output be generated? booleantrue
child-tag-nameThe name of the tag to enclose named items (i.e. the subnavigation) of non-selected (default) items. Setting this parameter will enable show-all-nav. String""
show-all-navSetting this value to true will output the enclosed named-items booleanfalse
include-selectedSetting this value to true will output the enclosed named-items of the selected tab too. booleanfalse

Version:
CVS $Id: TabContentAspect.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler, Volker Schmitt

Nested Class Summary
protected  class TabContentAspect.TabPreparedConfiguration
           
 
Nested classes/interfaces inherited from class org.apache.cocoon.portal.layout.renderer.aspect.impl.CompositeContentAspect
CompositeContentAspect.PreparedConfiguration
 
Field Summary
 
Fields inherited from class org.apache.cocoon.portal.layout.renderer.aspect.impl.CompositeContentAspect
ITEM_STRING
 
Fields inherited from class org.apache.cocoon.portal.layout.renderer.aspect.impl.AbstractAspect
manager
 
Fields inherited from interface org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect
ROLE
 
Constructor Summary
TabContentAspect()
           
 
Method Summary
 Iterator getAspectDescriptions(Object configuration)
          Return the aspects required for this renderer
 boolean isRequired()
          Chains that include this aspect must always render
 Object prepareConfiguration(Parameters configuration)
          Compile the configuration.
 void toSAX(RendererAspectContext context, Layout layout, PortalService service, ContentHandler handler)
          Stream out raw layout
 
Methods inherited from class org.apache.cocoon.portal.layout.renderer.aspect.impl.CompositeContentAspect
processItem
 
Methods inherited from class org.apache.cocoon.portal.layout.renderer.aspect.impl.AbstractCompositeAspect
processLayout
 
Methods inherited from class org.apache.cocoon.portal.layout.renderer.aspect.impl.AbstractAspect
service
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabContentAspect

public TabContentAspect()
Method Detail

isRequired

public boolean isRequired()
Chains that include this aspect must always render

Specified by:
isRequired in interface RendererAspect
Overrides:
isRequired in class AbstractAspect
Returns:
true

toSAX

public void toSAX(RendererAspectContext context,
                  Layout layout,
                  PortalService service,
                  ContentHandler handler)
           throws SAXException
Description copied from interface: RendererAspect
Stream out raw layout

Specified by:
toSAX in interface RendererAspect
Overrides:
toSAX in class CompositeContentAspect
Throws:
SAXException
See Also:
AbstractCompositeAspect.toSAX(org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext, org.apache.cocoon.portal.layout.Layout, org.apache.cocoon.portal.PortalService, org.xml.sax.ContentHandler)

getAspectDescriptions

public Iterator getAspectDescriptions(Object configuration)
Return the aspects required for this renderer

Specified by:
getAspectDescriptions in interface RendererAspect
Overrides:
getAspectDescriptions in class AbstractAspect
Returns:
An iterator for the aspect descriptions or null.

prepareConfiguration

public Object prepareConfiguration(Parameters configuration)
                            throws ParameterException
Description copied from interface: RendererAspect
Compile the configuration. A renderer aspect can "compile" the configuration in order to increase performance. If the renderer does not want to compile it should simply return the configuration. The "compiled" configuration is passed to the RendererAspect.getAspectDescriptions(Object) method and is available during streaming via the context object. This method can also be used for validation the configuration.

Specified by:
prepareConfiguration in interface RendererAspect
Overrides:
prepareConfiguration in class CompositeContentAspect
Throws:
ParameterException
See Also:
RendererAspect.prepareConfiguration(org.apache.avalon.framework.parameters.Parameters)


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.