1

I have a page as below with 2 components and separate controllers for each component. Both components has DML operations. When I am in t2 tab and save record, its always going back to t1 tab. Can you please help me how to retain in t2 tab after save.

<apex:page>
<apex:tabPanel switchType="client">
  <apex:tab    name="t1" id="t1"> 
        <c:t1 />
    </apex:tab>
    <apex:tab     name="t2" id="t2" > 
        <c:t2 />
    </apex:tab>       
    </apex:tabPanel> 
</apex:page>
1

you can pass some variable in url when you redirect and then from parameter you can decide you need to stay on first tab or second.

Otherwise don't rerender the complete part just rerender inside the component.

It will solve your problem.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.