Sunday, March 10, 2013

Displaying Records and Fields of Objects using Tab and Tab Panel

Visualforce Page:

<apex:page standardController="Account" recordSetVar="accs" >
<apex:form >
<apex:tabPanel >
<apex:tab title="Accounts" label="Accounts" switchType="Client">
<apex:pageBlock >
<apex:pageBlockTable value="{!accs}" var="a">
<apex:column value="{!a.name}"/>
<apex:column value="{!a.rating}"/>
<apex:column value="{!a.type}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:tab>
<apex:tab title="Create Account" label="Create Account" switchType="Client">
<apex:pageBlock >
<apex:PageBlockSection >
<apex:inputField value="{!account.name}"/>
<apex:pageBlockSectionItem >
Fax:<apex:inputText value="{!account.fax}"/>
</apex:pageBlockSectionItem>
</apex:PageBlockSection>
</apex:pageBlock>
</apex:tab>
</apex:tabPanel>
</apex:form>
</apex:page>



No comments:

Post a Comment