wizard reset

UI Components for JSF
Post Reply
nazila
Posts: 11
Joined: 14 Mar 2011, 09:16

25 Jul 2011, 06:37

How can I reset Wizard component of PF 3.0 M2? say, when user does submit at the final step then the wizard go to the first step with blank elements to do a new wizard process again.

robert.m
Posts: 226
Joined: 07 Dec 2010, 22:52
Location: Salzburg/Austria

26 Jul 2011, 16:58

I had this problem too. My (quite dirty) solution was to bind the Wizard component to a backing bean, then give every tab you use inside the wizard a unique id. Then you can set the "step"-property of you wizard with e.g. a commandButton with a f:setPropertyActionListener attached like this:
<p:commandButton value="Reset" update="myWizard">
<f:setPropertyActionListener value="firststep" target="#{bean.wizard.step}" />
</p:commandButton>
"firststep" would be the id of your first tab. Additionally you have to make sure that the backing-bean values of your wizard are being reset.

nazila
Posts: 11
Joined: 14 Mar 2011, 09:16

31 Jul 2011, 07:36

Thanks. But when I bind my wizard to a wizard within backing bean (some thing like

Code: Select all

private Wizard wizard = new Wizard(); 
), the wizard on the page doesn't work correctly :cry:

offeliax
Posts: 1
Joined: 30 Jul 2011, 05:56

02 Aug 2011, 07:52

What charactor from the wizard of oz should my husband dress up as? our baby girl will be a couple months come halloween and she's going to be the wicked witch. I will be dorothy. My husband wanted to be the great and powerful wizard of oz, but that's proving difficult as he was imagining parinting his face green with a bald cap to kinda look like a floating head but it may or may not turn out too well. Anyone with creative ideas? Ya know, something besides the main characters themselves.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests