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
  * 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:
 package org.richfaces.component;
 import  javax.faces.component.UIOutput;

The <rich:togglePanelItem> component is a switchable panel for use with the <rich:togglePanel> component. Use the <rich:togglePanelItem> component to define the content for a panel using nested components. Switching between <rich:togglePanelItem> components is handled by the <rich:toggleControl> behavior.

Brian Leathem
 @JsfComponent(tag = @Tag(type = .), renderer = @JsfRenderer(type = "org.richfaces.TogglePanelItemRenderer"), attributes = {
         "core-props.xml""events-mouse-props.xml""i18n-props.xml" })
 public abstract class AbstractTogglePanelItem extends UIOutput implements AbstractTogglePanelItemInterface {
     public static final String COMPONENT_TYPE = "org.richfaces.TogglePanelItem";
     public static final String COMPONENT_FAMILY = "org.richfaces.TogglePanelItem";
     protected static final String NAME = "name";
     enum Properties {
     protected AbstractTogglePanelItem() {

Suppress the inherited value attribute from the taglib.
     @Attribute(hidden = true)
     public abstract Object getValue();
     public String getFamily() {
         return ;
     public AbstractTogglePanel getParentPanel() {
         return ComponentIterators.getParent(thisAbstractTogglePanel.class);
     public boolean isDynamicPanelItem() {
         return AbstractTogglePanel.isPanelItemDynamic(this);
     public boolean isActive() {
         return getParentPanel().isActiveItem(this);
     public boolean shouldVisitChildren() {
         return isActive() || getSwitchType() == SwitchType.client;
     // ------------------------------------------------ Component Attributes
The name of the panel, used for identifying and manipulating the active panel. If you do not specify a name, the clientId will be used as the name.
     @Attribute(generate = false)
     public String getName() {
         return (StringgetStateHelper().eval(getClientId());
     public void setName(String name) {
    public String toString() {
        return "TogglePanelItem {name: " + getName() + ", switchType: " + getSwitchType() + '}';

The switch type for this toggle panel: client, ajax (default), server
    @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) {
New to GrepCode? Check out our FAQ X