TabView TabView is a tabbed panel component.

Basic

The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. His beloved son Michael has just come home from the war, but does not intend to become part of his father's business. Through Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those who give respect, but given to ruthless violence whenever anything stands against the good of the family.

On-Demand Loading

The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. His beloved son Michael has just come home from the war, but does not intend to become part of his father's business. Through Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those who give respect, but given to ruthless violence whenever anything stands against the good of the family.

Events

The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. His beloved son Michael has just come home from the war, but does not intend to become part of his father's business. Through Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those who give respect, but given to ruthless violence whenever anything stands against the good of the family.

DataModel

Brand: Fiat
Year: 2014
Color: Black

Scrollable

Tab 1 Content

Orientation - Top|Bottom|Left|Right

The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. His beloved son Michael has just come home from the war, but does not intend to become part of his father's business. Through Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those who give respect, but given to ruthless violence whenever anything stands against the good of the family.
<h:form id="form">
            
    <p:growl id="msgs" showDetail="true" />

    <h3 style="margin-top:0">Basic</h3>
    <p:tabView>
        <p:tab title="Godfather Part I">
            <h:panelGrid columns="2" cellpadding="10">
                <p:graphicImage name="demo/images/godfather/godfather1.jpg" />
                <h:outputText
                    value="The story begins as Don Vito Corleone..." />
            </h:panelGrid>
        </p:tab>
        <p:tab title="Godfather Part II">
            <h:panelGrid columns="2" cellpadding="10">
                <p:graphicImage name="demo/images/godfather/godfather2.jpg" />
                <h:outputText value="Francis Ford Coppola's legendary..." />
            </h:panelGrid>
        </p:tab>
        <p:tab title="Godfather Part III">
            <h:panelGrid columns="2" cellpadding="10">
                <p:graphicImage name="demo/images/godfather/godfather3.jpg" />
                <h:outputText value="After a break of more than 15 years..." />
            </h:panelGrid>
        </p:tab>
    </p:tabView>

    <h3>On-Demand Loading</h3>
    <p:tabView dynamic="true" cache="true">
        <p:tab title="Godfather Part I">
            <h:panelGrid columns="2" cellpadding="10">
                <p:graphicImage name="demo/images/godfather/godfather1.jpg" />
                <h:outputText
                    value="The story begins as Don Vito Corleone..." />
            </h:panelGrid>
        </p:tab>
        <p:tab title="Godfather Part II">
            <h:panelGrid columns="2" cellpadding="10">
                <p:graphicImage name="demo/images/godfather/godfather2.jpg" />
                <h:outputText value="Francis Ford Coppola's legendary..." />
            </h:panelGrid>
        </p:tab>
        <p:tab title="Godfather Part III">
            <h:panelGrid columns="2" cellpadding="10">
                <p:graphicImage name="demo/images/godfather/godfather3.jpg" />
                <h:outputText value="After a break of more than 15 years..." />
            </h:panelGrid>
        </p:tab>
    </p:tabView>

    <h3>Change Event</h3>
    <p:tabView>
        <p:ajax event="tabChange" listener="#{tabbedView.onTabChange}" update=":form:msgs"/>
        <p:ajax event="tabClose" listener="#{tabbedView.onTabClose}" update=":form:msgs"/>

        <p:tab title="Godfather Part I">
            <h:panelGrid columns="2" cellpadding="10">
                <p:graphicImage name="demo/images/godfather/godfather1.jpg" />
                <h:outputText
                    value="The story begins as Don Vito Corleone..." />
            </h:panelGrid>
        </p:tab>
        <p:tab title="Godfather Part II" closable="true">
            <h:panelGrid columns="2" cellpadding="10">
                <p:graphicImage name="demo/images/godfather/godfather2.jpg" />
                <h:outputText value="Francis Ford Coppola's legendary..." />
            </h:panelGrid>
        </p:tab>
        <p:tab title="Godfather Part III" closable="true">
            <h:panelGrid columns="2" cellpadding="10">
                <p:graphicImage name="demo/images/godfather/godfather3.jpg" />
                <h:outputText value="After a break of more than 15 years..." />
            </h:panelGrid>
        </p:tab>
    </p:tabView>

    <h3>DataModel</h3>
    <p:tabView value="#{tabbedView.cars}" var="car">
        <p:tab title="Car - #{car.id}">
            <h:panelGrid columns="2" cellpadding="5">
                <f:facet name="header">
                    <p:graphicImage name="demo/images/car/#{car.brand}-big.gif" />
                </f:facet>                    
                <h:outputText value="Brand:" style="font-weight: bold"/>
                <h:outputText value="#{car.brand}" />

                <h:outputText value="Year:" style="font-weight: bold"/>
                <h:outputText value="#{car.year}" />

                <h:outputText value="Color:" style="font-weight: bold"/>
                <h:outputText value="#{car.color}" />
            </h:panelGrid>
        </p:tab>
    </p:tabView>

    <h3>Scrollable</h3>
    <p:tabView scrollable="true">
        <p:tab title="Tab 1">Tab 1 Content</p:tab>
        <p:tab title="Tab 2">Tab 2 Content</p:tab>
        <p:tab title="Tab 3">Tab 3 Content</p:tab>
        <p:tab title="Tab 4">Tab 4 Content</p:tab>
        <p:tab title="Tab 5">Tab 5 Content</p:tab>
        <p:tab title="Tab 6">Tab 6 Content</p:tab>
        <p:tab title="Tab 7">Tab 7 Content</p:tab>
        <p:tab title="Tab 8">Tab 8 Content</p:tab>
        <p:tab title="Tab 9">Tab 9 Content</p:tab>
        <p:tab title="Tab 10">Tab 10 Content</p:tab>
        <p:tab title="Tab 11">Tab 11 Content</p:tab>
        <p:tab title="Tab 12">Tab 12 Content</p:tab>
        <p:tab title="Tab 13">Tab 13 Content</p:tab>
        <p:tab title="Tab 14">Tab 14 Content</p:tab>
        <p:tab title="Tab 15">Tab 15 Content</p:tab>
        <p:tab title="Tab 16">Tab 16 Content</p:tab>
        <p:tab title="Tab 17">Tab 17 Content</p:tab>
        <p:tab title="Tab 18">Tab 18 Content</p:tab>
        <p:tab title="Tab 19">Tab 19 Content</p:tab>
        <p:tab title="Tab 20">Tab 20 Content</p:tab>
        <p:tab title="Tab 21">Tab 21 Content</p:tab>
        <p:tab title="Tab 22">Tab 22 Content</p:tab>
        <p:tab title="Tab 23">Tab 23 Content</p:tab>
        <p:tab title="Tab 24">Tab 24 Content</p:tab>
        <p:tab title="Tab 25">Tab 25 Content</p:tab>                
    </p:tabView>

    <h3>Orientation - Top|Bottom|Left|Right</h3>
    <p:tabView orientation="left">
        <p:tab title="Godfather Part I">
            <h:panelGrid columns="2" cellpadding="10">
                <p:graphicImage name="demo/images/godfather/godfather1.jpg" />
                <h:outputText
                    value="The story begins as Don Vito Corleone..." />
            </h:panelGrid>
        </p:tab>
        <p:tab title="Godfather Part II">
            <h:panelGrid columns="2" cellpadding="10">
                <p:graphicImage name="demo/images/godfather/godfather2.jpg" />
                <h:outputText value="Francis Ford Coppola's legendary..." />
            </h:panelGrid>
        </p:tab>
        <p:tab title="Godfather Part III">
            <h:panelGrid columns="2" cellpadding="10">
                <p:graphicImage name="demo/images/godfather/godfather3.jpg" />
                <h:outputText value="After a break of more than 15 years..." />
            </h:panelGrid>
        </p:tab>
    </p:tabView>
</h:form>
                
PrimeTek, Copyright © 2015
All rights reserved.
Running PrimeFaces-6.0.16 on Mojarra-2.2.8.