232
Views
11
Comments
Opening a tab through client action in Reactive App
Question

Hello,

I'm using the Navigation\Tabs in a Outsystems 11 UI Reactive App.  Only the StartingTab propoerty is available, but not the ActiveApp.  How can I change to a specific tab using client actions after the page is loaded?  I set the StartingTab to a local variable and change that variable in my client action but it does not work.

Thanks

mvp_badge
MVP
Rank: #71

Hi Tony Lee,

I think the solution of the following post might help you. I haven't tried it myself.

It's for Mobile but should work the same way for Reactive Web:

https://www.outsystems.com/forums/discussion/45022/navigation-tabs/

So in the OnTabsChange event you should be able to change the value of the ActiveTab.

Regards,

Nordin

mvp_badge
MVP
Rank: #71

Hi Tony,

If you add an OnTabChange Event Handler for your Tabs widget, the platform will add an ActiveTab input parameter to it.

Regards,

Nordin

mvp_badge
MVP
Rank: #71

Hi Tony,

I see what you're saying now. Again, I haven't used the Tabs widget before in Mobile or Reactive Web.

I'll try it out later on and get back to you if no one else does.

Regards,

Nordin

mvp_badge
MVP
Rank: #71

Hi Tony,

One more question. Do you navigate away to another screen and when navigating back you want to now what Tab you were on before you left? 

Because if not, I don't understand why you would want to change the ActiveTab programmatically while staying on the same screen. You can simple click on another Tab in your App to change it.

Regards,

Nordin

TabsReactDemo.oml

mvp_badge
MVP
Rank: #71

Hi Tony,

Thanks for clarifying that :).

For this particular scenario, I think it would be better to use a Wizard with 2 WizardItems. I'm not sure if this is possible with the Tabs widget. I'll have some time later on to do some tests.

Nordin

Rank: #58965

I am also facing the same challenge here. I also do not want to use wizard cause it does not fit my need. So ay update on this. Can we do the same using javascript. ?

Rank: #1755

Hi Tony,

Setting StartingTab being in current screen doesn't reset tabs, so you need to reload the page with new Tab's index as screen Input parameter.

BR,

Suresh