A popup page is displayed when the button is clicked, but it's title is "about:blank". I'm not sure why this is being displayed. My mangagedBean.print method is never called.
JSF PAGE snippet
BUTTON THAT STARTS THE PROCESS
<hx:commandExButton type="submit" value="Print" styleClass="commandExButton"
id="printButton"
onclick="doPopup(this); return false;">
</hx:commandExButton>
JSF PAGE JAVASCRIPT THAT GETS CALLED BY BUTTON
function doPopup(source) {
popup = window.open("","printPopup", "height=900, width=900, toolbar=yes, menubar=yes, scrollbars=yes");
popup.openerFormId = source.form.id;
popup.focus();
document.getElementById("subview1:viewFragment1:hidden:go").onclick(null);
}
JSF PAGE HIDDEN FORM THAT GETS SUBMITTED
<h:form id="hidden" target="printPopup">
<h:commandLink id="go" action="print">
</h:commandLink>
</h:form>
POPUP PAGE SNIPPET
<h:outputText styleClass="nms_outputText" style="height: 400px; width: 388px; overflow: visible" escape="false"
value="#{commonJSFCode.print}">
</h:outputText>
FACES-CONFIG.XML SNIPPET
<managed-bean>
<managed-bean-name>commonJSFCode</managed-bean-name>
<managed-bean-class>pagecode.CommonJSFCode</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
MANAGED BEAN SNIPPET
public
String getPrint() {
do stuff...
return "";
}