Dont open dialog if not defined. Add widget command immediatelly.