I have a <p:commandButton>
which, oncomplete gives a dialog which contains an iframe. iframe contains another page which contains menu's. I wrote an actionListener on clicking commandbutton a method will execute and make menu's rendered false. Surprisingly the get method's for rendering variable is not calling. Here is my sample code.
<p:commandButton oncomplete="PF('Loc').show();"
action="bean.rendermethod"
update="createDialog">
<p:dialog closeOnEscape="true"
widgetVar="Loc"
modal="true"
dynamic="true"
id="createDialog"
minimizable="false"
maximizable="true"
height="100%"
width="100%"
style="background-color:rgb(232, 232, 232) !important;">
<iframe frameborder="0" height="768" width="100%"
src="loc.faces"
name="someName" id="someId" scrolling="auto" />
</p:dialog>
</p:commandButton>
loc.xhtml:
<p:menubar autoSubmenuDisplay="true"
effectDuration="0"
rendered="#{!(createAssociationsBean.splcCreate)}">
...
</p:menubar>
Java code:
public void renderMethod() {
setSplcCreate("true");
}
public String getSplcCreate() {
return splcCreate;
}
public void setSplcCreate(String splcCreate) {
this.splcCreate = splcCreate;
}