Primefaces how to update content in a dialog and keep the dialog centered?

前端 未结 2 961
天命终不由人
天命终不由人 2021-02-01 20:29

I have a dialog that contains no content on page load and I\'m dynamically setting the content of a dialog box based on the link that a user clicks on.



        
2条回答
  •  一生所求
    2021-02-01 21:08

    The onclick is executed before the ajax request. You need to open the dialog in oncomplete instead. This will be executed after the ajax request and update. The is namely by default hidden unless its visible attribute evaluates true.

    
    

    Unrelated to the concrete problem, are you aware that you can pass fullworthy objects as method arguments since EL 2.2? This makes the and actionListener "hack" superfluous:

    
    

提交回复
热议问题