Validated event should be called twice: once when the sheet is opened, and once when the selection is made (provided you really only make one selection and not several in step 7). If the calculation behind the object is slow and the steps happen quickly (like programatically) the initial getLayout might get aborted and there will be only one Validated event.
If you want to avoid this you should make selections first and show the object after that. This is a common (and recomended) technique in mashups, where you want to have an initial selection when you display an object, used for example in single.
ok this makes sense that the validated event is fired when the sheet is opened and a selection is done.
What confuses me is when I switch for example 3 times between sheet 1 <-> sheet2 (step 5 and 6) and then go back to sheet 1 and make ONE selection the validated event gets fired 3 times ( in general the number of switching between the sheets + 1).
As far as I understand should the validated event be fired only 2 times (sheet opened + data ready).
This is realy bad for large computations inside $scope.component.model.Validated.bind.
I don’t really use this pattern, but it might be that your callback gets bound multiple times, once every time you go to the sheet. You probably need to unbind when the extension is destroyed. Or you could use paint.