Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Thingworx Autorefresh Widget

KritikaS
4-Participant

Thingworx Autorefresh Widget

Hello Everyone

I have one TestMashup, in that I am using contained mashup in Tabs widget to call two different mashups, "CheckTest1" and "CheckTest2". In CheckTest1, I am using the Autorefresh widget to call a service after ever 5 seconds and in CheckTest2, I am using the Autorefresh widget to call a service after ever 10 seconds. But, when I view my mashup at runtime having default tab selected as "CheckTest1", The service for "CheckTest2" is also getting executed.
As per my understanding Autorefresh widget should be called only when we click on the tab for CheckTest2.

Can anyone help with this? Please View the attached screen shot.

 

ACCEPTED SOLUTION

Accepted Solutions

Both contained mashups are loaded in the browser and therefore both autorefresh widgets are executed at the same time. It is not so nice but I have no good solution for it.

 

One workaround is to add a parameter to your contained mashups "isSelected" which you bind via an expression on the mashup with the tabs - which evaluates if tab1 isSelected (by checking the value of selectedTab). In the contained mashups you will bind the isSelected to the autoRefresh-widget.

For each tab basically such binding:

nmutter_0-1637707747499.png

And in the contained mashups you do:

nmutter_1-1637707842656.png

Maybe this helps.

 

I also see property "AutoRefreshTabSequence" on the refresh widget but I do not think that it is related to Tabs (at least I could not figure it out)

 

View solution in original post

6 REPLIES 6

Hello Satish,

I am using Thingworx 8.5 version.

Okay.

What exactly you want? You don't want to activate auto refresh if tab2 is not selected?

Yes I wanted that only. Thank you for your response. However the solution given by @nmutter is working fine for me.

Both contained mashups are loaded in the browser and therefore both autorefresh widgets are executed at the same time. It is not so nice but I have no good solution for it.

 

One workaround is to add a parameter to your contained mashups "isSelected" which you bind via an expression on the mashup with the tabs - which evaluates if tab1 isSelected (by checking the value of selectedTab). In the contained mashups you will bind the isSelected to the autoRefresh-widget.

For each tab basically such binding:

nmutter_0-1637707747499.png

And in the contained mashups you do:

nmutter_1-1637707842656.png

Maybe this helps.

 

I also see property "AutoRefreshTabSequence" on the refresh widget but I do not think that it is related to Tabs (at least I could not figure it out)

 

KritikaS
4-Participant
(To:nmutter)

Thank you, It worked for me.

Announcements


Top Tags