I’ve got a custom component that I need to use if I create a popup on a JSF page.
It seems it uses the DHTML technique with CSS hide and show and creates an overlay on the current page, and not a proper window.
In my case, it’s to display an image that is served by a servlet.
I have tried several thing and here are the results:
1) if I use <h:commandButton action="bean.displayImage" onclick="mypopup.show()"> the popup and image are displayed then disappear because the commandButton refreshes the page.
2) if I change the type of the commandButton to “button”, then bean.displayImagein the action field is never called, neither is the servlet supposed to serve the image
3) I also tried putting the bean.displayImage in the actionListener field and modifying the method by adding ActionEvent e as param to prevent the page from refreshing, but it then has the same behavior as 2)
I’m running out of ideas, can anyone help ?
Thanks in advance,
Michael
The functional requirement is not entirely clear, but you could use
<f:ajax>to make it an ajax request instead and render certain parts of the page.Something like: