I need to create a confirm dialog popup (OK and Cancel button) inside the ServiceImpl.java file. It needs to be created here and the OK and CANCEL needs to be handled here. Is there a way to do this without using beans and the page itself? I have tried using things such as the FacesMessageUtils Library but it does not want to import from the ServiceImpl.java file.