A number of posts have said that I need to use loadStep in javascript to reset the tab, however I have been unable to make this work.
In order to try and get this working, I have created the following test page, however the tab never reset to the "indivname" tab. Any suggestions on how I can make this work?
I've also tried
Code: Select all
oncomplete="wiz.loadStep('indivname', true);"
I'm using Primefaces 3.4, Glassfish 3.1.2, Mojarra 2.1.6
Thanks,
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title><ui:insert name="title">Default Title</ui:insert></title>
<h:outputStylesheet library="css" name="pfcrud.css"/>
<h:outputScript library="scripts" name="pfcrud.js"/>
</h:head>
<h:body>
<h:form id="ClientCreateForm" prependId="false">
<p:wizard widgetVar="wiz" rendered='true'>
<p:tab id="indivname" title="Name">
<!--tab content in here-->
</p:tab>
<p:tab id="address" title="Address">
<!--tab content in here-->
</p:tab>
<p:tab id="confirm" title="Confirmation">
<p:panel header="Confirmation">
<!--tab content in here-->
<p:commandButton value="Save" oncomplete="wiz.loadStep(wiz.cfg.step[0], true);" immediate="true" ajax="false" update="wiz"/>
</p:panel>
</p:tab>
</p:wizard>
</h:form>
</h:body>
</html>