The implementation until the display of the dialog