How to Redirect Tab using UI Control Node without timeout

My flow has a template node with this:

<div layout="row" layout-align="space-between">
  <img src={{msg.payload}} alt="floorplan missing" usemap="#workmap" width="300" height="340">
    <map name="workmap">
      <area shape="rect" coords="150,0,300,105" alt="Whitebox 3" href="whitebox3"> 
      <area shape="rect" coords="185,105,300,150" alt="Whitebox 2" href="whitebox2"> 
      <area shape="rect" coords="185,150,300,200" alt="Whitebox 1" href="whitebox1"> 
      <area shape="rect" coords="150,200,490,350" alt="Townhall" href="townhall"> 
      <area shape="rect" coords="0,200,150,350" alt="Stage" href="stage"> 
    </map>
</div>

Then I catch the GET request by an HTTP in node set to GET /ui/stage as example.
I'm able to click the area and it switches the tab but times out after a few seconds.
I tried to add a msg.statusCode:200 but that does not help. How can i prevent my browser to search for the not existing /ui/stage page after changeing the tab?

the ui_control node does not really pass messages through.. there are some it sends to the dashboard and some that it receives. Net is that it doesn't pass through the msg.req and msg.res properties from the original message and so the http response node fails. - You can probably just wire them in parallel and send the message to both the ui_control and http response at the same time.

That brings me to a blank page that has the payload as text.
If I delay the second 'direct' connection it first brings me to the correct tab and then after the delay times out it shows a blank page with payload as text.
Do you have a sample how ui control node should be used to switch tabs?

personally I would do something like


and have just a single endpoint (in this case /change
that expects a get query like ?tab=1 or ?tab=2
to change to tab 1 or 2 etc

But that's hard-coded to the tab n°. Is there no solution for tab names?
I mean that's what the ui controll tells in the info:

Allows dynamic control of the Dashboard.

The default function is to change the currently displayed tab. 
msg.payload should either be an object of the form {"tab":"my_tab_name"}, 
or just be the tab name or numeric index (from 0) of the tab or link to be 
displayed.

well ok use the names then ?tab=Whitebox%201 -- but then you have to handle/decode the spaces (%20) etc...

Have a look in to my first post the href is without white space. I think I do not need to encode with. Or do you think the href has to be in line with the tab name?

What happens is this:
/ui/?tab=whitebox1#!/0?socketid=QF0rfwHp3wnsijNBAABw

This is my current situation:

but also aligned with the tab name it does not work:
changeing area line 4 href="?tab=Stage"


that leads to this url:
/ui/?tab=Stage#!/0?socketid=PCkSQG_8-vnYglprAABx

In fact, it does not change tab. It stays.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.