I don´t want to redefine the dialog structure, just the object that is displayed in the dialog.
Just imagine another example, a bean that represents a list of cars (other beans), and a dialog that displays car details. The dialog definition does not change, but I want to use the same dialog to show details of different cars.
Look at this show case:
Primefaces dialog ShowCase
Here, they use the property "selectedCar" of the list-bean to identify the bean they want to reference in the dialog. In my case, I don´t use a data table and I don´t have a property "selectedObject" or anything else to identify which object I want to use. In fact, I even want to be able to show multiple dialogs at the same time, but it´s not a must have atm.
Instean of a data table, I have multiple commandLinks or commandButtons, and each one of them should open the same dialog, but display the properties of different "cars". Each commandLink knows, which "car" it wants to display, but how can I pass this info to the dialog? I hope, I described the problem more obvious now...