Skip to Content
0

if form not null -> Next To the Tab

Dec 15, 2017 at 01:53 PM

35

avatar image
Former Member
If the form is full, we have to move to the next tab when we press the next button. how do i do it.




<mvc:View controllerName="StepTab.controller.Main" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc" displayBlock="true"
	xmlns="sap.m">
	<App>
		<pages>
			<Page title="{i18n>title}">
				<content>
					<IconTabBar id="iconTabBar" class="sapUiResponsiveContentPadding" binding="{Resume}">
						<items>
							<IconTabFilter id="tab1" text="Tab 1" key="one" icon="sap-icon://hint" iconColor="Critical">
								<Input id="name" liveChange="onInputChange" value="{name}"/>
								<Button id="nextButton1" press="nextButton1Press" icon="sap-icon://media-forward" text="Next" type="Accept"/>
							</IconTabFilter>
							<IconTabSeparator icon="sap-icon://process"/>
							<IconTabFilter id="tab2" text="Tab 2" key="two" enabled="false" icon="sap-icon://hint" iconColor="Neutral">
								<Input id="year" liveChange="onInputChange" value="{year}"/>
								<Button id="nextButton2" press="nextButton2Press" icon="sap-icon://media-forward" text="Next" type="Accept"/>
							</IconTabFilter>
							<IconTabSeparator icon="sap-icon://process"/>
							<IconTabFilter id="tab3" text="Tab 3" key="three" enabled="false" icon="sap-icon://hint" iconColor="Positive">
								<Input id="age" liveChange="onInputChange" value="{age}"/>
								<Button id="nextButton3" press="nextButton3Press" icon="sap-icon://media-forward" text="Next" type="Accept"/>
							</IconTabFilter>
							<IconTabSeparator icon="sap-icon://process"/>
							<IconTabFilter id="tab4" text="Tab 4" key="four" enabled="false" icon="sap-icon://hint" iconColor="Negative">
								<Input id="city" liveChange="onInputChange" value="{city}"/>
								<Button id="nextButton4" press="nextButton4Press" icon="sap-icon://media-forward" text="Next" type="Accept"/>
								<Button id="save" press="SavePress" icon="sap-icon://save" text="Save" type="Accept"/>
							</IconTabFilter>
						</items>
					</IconTabBar>
				</content>
			</Page>
		</pages>
	</App>
</mvc:View>
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ivan Mirisola
Dec 21, 2017 at 07:16 PM
0

Hi Fatih,

Why don't you use the Wizard component to provide clear user guidance on filling the form?
The provided link contains a list of samples that you could examine the source code or even download the whole sample to adapt it to your needs.

IconTabBar and IconTabFilter are used primarily to establish a predefined set of filters that will then be passed on to a table below. Check the sample for it here. They I understood you is that you want users to fill out a form and then move on to the next piece of your application to continue filling the form. In such case I wouldn't recommend you to use this component.

Regards,
Ivan

Share
10 |10000 characters needed characters left characters exceeded