Created
October 22, 2012 07:42
-
-
Save lfryc/3930163 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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