Skip to content

Instantly share code, notes, and snippets.

@lfryc
Created October 22, 2012 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lfryc/3930163 to your computer and use it in GitHub Desktop.
Save lfryc/3930163 to your computer and use it in GitHub Desktop.
<h:form id="f2">
<rich:tabPanel id="panel2" switchType="ajax" activeItem="#{togglePanelBean.activeItem}">
<rich:tab header="tab1" name="t1">
Content will be here. Content will be here. Content will be here. Content will be here. Content will be
here. Content will be here. Content will be here. Content will be here. Content will be here. Content will
be here. Content will be here. Content will be here. Content will be here. Content will be here.
</rich:tab>
<rich:tab header="tab 1a (dis)" name="t1a" disabled="true" >
Disabled tab content
</rich:tab>
<rich:tab header="tab2" name="t2">
He he
</rich:tab>
</rich:tabPanel>
</h:form>
package org.richfaces;
import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import org.richfaces.event.ItemChangeEvent;
import org.richfaces.log.LogFactory;
import org.richfaces.log.Logger;
@ManagedBean
@ViewScoped
public class TogglePanelBean implements Serializable {
private String activeItem = "t1a";
public String getActiveItem() {
return activeItem;
}
public void setActiveItem(String activeItem) {
this.activeItem = activeItem;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment