Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source
   * Copyright ${year}, Red Hat, Inc. and individual contributors
   * by the @authors tag. See the copyright.txt in the distribution for a
   * full listing of individual contributors.
   *
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
 package org.richfaces.component;
 
 import  javax.faces.component.UIComponent;
 import  javax.faces.component.behavior.ClientBehaviorHolder;
 

The <rich:accordionItem> component is a panel for use with the <rich:accordion> component. <rich:accordionItem> components can be added dynamically using iteration models with the <c:forEach> tag.

Author(s):
akolonitsky
 
 @JsfComponent(tag = @Tag(type = .), renderer = @JsfRenderer(type = "org.richfaces.AccordionItemRenderer"),
         attributes = {"events-mouse-props.xml""i18n-props.xml""core-props.xml"})
 public abstract class AbstractAccordionItem extends AbstractTogglePanelItem implements AbstractTogglePanelTitledItem,
         ClientBehaviorHolder {
     public static final String COMPONENT_TYPE = "org.richfaces.AccordionItem";
     public static final String COMPONENT_FAMILY = "org.richfaces.AccordionItem";
 
     enum Properties {
         header,
         contentClass,
         leftActiveIcon,
         leftInactiveIcon,
         leftDisabledIcon,
         rightActiveIcon,
         rightDisabledIcon,
         rightInactiveIcon,
         headerActiveClass,
         headerDisabledClass,
         headerInactiveClass,
         headerClass,
         switchType
     }
 
     public AbstractAccordionItem() {
         setRendererType("org.richfaces.AccordionItemRenderer");
     }
 
     @Override
     public AbstractAccordion getParentPanel() {
         return ComponentIterators.getParent(thisAbstractAccordion.class);
     }
 
     public AbstractAccordion getAccordion() {
         return getParentPanel();
     }
 
     public UIComponent getHeaderFacet(Enum<?> state) {
         return AbstractTab.getHeaderFacet(thisstate);
     }
 
     // ------------------------------------------------ Component Attributes
 
    

Provides the text on the panel header. The panel header is all that is visible when the accordion item is collapsed.

Alternatively the header facet could be used in place of the header attribute. This would allow for additional styles and custom content to be applied to the tab.

 
     @Attribute(generate = false)
     public String getHeader() {
         return (StringgetStateHelper().eval(.getName());
     }
 
     public void setHeader(String header) {
         getStateHelper().put(.header);
     }

    
The icon displayed on the left of the panel header when the panel is active
    @Attribute(generate = false)
    public String getLeftActiveIcon() {
    }
    public void setLeftActiveIcon(String leftActiveIcon) {
        getStateHelper().put(.leftActiveIcon);
    }

    
The icon displayed on the left of the panel header when the panel is not active
    @Attribute(generate = false)
    public String getLeftDisabledIcon() {
    }
    public void setLeftDisabledIcon(String leftDisabledIcon) {
        getStateHelper().put(.leftDisabledIcon);
    }

    
The icon displayed on the left of the panel header when the panel is disabled
    @Attribute(generate = false)
    public String getLeftInactiveIcon() {
    }
    public void setLeftInactiveIcon(String leftInactiveIcon) {
        getStateHelper().put(.leftInactiveIcon);
    }

    
The icon displayed on the right of the panel header when the panel is active
    @Attribute(generate = false)
    public String getRightActiveIcon() {
    }
    public void setRightActiveIcon(String rightActiveIcon) {
        getStateHelper().put(.rightActiveIcon);
    }

    
The icon displayed on the right of the panel header when the panel is disabled
    @Attribute(generate = false)
    public String getRightDisabledIcon() {
    }
    public void setRightDisabledIcon(String rightDisabledIcon) {
        getStateHelper().put(.rightDisabledIcon);
    }

    
The icon displayed on the right of the panel header when the panel is not active
    @Attribute(generate = false)
    public String getRightInactiveIcon() {
    }
    public void setRightInactiveIcon(String inactiveRightIcon) {
        getStateHelper().put(.inactiveRightIcon);
    }

    
The CSS class applied to the header when this panel is active
    @Attribute(generate = false)
    public String getHeaderActiveClass() {
    }
    public void setHeaderActiveClass(String headerActiveClass) {
        getStateHelper().put(.headerActiveClass);
    }

    
The CSS class applied to the header when this panel is disabled
    @Attribute(generate = false)
    public String getHeaderDisabledClass() {
    }
    public void setHeaderDisabledClass(String headerDisabledClass) {
        getStateHelper().put(.headerDisabledClass);
    }

    
The CSS class applied to the header when this panel is inactive
    @Attribute(generate = false)
    public String getHeaderInactiveClass() {
    }
    public void setHeaderInactiveClass(String headerInactiveClass) {
        getStateHelper().put(.headerInactiveClass);
    }

    
The CSS class applied to the header
    @Attribute(defaultValue = "getAccordion().getItemHeaderClass()")
    public String getHeaderClass() {
    }
    public void setHeaderClass(String headerClass) {
        getStateHelper().put(.headerClass);
    }

    
The CSS class applied to the panel content
    @Attribute(defaultValue = "getAccordion().getItemContentClass()")
    public String getContentClass() {
    }
    public void setContentClass(String contentClass) {
        getStateHelper().put(.contentClass);
    }

    
The switch mode when a panel is activated. One of: "client", "server", "ajax". Default: "ajax"
    @Attribute(generate = false)
    public SwitchType getSwitchType() {
        SwitchType switchType = (SwitchType) getStateHelper().eval(.);
        if (switchType == null) {
            switchType = getParentPanel().getSwitchType();
        }
        if (switchType == null) {
            switchType = SwitchType.DEFAULT;
        }
        return switchType;
    }
    public void setSwitchType(SwitchType switchType) {
        getStateHelper().put(.switchType);
    }
New to GrepCode? Check out our FAQ X