+ Start a Discussion
AWL-CRMAWL-CRM 

Skipping step in custom wizard

Dear all,

 

I would like to know if there is any way to skip a step in a custom wizard. Let me explain. My wizard page zero is based on a custom controller and call an initialization method:

 

<apex:page standardController="XXX__c" extensions="XXXCtrlExtension" showHeader="true" tabStyle="XXX" action="{!init}">

 Based on a specific criteria I would like to be able to skip step zero to go directly to step one (so initialization method should redirect user to page one but without loosing controller context. I tried :

 

public PageReference init()
{
   if (criteria)
   {
      return null;
   }
   else
   {
      return Page.ProvisioningWizardS1;
   }
}

 But without success. I tried also:

public PageReference init()
{
   if (criteria)
   {
      return null;
   }
   else
   {
      PageReference pageRef = Page.ProvisioningWizardS1;
      pageRef.setRedirect(true);
      return pageRef;
   }
}

 But it redirects loosing the controller context.

 

Is there any solution?

 

Thank you all beforehand.

AWL-CRMAWL-CRM

Up