Pavel, thanks! My point is to handle this on modal level: this should be completely transparent for the form itself.
On Fri, Apr 15, 2016 at 2:33 PM, Pavel Chernyak <fjfal...@fjfalcon.ru> wrote: > Ilya, greetings. > > As for submit button i search inside modal body for form component or > specify form name in modal component. > So, after clicking button form submits. > Onsuccess i invoke hideModal function(via hidemodal event). > OnFailure i do nothing except updating formzone to show messages/errors > e.t.c. > If you want i can send you some examples. > > > On 15 April 2016 at 14:27, Ilya Obshadko <ilya.obsha...@gmail.com> wrote: > > > Barry, thanks for your suggestion - I think this is what I need. > > > > Do you mean an implementation of ComponentClassTransformWorker2? > > > > On Fri, Apr 15, 2016 at 2:12 PM, Barry Books <trs...@gmail.com> wrote: > > > > > 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 > > > > > > > > > > > > > > > -- > > Ilya Obshadko > > > > > > -- > С уважением, > Черняк Павел Александрович > -- Ilya Obshadko