SWC-728: moved all Dialog related code into a view