I'm having trouble displaying the deploy-java button on ajax rerender
<h:form id="deployJavaForm" rendered="#{myBean.shouldRender}"> <h:outputScript library="js" name="http://java.com/js/deployJava.js" target="head" /> <script type="text/javascript"> deployJava.createWebStartLaunchButton('blah.jnlp', '1.7.0'); </script> </h:form>
when
myBean.shouldRender == true
and the form is updated, the only thing that is displayed (on the white page) is the deployJava button, and the request remains hanging. if shouldRender is true upon initial request, the page and button are displayed correctly. Im using in case he can help.
I want the button to display correctly, regardless of whether its part is ajax rerender or the full initial request.
Update: I did my homework and created a minimal example that still reproduces the problem. It seems I am still having the same problems, regardless of whether the script declaration is in the head or in the body (I have an deployJava.js instance in / js resources)
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html 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"> <h:head> </h:head> <h:body> <h:outputScript library="js" name="deployJava.js" target="head" /> <h:form id="djForm"> <script type="text/javascript"> deployJava.createWebStartLaunchButton( 'test.jnlp', '1.7.0'); </script> <p:commandButton value="update" update="djForm" /> </h:form> </h:body> </html>
edit: (special materials) below the test give the same problem as before.
<h:outputScript> deployJava.createWebStartLaunchButton( 'test.jnlp', '1.7.0'); </h:outputScript>
edit: image added 
after clicking the refresh button, only the deployJava button is displayed and the page loads
edit (daniel): both on success and oncomplete give the same behavior: (
<h:form id="djForm"> <h:outputScript> function abcefg() { deployJava.createWebStartLaunchButton('test.jnlp', '1.7.0'); } </h:outputScript> <p:commandButton value="update" update="djForm" onsuccess="abcefg()" /> </h:form>