cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the wizard title at run-time

alarocca
Champ in-the-making
Champ in-the-making
Hello,

is it possible to change my custom wizard title at runtime? For instance, I would append the content name. I have this information on my bean but I did not found any method for change the title. My wizard is based on the wizard framework.

Best regards,
Alessandro
3 REPLIES 3

zaizi
Champ in-the-making
Champ in-the-making
Over write the following methods in your custom wizard.

   /**
    * Returns the title to be used for the current step
    * <p>If this returns <tt>null</tt> the WizardManager will
    * lookup the title via the dialog configuration</p>
    *
    * @return The title or <tt>null</tt> if the title is to be acquired via configuration
    */
   public String getStepTitle();
  
   /**
    * Returns the description to be used for the current step
    * <p>If this returns <tt>null</tt> the WizardManager will
    * lookup the description via the dialog configuration</p>
    *
    * @return The decsription or <tt>null</tt> if the title is to be acquired via configuration
    */
   public String getStepDescription();

alarocca
Champ in-the-making
Champ in-the-making
Thanks Zaizi, your hint will be surely useful for future needs. Unfortunately it is not properly what I want. Indeed it overrides the step title, not the wizard title.

BR, Alessandro

Over write the following methods in your custom wizard.

   /**
    * Returns the title to be used for the current step
    * <p>If this returns <tt>null</tt> the WizardManager will
    * lookup the title via the dialog configuration</p>
    *
    * @return The title or <tt>null</tt> if the title is to be acquired via configuration
    */
   public String getStepTitle();
  
   /**
    * Returns the description to be used for the current step
    * <p>If this returns <tt>null</tt> the WizardManager will
    * lookup the description via the dialog configuration</p>
    *
    * @return The decsription or <tt>null</tt> if the title is to be acquired via configuration
    */
   public String getStepDescription();

alarocca
Champ in-the-making
Champ in-the-making
Overriding getContainerTitle() is the trick!

Thank you again Zaizi, you pointed me to the right way.

Greetings, Alessandro