Check here >http://gwri-ic.technion.ac.il/pdf/Professors/Eyal_Zussman/23.pdf
This is a Simple Dialog Demo.