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

What is the best way for autorefresh data in Repeater

sponomarenko-3
2-Guest

What is the best way for autorefresh data in Repeater

Hello, I need to create a list of connected things implemented one ThingTemplate with two text properties and one button, which switches my remote thing on/off.

I discovered that could not place a button inside the table and the this task I could only use a Repeater widget.

I called QueryImplementedThingsWithData service from my ThingTemplate and mapped the result to the Repeater.

Also I've created a mashup for the thing with two text fields for displaying properties and one button  to set value for the third property.

Inside Repeater I pointed this small Mashup as a mashup for each element in the repeater and passed the Thing name as a parameter.

Everything work fine.

But!

I want to add an AutoRefresh widget to autorefresh the states of things and disable buttons for disconnected thing.

And I've binded Refresh event to the same QueryImplementedThingsWithData.

When I do that and AutoRefresh triggers I loose all property values from all rows of the repeater widget.

What's wrong?

I understand that I can place AutoRefresh on the small mashup for each thing, but when I have the list of 200-300 things, I will have 200-300 timers on the page.

It there any solution to pass the events deeper to the components tree? I don't want the timer for each line of the repeater.


Thanks in advance!

0 REPLIES 0
Top Tags