set dialog reference on listener