how setstate call in alert dialog