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

switch to another TAB by code

Hello Helpers

I have a visual force page  with 2  tabs

On tab  1 I  have some components  like  grids  and customr button

I would like  to   switch automatically  from Tab 1  to Tab 2  when I press the custom button BUT ONLY AFTER  the apex controller method  associated to  custom buton Action has  completed

I tried  to use  oncomplete  to achieve this.  My problem is  that the tab  is switched but  it looks  like the operation  in DoSonethingatApexside  is not performed

     <apex:pageBlockButtons >
     <apex:commandButton action="{!DoSonethingatApexside}" value="Preview"            

If  I remove the oncomplete  and press the custom button and switch tomTab 2  manually  all Are OK
I see in tab 2  the results  of the custom button action

any suggestions?

Thanks in adsvance

Best Answer chosen by csbaa
Shrikant BagalShrikant Bagal
to use "oncomplete" attaribute, you have to use reRender attaribute with commandButton.