0

I have A PrimeFaces wizard each tab contains InputText fields or SelectOneMenu menus ... how could I reset all fields and menus in all tabs on submit button ?? I'm using primefaces 5.3 thank you

m 1987
  • 153
  • 2
  • 14

1 Answers1

1

PrimeFaces has a component for clientside resets

 <p:commandButton value="Reset Tag" update="@form" process="@form" style="margin-right:20px;" >
     <p:resetInput target="***idFromYourTag***" />
 </p:commandButton>

If you need reset the backing bean values, you need to write a method. See also ResetInput

jklee
  • 2,198
  • 2
  • 15
  • 25