cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 navigation tab

ngcebo
Explorer
0 Kudos
633

How can I make the next button navigate onClick to the next tab "eg from Firm Details to Firm address".

i want to make it navigate to another tab when user clicks next button

Accepted Solutions (0)

Answers (3)

Answers (3)

Hello,

For your need, another option is available you can use the wizard and make some changes it will work. I have also used the wizard instead of the icon tab bar and my application is working fine.

How can I make the next button click on the next tab and navigate to "eg from firm details to firm address"? For this, you can use the following code which I have used in the wizard for the next tab.

onNextStep: function() {

this._wizard.nextStep();

},

Dhanasupriya
Active Participant
0 Kudos

Hello

Below is the code I have written in View and controller. Hope this helps.

View:

<mvc:View controllerName="comZIconTabBar.controller.View1" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc"
	displayBlock="true" xmlns="sap.m">
	<IconTabBar id="idIconTabBar" select=".onFilterSelect" class="sapUiResponsiveContentPadding">
		<items>
			<IconTabFilter text="IconTabFilter1" key="IconTabFilter1">
				<Button text="Next" press="onNextClick"/>
			</IconTabFilter>
			<IconTabFilter text="IconTabFilter2" key="IconTabFilter2"/>
			<IconTabFilter text="IconTabFilter3" key="IconTabFilter3"/>
		</items>
	</IconTabBar>
</mvc:View>

Controller:

sap.ui.define([
	"sap/ui/core/mvc/Controller"
], function(Controller) {
	"use strict";

	return Controller.extend("comZIconTabBar.controller.View1", {

		onNextClick: function() {
			this.getView().byId("idIconTabBar").setSelectedKey("IconTabFilter2");
		}

	});
});
ngcebo
Explorer
0 Kudos

is it possible to disable navigating to the next tab by a mouse click "on the tab name" so that the user can only use the "next" button to go to next tab as by the code you have given

WouterLemaire
SAP Mentor
SAP Mentor
0 Kudos

try changing the selected tab of the icontabbar using this function:

ngcebo
Explorer
0 Kudos

Which function.?