4 Replies Latest reply on Aug 9, 2016 1:36 PM by stanislav RSS
    roberttay Apprentice

    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?

      • Re: Mashup to Mashup communication within same Master
        aanjan Heavyweight Champ

        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

        • Re: Mashup to Mashup communication within same Master
          stanislav Explorer

          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.