I want to click on a row of a table and open a new window with details of the clicked object.
I use this code:
..
<h:commandButton action="#{ordersBean.selectOrderDetail}"
onclick="clearProxy=window.clear_editForm;window.clear_editForm = function(){clearProxy(); window.open('about:blank', 'dettaglio', 'toolbar=no,location=no,menubar=no,statusbar=no,scrollbars=yes,width=600,height=400,top=200,left=200'); this.form.target = 'dettaglio'; window.clear_editForm = clearProxy;}"
value="dettaglio ordine"/>
..
I found this code in this forum. This solution is buggy if I use
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
becuase the first time load correctly the page but the second time it load the parent page on the new window.
So I tried also the jenia4faces popup components...and they have the same problem! (no everyone, but the "popupFrame" component yes).
I think that if I change the state saving method it will be correct, but I don't want to do it.
Any solution?
Thanks.