Factor Dialog: Avoid populating dialog more than once