This is a 5-minute guide to creating a wizard inside a modal panel. We are going to use a4j:include together with rich:modalPanel.
Start page (start.xhtml):
Wizard Close
First wizard page (/wizard/page1.xhtml):
Second wizard page (/wizard/page2.xhtml):
JSF configuration file:
bean test.Bean request /wizard/page1.xhtml next /wizard/page2.xhtml
Managed bean:
@KeepAlive
public class Bean {
private String view = "/wizard/page1.xhtml";
private Integer number;
private String color;
// getters and setters for each property
public void reset (){
this.view = "/wizard/page1.xhtml";
}
}
First page inside modal panel:

Second page inside modal panel:

Result (after closing the modal panel):

Leave a reply to Andy Cancel reply