Reputation: 455
I am using PrimeFaces 5.3 and eventually want to use the onnext attribute of the wizard to hide the Next button using hideNextNav(). However, I am currently just trying to test this functionality by calling the next() method instead. Since I am new to primefaces and jsf in general, I have attempted using various syntax, but all my attempts have rendered the Next button non-functional. When I try alert() instead, it works correctly, showing a message box and proceeding to the next tab.
My error:
My xhtml code:
<script>
function nextf(){
PF('wizard').next();
}
</script>
...
<p:wizard widgetVar="wizard" flowListener="#{editController.onFlowProcess}" onnext="nextf();">
Your help would be greatly appreciated.
Upvotes: 1
Views: 753
Reputation: 1108722
Opening the next tab triggers the onnext
event. The onnext
event function in turn triggers PF('wizard').next()
call. The PF('wizard').next()
in turn triggers the onnext
event. The onnext
event function in turn triggers PF('wizard').next()
call. The PF('wizard').next()
in turn triggers the onnext
event. The onnext
event function in turn triggers PF('wizard').next()
call. The PF('wizard').next()
in turn triggers the onnext
event. The onnext
event function in turn triggers PF('wizard').next()
call. The PF('wizard').next()
in turn triggers the onnext
event. The onnext
event function in turn triggers PF('wizard').next()
call. The PF('wizard').next()
in turn triggers the onnext
event. The onnext
event function in turn triggers PF('wizard').next()
call. The PF('wizard').next()
in turn triggers the onnext
event. The onnext
event function in turn triggers PF('wizard').next()
call. The PF('wizard').next()
in turn triggers the onnext
event. The onnext
event function in turn triggers PF('wizard').next()
call. The PF('wizard').next()
in turn triggers the onnext
event. The onnext
event function in turn triggers PF('wizard').next()
call. The PF('wizard').next()
in turn triggers the onnext
event. The onnext
event function in turn triggers PF('wizard').next()
call. The PF('wizard').next()
in turn triggers the onnext
event. The onnext
event function in turn triggers PF('wizard').next()
call. The PF('wizard').next()
in turn triggers the onnext
event. The onnext
event function in turn triggers PF('wizard').next()
call. The PF('wizard').next()
in turn triggers the onnext
event. The onnext
event function in turn triggers PF('wizard').next()
call. The PF('wizard').next()
in turn triggers the onnext
event. The onnext
event function in turn triggers PF('wizard').next()
call. The PF('wizard').next()
in turn triggers the onnext
event. The onnext
event function in turn triggers PF('wizard').next()
call. The PF('wizard').next()
in turn triggers the onnext
event. Etcetera.
And then maximum call stack size was exceeded.
You'd better not call PF('wizard').next()
during the onnext
event.
Upvotes: 5