Hi Fabiano - good to hear from you.
When you use the view container, you can hook parameters up to it just like you would if the visualization was sitting right on the dashboard. The problem is, if you are going to change the target of the view parameter than you are going to have to programmatically hook up parameters to the new objects as the view container content changes. It’s certainly possible to do this but you’re going to have to be happy scripting and maintaining the code. Ask yourself if you really need things to be this dynamic as you can save a bit of time with some hard-coded layers.
Here is a quick sample that will show you how to hook up an existing parameter if you want to go this direction.
var linkParent = new dundas.view.ElementParameterLink();
linkParent.adapterId = myAdapterId;
linkParent.parameterId = newViewParameter.id;
The debugger; command is going to be your friend here as you can inspect what these properties look like when you set them with the UI. Just replicate what the Dundas BI application is doing to bind these parameters and you should be good.