Thanks snpe. NOw I see what you are saying. But I think there should be support for formDirty in composite dialog page context. I don't think my requirements are somewhat special.
But I don't get a response Keith or Ollie then I will try to cook up something along the lines of your code.