I have a main application, with a custom VBox component,
which then holds a nested Form component.
So three layers deep in total.
Upon form submit, what is the best way to get the data from
the form component(third layer) back up to the main app (first
-create a custom event and pass the textInput fields
- directly reference the Form's textInput fields from main
- create a click event listener in the main app to the VBox,
and somehow access the textInput fields ?
- another method ?
IMHO, number two is out. You probably don't want to
'hard-wire' a direct reference to the form from the main app. 1 and
3 are probably part of the same solution, which is to dispatch a
custom event that is handled either by the main app (if it's a
small application) or a separate manager or controller class that
is listening for such events.
"phil1943" <firstname.lastname@example.org> wrote in
>I have a custom VBox component withing my main app.
Within that custom VBox
> a form component.
> Upon form submit, what is the best way to get the data
from the form
> back up to the main app ?
> -create a custom event
> - directly reference the Form's textInput fields from
> - create a click event listener in the main app, and
somehow access the
> textInput fields ?
> Thanks for any advice.
Look at Q3 in the FAQ, which I just posted for this week.