3
Hello, I am creating a java register with Primefaces. I have the following problem: I have a screen in xhtml and it carries the registered data, so far so good. The problem is when someone on another computer is accessing at the same time, you will not be able to see the new registration that was inserted, you will only be able to see if you have F5 on the page to update. Does anyone know how I do this implementation so that this problem is solved?
Okay, Raphão Torres, I’m having a hard time creating this method "load", I’m seeing how I do because I’m learning java too, thank you very much
– Francisco Lima
Good night I managed to make it work, I used this public void method to loadNomeDaClasse(){ nameDaClasseDAO nameDaClasseDAO = new nameDaClasseDAO(); classname = classname.lister(); , using in view the <p:Poll interval="3" Listener="#{className" />
– Francisco Lima
in my bean I used @Viewscoped. But now I have a doubt, I saw that he will be doing this every 3 seconds, this can an overload on the server and do the same to respond?
– Francisco Lima
Glad you could work it out. Yes, you can overload the server. Change the interval for a longer time. I believe that there is no other way to do... Here in my company we have a screen with the result of sales that updates every 1 minute. But in your case, I think 20 seconds is good enough. Hugging!
– Raphão Torres
Brigado Raphão Torres
– Francisco Lima