Resetting a wizard's initial step.

UI Components for JSF
Post Reply
michaelb
Posts: 23
Joined: 23 Jul 2010, 14:25

16 Aug 2010, 16:18

Hi,

Having a wizard inside a dialog, i'd like to set the initial tab back to the first one when hitting the dialog's cancel button.
The step attribute's value doesn't update when hitting "next" or "back", so manipulating it's value doesn't help. I'm not sure this is by design.

So what's the best way to achieve this?

Thanks!

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

16 Aug 2010, 17:05

Hi,

I guess you can do it with client side api;

Code: Select all

<p:wizard widgetVar="wiz" ...

Code: Select all

function resetWizard() {
   wiz.loadStep(wiz.cfg.steps[0], true);
}
You can run this resetWizard function when dialog's cancel button is clicked.

I think it would be good to add this to the client side api like "reset" method.

michaelb
Posts: 23
Joined: 23 Jul 2010, 14:25

17 Aug 2010, 13:20

Thanx, that worked! ;)

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

17 Aug 2010, 15:46

Glad to hear!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 9 guests