I wanted to know what is the best practice with form elements when implementing a dialog in Primefaces.
In detail, in my implementation i have two approaches for dialogs.
In my pages i have a main form which contains all components (textfields, etc.) . Dialogs are out of the main form. Those dialogs have their own form inside.
In my pages i have a main form which contains all components including dialogs. Of course those dialogs do not have their on form.
Both scenarios work well. I wanted to know if there is any reason to prefer any of those two approaches. Using of course the 1st approach, we can easily reuse those dialogs.