I have several questions all related to how to implement a panelgroup within another panelgroup. I have a Main panelgroup which works well without trouble. Within one of its "panels", it contains another panelgroup which we can call a Sub panelgroup, as shown below.
Problem;Adding the Sub panelgroup "statically" using an absolute path to the "panel" works,but adding the Sub panelgroup "programmatically" it does not show and doesnt throw any error. In otherword, i need to add the Subpanelgroup "programmatically" using
<ui:include src="#{backingBean.panel}" />
instead of
<ui:include src="/Webpages/file/someWhere/panel.xhtml" />
The obvious reason is because I need to show the other hidden "panels" inside the panelgroup using the backingBean. Moreover, my backingBean has the method init() and setPanel() which all have refused to work inside the html/jsf code.
My backingbean class
@ManagedBean
@SessionScoped
@Named(value = "ganttNavBean")
public class GanttNavigatorBean implements Serializable {
private String schedule;
String includedPagex ;
//private String logoPage = "logoPage.xhtml";
@PostConstruct
public void init() {
schedule = "/testpage.xhtml";
// Default include.
}
// +getter+setter.
public String getPage() {
return schedule;
}
public void setPage(String schedule) {
//VisibilityUtils vutils = new VisibilityUtils(page);
this.schedule = schedule;
}
}
What is the best way to get my Sub panel showing?
When do i ever use init(). directly into my html/jsf code?
Is it possible to use setPanel(). in a commandbutton within the Subpanel to change the subpanel contents?(Yes, i know the button will also dissapper, thats what I need).