function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kuldeep paliwalkuldeep paliwal 

i create an visualforce tab on this tab i add one vf page which have three inner tab onclick on each tab their is a new button when we click on that a new vf page be open bt panel are not shown

Lets start from the first step i create an visualforce tab on this tab i add one vf page which have three inner tab(using TabPanel), on click on each tab their is a new button when we click on that a new vf page(on which we add something and we also have save & cancel button) will be open but my problem is that on this page my tabs are not shown and on cancel it come to first page their also tab panel are not shown.

Tab Panel:-
<apex:page standardController="BusterSetting__c" showHeader="true" sidebar="true">
    <!-- Define Tab panel .css styles -->
    <style>
    .activeTab {background-color: #236FBD; color:white; background-image:none}
    .inactiveTab { background-color: lightgrey; color:black; background-image:none}
    </style>
            
    <!-- Create Tab panel -->
    <apex:tabPanel switchType="client" selectedTab="name1" id="BusterSettingsTabPanel"
        tabClass="activeTab" inactiveTabClass="inactiveTab">
        <apex:tab label="Find Duplicate Layout" name="name1" id="tabOne">
        <apex:include pageName="FindDuplicatePageLayout"/>
        </apex:tab>
        <apex:tab label="Result Page Layout" name="name2" id="tabTwo">
         <apex:include pageName="ResultPageLayout"/>
        </apex:tab>
        <apex:tab label="Type Ahead" name="name3" id="tabThree">
        content for tab Three
        </apex:tab>
    </apex:tabPanel>
</apex:page>

Hear is a new Button:-
<apex:page controller="FindDuplicateFieldSetController">
    <apex:form >
        <apex:pageblock id="pb">
            <apex:pageblockButtons location="top">
                <apex:commandButton value="New" action="{!clickOnNew}"/>
            </apex:pageblockButtons>
        </apex:pageblock>
        <apex:pageblock >
            <apex:pageblockTable value="{!busterSetting}" var="c">
                <apex:column value="{!c.Name}"/>
                <apex:column value="{!c.Object_Name__c}"/>
                <apex:column value="{!c.Field_List__c}"/>       
                <apex:column value="{!c.Layout_Name__c}"/>
            </apex:pageblockTable>
            <apex:panelGrid columns="7">
                <apex:commandButton status="fetchStatus" reRender="pb" value="|<" action="{!first}" disabled="{!!hasPrevious}" title="First Page"/>
                <apex:commandButton status="fetchStatus" reRender="pb" value="<" action="{!previous}" disabled="{!!hasPrevious}" title="Previous Page"/>
                <apex:commandButton status="fetchStatus" reRender="pb" value=">" action="{!next}" disabled="{!!hasNext}" title="Next Page"/>
                <apex:commandButton status="fetchStatus" reRender="pb" value=">|" action="{!last}" disabled="{!!hasNext}" title="Last Page"/>
                <apex:outputText >{!(pageNumber * size)+1-size}-{!IF((pageNumber * size)>noOfRecords, noOfRecords,(pageNumber * size))} of {!noOfRecords}</apex:outputText>
                <apex:commandButton status="fetchStatus" reRender="pb" value="Refresh" action="{!refresh}" title="Refresh Page"/>
                <apex:outputPanel style="color:#4AA02C;font-weight:bold">
                    <apex:actionStatus id="fetchStatus" startText="Fetching..." stopText=""/>
                </apex:outputPanel>
            </apex:panelGrid>
        </apex:pageblock>
    </apex:form>
</apex:page>

Click on New this vf will be shown:-
<apex:page controller="FindDuplicateFieldSetController">
    <apex:form > 
        <apex:pageMessages ></apex:pageMessages>
            <apex:pageBlock title="Duplicate Filter Edit">
            
                <apex:pageBlockSection title="Filter Name" collapsible="false" columns="2">
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="Buster Job Name:"></apex:outputLabel>
                            <apex:inputText title="Buster Job Name" value="{!saveJobName}" required="true"/>
                        </apex:pageBlockSectionItem>
                     </apex:pageBlockSection> 
                   
                <apex:pageBlockSection title="Select Standard or Custom Object" columns="2" collapsible="false">
                    <apex:pageBlockSectionItem >
                        <apex:outputlabel value="Object:"/> 
                            <apex:actionRegion >      
                                <apex:selectList value="{!selectedObject}" size="1">
                                    <apex:selectOptions value="{!objNames}"/>
                                        <apex:actionSupport event="onchange" action="{!getObjectFields}" rerender="myFields"/>
                                </apex:selectList>
                            </apex:actionRegion>                         
                    </apex:pageBlockSectionItem>
                </apex:pageBlockSection>
                
                    <apex:outputPanel id="myFields"> 
                <apex:pageBlockSection title="Select Fields" collapsible="false">
                    <apex:pageblocksectionitem > 
                            <c:MultiselectPicklist leftLabel="Available Fields"
                            leftOption="{!allFields}" 
                            rightLabel="Selected Fields"
                            rightOption="{!selectedFields}"
                            size="14" width="150px" />  
                        </apex:pageblocksectionItem>       
                </apex:pageblocksection>
                    </apex:outputpanel>
                    
                <apex:pageblockButtons location="top">
                        <apex:commandButton value="Save" action="{!save}" />
                        <apex:commandButton value="Save & New" action="{!saveAndNew}" />
                        <apex:commandButton value="Cancel" action="{!cancel}" immediate="true"/>
                </apex:pageblockButtons> 
            </apex:pageBlock>
    </apex:form>
</apex:page>
Diksha Goel 6Diksha Goel 6

Hi Kuldeep,

Try removing immediate='true' from Cancel Button tag.
and 

Visit this also

https://stackoverflow.com/questions/12908640/call-class-method-on-onclick-of-apextab-visualforce-page

 

Thanks and regards

Diksha

Thinqloud Solutions