I imagine a lot of people that face this problem might be using Session Parameters, but there is a secret lost Ninja art that allows you to do it with Mashup parameters which is much more contextual and direct.
The key is to have Mashup parameters with the same name.
Starting out I am on my main mashup, you can see the Tree Data in the Grid below
Clicking on the next node now shows the new mashup and the TO field inside. That To value was passed in using a mashup parameter
Clicking the next node, you can see it is actually a different mashup, but I am still passing the TO value
How is it done:
Here is my mashup with the Tree and Contained mashup, you can see the bindings are in place already, but how did I do it, since the Contained Mashup is empty?
First create the new mashups with a mashup parameter named the SAME in this case EntityName
Here is Mashup2 and you can see the Mashup parameter with the same name EntityName bound to one of the Value Displays
Now how do I bind from my main mashup?
What you need to do is to temporarily assign one of the Mashups to the Contained Mashup, here I am showing Mashup1 assigned. This will now allow you to bind not just the Mashup Name, but also bind a value to the Mashup Parameter in that Mashup. Just drag your selected row values onto the contained mashup.
Here you can see the parameter showing as a property, I just dropped my value on the contained mashup and I can bind to Name (name of the mashup to show) and EntityName (the value I want to pass to the mashup parameter)
Now just remove the assigned mashup from the Contained mashup and you’ll note that the bindings stay intact.
Sounds interesting. However, this sounds like a bug in Composer. If a mashup is removed, seems like the bindings should be removed as well.
If that's not the case, then that's fine. I just wanted to make sure if we decided to go down this path, future versions of Composer won't "fix" this behavior leaving us in a bind.
Good point. This can be done with session parameters as well, but I believe this behavior is intentional. But if it goes away, session parameters would be the answer.
Session parameters won't do the trick on complex Mashups / Applications, as ours, please can we investigate further with R&D on this to prevent this behaviour being removed.
This the main mashup a master or a regular mashup? I have a master and im trying to pass data into the contained mashup but I do not see the same options. I was wondering if it because im using a master. THank you
Well, in fact you can use "Parameters" in a Master Mashup, you can build an expression with expression widget which parses location.href in order to detect an act accordingly to parameters , something like: (location.href.indexOf("&myCustomParameter=")>=0?location.href.slice(..):undefined)