Pass params from view to embedded views inside a popup

Good afternoon,

I have a view with a button, when I click it I open a popup that is a Breakpoint Container.
In this Breakpoint Container I have 2 Embedded Views to manage small and large size.

The Embedded Views are linked each to a flex container where the objects inside (tables and charts) read data from the view params (this is what I would like to do).

I would like to know what is the better way to manage this, because I tried to pass params from the script when I open the popup but they are "connected" to the Breakpoint Container popup, I need to move them again to the Embedded View.

Have you tried just using property bindings?

Am I missing a so simple solution? Because actually I try to bind for example the table but I cannot get access to the popup params.

You mean:

  1. click the button and script the open popup action passing the params to the popup

  2. Now if I open the flex container (the 2 where the embedded view are linked) how can I bind the popup params?

No, in the breakpoint container, where you've placed embedded view components, bind the parameters there (on the embedded view components) to the outer view's parameters. You may need to "synchronize" the embedded view component's display of parameters to the inner view's defined parameters.

The embedded view components need to deliberately pass desired information to the parameters of the view they hold.

Forgive me if I ask again, but I'm not sure to move in the right direction.

When I click the button I open the popup (that is my breakpoint container) and I pass the params to this container.

At this point in the breakpoint container I have the params just passed with the script.

I've created the params in the embedded view and bind them to the same breakpoint container params. So now I have this params available in the flex container views?

Is this flow correct?

Yes, but possibly not complete. If your flex containers have more embedded views, then you must bind there to continue passing values "inward".

Yes you're right, thank for the explanation now I understand.

I'm wondering this, i used the embedded view because I read that is a correct way to work, but if a just create the view inside the breakpoint containers I avoid to pass the params one more time, so the question is, is really needed to use the embedded view in this cases? (maybe for better performance or what else..)

It's a trade-off. Less embedding should perform better. But not using embedded views for common UI parts makes design and maintenance more difficult. You have to figure out the boundaries appropriate for your situation (and hardware capabilities).

1 Like

Very clear, thank you very much for your time.

Have a nice day