Creating master-detail table and dialog, how to reuse same dialog for create and edit

Even if we fix your problem, this construct <p:inputText value=”#{guestList.hasSelected() ? ” : guestList.selectedGuest.name}”> is not ever going to work. It needs to reference a model property, not an empty string. You’d best just reuse the edit form and let the create button precreate an empty entity. This would simplify a lot in the view … Read more

Sharing data between fragments using new architecture component ViewModel

Updated on 6/12/2017, Android Official provide a simple, precise example to example how the ViewModel works on Master-Detail template, you should take a look on it first.Share data between fragments As @CommonWare, @Quang Nguyen methioned, it is not the purpose for Yigit to make the call from master to detail but be better to use … Read more

How to show details of current row from p:dataTable in a p:dialog and update after save

The button should be an ajax button which sets the currently iterated entity in the bean, and then updates the dialog’s content, and finally shows it. The dialog should just reference that entity in the bean and update the list and table on save. It’s very important that dialog is placed outside the main form … Read more