I'm facing a problem while trying to execute
a commandButton action and then redirect to
another pm:view. The bean action is invoked but
the redirect doesn't happen. Hier is an example
of my code:
Code: Select all
<f:view xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:pm="http://primefaces.org/mobile"
contentType="text/html">
<pm:page id="home">
<pm:header title="Sample"/>
<pm:content>
<h:form>
<p:commandButton action="#{myBean.initItems()}" value="Start"/>
</h:form>
</pm:content>
</pm:page>
<pm:page id="targetPage">
<pm:header title="Sample"/>
<pm:content>
// some content
</pm:content>
</pm:page>
</f:view>
@ManagedBean
public class MyBean {
public String initItems(){
// initialize the items ..
init();
return "pm:targetPage?transition=slide";
}
}
Any suggestions how to fix this issue ?
Thank you in advance.
Crombix.