I'm not exactly sure I understand the requirements but I think you could do this with a mixin on the form. At the very least this would allow communication with the form mixin and the modal via the Environment service. The modal could put something in the environment and the mixin could add some status. No status means no form. The mixin could be applied to all forms via a worker.
On Friday, April 15, 2016, Ilya Obshadko <xf...@xfyre.com> wrote: > Is there any way to search for specific component down the component > hierarchy? > > Consider the following use case: > > - I have a component responsible for rendering Bootstrap modal > - this modal may (or may not) contain a form > - if modal contains a form and submission is successful, the modal should > be automatically dismissed > - it modal contains a form and submission is unsuccessful, the modal should > not close (regardless of client validation being on/off) > > I've been looking around ComponentSource/ComponentResources classes, but > couldn't find anything relevant yet. > > Environment service can't help either, because modal is a form's parent and > at the time of modal rendering FormSupport is not yet available. > > -- > Ilya Obshadko >