Skip to main content
15-Moonstone
July 1, 2020
Solved

Mashup Reload

  • July 1, 2020
  • 1 reply
  • 6984 views

How do I reload mashup in runtime on session changed or service invoke completed event?

 

Tried location.reload(); in service.But it's not working.Please provide a way to achieve this.

Best answer by VladimirRosu_116627

I'm not clear how can you navigate to another page before logging in (since you said you navigated to a different page on a new tab, and after that you login in the home page).

 

Regardless, coming back to your first question, services are always executed server side, which means they don't have a page context (they can not act directly on the page, only via their result which is bounded to widgets).

As such, location.reload() written in a service, will never work.

The answer to your question is present in the articles below (as a quick hint, if you have access to the support portal, there are tons of articles there that can help you much faster in many cases; make sure you also search there)

https://www.ptc.com/en/support/article/CS240759

https://www.ptc.com/en/support/article/CS287379

 

1 reply

19-Tanzanite
July 1, 2020

Hi @krishnakomal123 

 

Please explain the scenario you are trying to do with location.reload()

It is a method used at a low level in the HTML page methods which works exactly as the F5 (refresh) button and triggers a full reload of the page (which can be pretty slow).

There are other ways to refresh widgets to their default values - like the Mashup's ResetInputToDefaultValue. Would that work in your case?

 

 

15-Moonstone
July 1, 2020

I have clicked on a button and navigated to different page on a new tab from home page

 

After that I login in home page,session value changes.But login status is changing only on home page.

In the navigated page it's reflecting only after reload of navigated page.i have given same session change trigger in both cases and using same session parameter

19-Tanzanite
July 1, 2020

I'm not clear how can you navigate to another page before logging in (since you said you navigated to a different page on a new tab, and after that you login in the home page).

 

Regardless, coming back to your first question, services are always executed server side, which means they don't have a page context (they can not act directly on the page, only via their result which is bounded to widgets).

As such, location.reload() written in a service, will never work.

The answer to your question is present in the articles below (as a quick hint, if you have access to the support portal, there are tons of articles there that can help you much faster in many cases; make sure you also search there)

https://www.ptc.com/en/support/article/CS240759

https://www.ptc.com/en/support/article/CS287379