Wrapped the itemDialog in a service to factor out repeated code