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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

How to make reusable Home Mashups?

drieder
15-Moonstone

How to make reusable Home Mashups?

Hello everyone,

 

so I have multiple Things of the same Thing Template. Now I would like to assign a Home Mashup to each of these Things. The Mashup should be the same, but the values inside should correspondent to the thing.

 

Now I hoped there would be a simple way to simply create the Mashup once and assign it as a Home Mashup and somehow assign the Thing Name as a Parameter to the Mashup. Any Ideas how to achieve that?

 

I want this because I have a main mashup where a list of all my things is contained. I want to display the Home mashup of every Thing when I click on it in a contained Mashup. For that I use the Thing.getHomeMashup() service.

 

Any help is appreciated very much.

 

Best Regards,

Dominik

1 ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:drieder)

You can create a service with the ThingName as an input parameter and return necessary data through that.

Also ... it used to be possible to pick a Thing and still set it as Dynamic and do GetProperties that way.

You could also do GenericThing Template - i don't remember if it will only give the default values for GetProperties and not the added properties.

Else you could create a 'Base ThingTemplate' before creating the Unique Thing Templates and do it off the Base ThingTemplate

View solution in original post

3 REPLIES 3

Since the Things are inheriting the same Template and they are using the same set of Mashup , you can simply design the page and assign Dynamic service from the Template, and when you change to any Thing under it, it will just grab the data from this entity.

drieder
15-Moonstone
(To:zyuan1)

Hello @zyuan1 ,

 

thank you for your reply. I forgot to mention, that I have multiple things in my list which inherit from different Thing Templates. But some of these things share a Template.

 

I know that you can bind the Thing Name to the dynamic Thing Template but in this case this would not work, because I would need to decide to which Template the Name should be bind during runtime.

 

Regards,

Dominik

PaiChung
22-Sapphire I
(To:drieder)

You can create a service with the ThingName as an input parameter and return necessary data through that.

Also ... it used to be possible to pick a Thing and still set it as Dynamic and do GetProperties that way.

You could also do GenericThing Template - i don't remember if it will only give the default values for GetProperties and not the added properties.

Else you could create a 'Base ThingTemplate' before creating the Unique Thing Templates and do it off the Base ThingTemplate

Top Tags