Dialog not updating after populating model in action method

前端 未结 1 1494
余生分开走
余生分开走 2021-01-27 16:10

I am using a primefaces dialog box. I have a list of items, and whenever I choose an item, I want the dialog box to display that item name. However, this is not happening. Rat

相关标签:
1条回答
  • 2021-01-27 16:36

    You forgot to update the dialog before opening.

    <p:commandButton ... update="dialogId" />
    

    I also suggest to use oncomplete instead of onclick to open the dialog.

    See also:

    • Understanding PrimeFaces process/update and JSF f:ajax execute/render attributes
    • How to show details of current row from p:dataTable in a p:dialog and update after save
    • Primefaces p:dialog doesn't always show up if update="dlg" in commandButton
    0 讨论(0)
提交回复
热议问题