cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Mashup to Mashup communication within same Master

rtaylor-3
1-Newbie

Mashup to Mashup communication within same Master

Greetings,

I have a master page layout which contains two panes.

In the left pane i have a grid mashup and in the right pane, i have another grid mashup.

I would like to filter the contents of the grid mashup in the right pane based on a selection
made on the grid mashup in the left pane.

For example, invoke a mashup_B reload on a mashup_A selectedRowsChanged event

Is this possible to do?

4 REPLIES 4

Binding events might get tricky. On a general note, communicating between two Mashups within the same Master (or a Mashup) can be done by using  Mashup Parameters. You would have to create Mashup Parameters on both mashup_A and mashup_b and bind the relevant value to said parameter in each Mashup.

Here's a simple example:

Add a Grid to mashup_A and bind the 'All Data' of GetImplementingThings service based on GenericThing to this Grid. Create a Mashup Parameter called 'name' and bind the 'name' property of 'Selected Rows' of GetImplementingThings to it. Save mashup_A. What we have done now is, we have a grid populated with the Things associated with the GenericThing Template. Each time you select a row, the value in the 'name' column gets stored to the 'name' property we created as a Mashup Parameter.

In mashup_B, add a Grid and bind 'All Data' of a Dynamic GetPropertyValues service based on any Thing to it. Similar to mashup_A, create a Mashup Parameter called 'name' and bind this property to 'EntityName' of your GetPropertyValues service. In order to trigger this, add a button with the clicked event bound to the same GetPropertyValues service.

Now, go to your Master mashup, and from the tiny dropdown menu of your Contained Mashup (mashup_A) drag and drop the 'name' property on to the other Contained Mashup that has mashup_B assigned to it. When you view this Mashup, and you select a row on mashup_A, clicking on the button on mashup_B should populate the grid on mashup_B with that Thing's properties.

Okay, explaining this was not as simple as I thought

Almost....is there anyway to have mashup_B load when the 'name' parameter changes? So you don't have to click the button to refresh mashup_B

Wait...I think this is possible by wiring up a mashup parameter change event such that when the 'name' property value changes on mashup_B, a service could be invoked to reload components of the mashup.

stanislav
6-Contributor
(To:rtaylor-3)

Hi, You can achieve that using sessions. Add a new property to the global user session and it will be visible through all the mashups/pages.

Top Tags