Skip to main content
1-Visitor
October 11, 2016
Question

Navigate to another link programmatically

Hi Team,

I know we can navigate to another mashup through link widget in mashup. I would like to know whether it is possible to navigate to another mashup programmatically.

I also could not find a way to invoke the link using code. Please let me know your inputs.

9 replies

1-Visitor
October 11, 2016

You should use Navigate Widget instead of Link Widget.

Translate
1-Visitor
October 11, 2016

Thanks. But Please elaborate with steps if possible to redirect the user another link in the same window using navigation widget.

Translate
1-Visitor
October 11, 2016

Also, will it possible to click the button programmatically.?

Translate
1-Visitor
October 11, 2016

Yes Navigation widget has a "Navigate" trigger.

Translate
1-Visitor
October 11, 2016

Please, put navigation widget on you mashup and you will see:

  • TargetWindow
    • New
    • Replace --> Same window
    • PopUp
    • Modal PopUp
    • Full Screen
Translate
1-Visitor
October 11, 2016

How can i call this navigate trigger from thingworx code?

Translate
1-Visitor
October 11, 2016

For ThingWorx code you mean Server Side? if that's the case you "can't" (that's not 100% true) trigger a Browser action from Server Side.

You usually trigger Navigation due to a user action, if you want to do timed Navigation you can use the Refresh Widget which asks to the server if it has to navigate or no every n-seconds. If you really need to Push from the server, you may use new websocket feature on 7.2 in order to receive a Push Property update and act accordingly.

Translate
1-Visitor
October 12, 2016

Thanks Carles Coll. Here is the situation, we are facing now,

I have an organisation group. I add only the users who have permission on required entities. Somehow  if a normal user is added to the organisation by mistake, he would be able to login through and see the home mashup. but user can only may see red warning symbols due to unable to access entities with out permissions. So to avoid this,i want to show a pop up message and log him out if he is a normal user once he logged in.

the question is how to log out the user once he logged in after  checking if he is normal user?

Translate
1-Visitor
October 13, 2016

Hi, the logout button ( http://marketplace.thingworx.com/Items/logout-button ) it's not bindable , then you can't force trigger it, but on the PopUp you show when the user it's "incorrect" you can put the Logout Button and allow the user only to tap it.

But if you are on a newer version ( 7.x ) , there's a logout button on standard widgets, and you can trigger this one --> Then you can force logout automatically.

Translate