Class sap.m.WizardStepModule: sap/m/WizardStep

extends Control

A container control used to aggregate user input controls as part of an sap.m.Wizard.

Overview

WizardStep gives the developer the ability to validate, invalidate the step and define subsequent steps. The WizardStep control control is supposed to be used only as an aggregation of the Wizard control, and should not be used as a standalone one.

Structure

  • Each wizard step has a title. Additionally it can have an icon.
  • Each wizard step can be validated by setting the validated property. This action will trigger the rendering of the Next step button.
  • If the execution needs to branch after a given step, you should set all possible next steps in the subsequentSteps aggregation.


    Since: 1.30.
Constructor Summary
new sap.m.WizardStep(sId?, mSettings?)Constructor for a new WizardStep.
Event Summary
activate(oControlEvent)This event is fired on next step activation from the Wizard.
complete(oControlEvent)This event is fired after the user presses the Next button in the Wizard, or on nextStep method call from the app developer.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.WizardStep.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.WizardStep with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.WizardStep.getMetadata()Returns a metadata object for class sap.m.WizardStep.
addContent(oContent)Adds some content to the aggregation content.
addSubsequentStep(vSubsequentStep)Adds some subsequentStep into the association subsequentSteps.
attachActivate(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the activate event of this sap.m.WizardStep.
attachComplete(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the complete event of this sap.m.WizardStep.
destroyContent()Destroys all the content in the aggregation content.
detachActivate(fnFunction, oListener)Detaches event handler fnFunction from the activate event of this sap.m.WizardStep.
detachComplete(fnFunction, oListener)Detaches event handler fnFunction from the complete event of this sap.m.WizardStep.
fireActivate(mParameters?)Fires event activate to attached listeners.
fireComplete(mParameters?)Fires event complete to attached listeners.
getContent()Gets content of aggregation content.
getIcon()Gets current value of property icon.
getNextStep()ID of the element which is the current target of the association nextStep, or null.
getSubsequentSteps()Returns array of IDs of the elements which are the current targets of the association subsequentSteps.
getTitle()Gets current value of property title.
getValidated()Gets current value of property validated.
indexOfContent(oContent)Checks for the provided sap.ui.core.Control in the aggregation content.
insertContent(oContent, iIndex)Inserts a content into the aggregation content.
removeAllContent()Removes all the controls from the aggregation content.
removeAllSubsequentSteps()Removes all the controls in the association named subsequentSteps.
removeContent(vContent)Removes a content from the aggregation content.
removeSubsequentStep(vSubsequentStep)Removes an subsequentStep from the association named subsequentSteps.
setIcon(sIcon)Sets a new value for property icon.
setNextStep(oNextStep)Sets the associated nextStep.
setTitle(sTitle)Sets a new value for property title.
setValidated(bValidated)Sets a new value for property validated.
Constructor Detail
new sap.m.WizardStep(sId?, mSettings?)

Constructor for a new WizardStep.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

The supported settings are:

  • Properties

    • title : string (default: )
    • icon : sap.ui.core.URI (default: )
    • validated : boolean (default: true)

  • Aggregations

    • content : sap.ui.core.Control[] (default)

  • Associations

  • Events

    • complete : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • activate : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
stringsId?ID for the new control, generated automatically if no ID is given
objectmSettings?Initial settings for the new control
Event Detail
activate(oControlEvent)
This event is fired on next step activation from the Wizard.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
complete(oControlEvent)
This event is fired after the user presses the Next button in the Wizard, or on nextStep method call from the app developer.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
Method Detail
sap.m.WizardStep.extend(sClassName, oClassInfo?, FNMetaImpl?): function

Creates a new subclass of class sap.m.WizardStep with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.core.Control.extend.

Parameters:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.m.WizardStep.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.WizardStep.
Returns:
sap.ui.base.MetadataMetadata object describing this class
addContent(oContent): sap.m.WizardStep
Adds some content to the aggregation content.
Parameters:
sap.ui.core.ControloContentthe content to add; if empty, nothing is inserted
Returns:
sap.m.WizardStepReference to this in order to allow method chaining
addSubsequentStep(vSubsequentStep): sap.m.WizardStep
Adds some subsequentStep into the association subsequentSteps.
Parameters:
sap.ui.core.ID|sap.m.WizardStepvSubsequentStepthe subsequentSteps to add; if empty, nothing is inserted
Returns:
sap.m.WizardStepReference to this in order to allow method chaining
attachActivate(oData?, fnFunction, oListener?): sap.m.WizardStep

Attaches event handler fnFunction to the activate event of this sap.m.WizardStep.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.WizardStep itself.

This event is fired on next step activation from the Wizard.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.WizardStep itself
Returns:
sap.m.WizardStepReference to this in order to allow method chaining
attachComplete(oData?, fnFunction, oListener?): sap.m.WizardStep

Attaches event handler fnFunction to the complete event of this sap.m.WizardStep.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.WizardStep itself.

This event is fired after the user presses the Next button in the Wizard, or on nextStep method call from the app developer.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.WizardStep itself
Returns:
sap.m.WizardStepReference to this in order to allow method chaining
destroyContent(): sap.m.WizardStep
Destroys all the content in the aggregation content.
Returns:
sap.m.WizardStepReference to this in order to allow method chaining
detachActivate(fnFunction, oListener): sap.m.WizardStep

Detaches event handler fnFunction from the activate event of this sap.m.WizardStep.

The passed function and listener object must match the ones used for event registration.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.WizardStepReference to this in order to allow method chaining
detachComplete(fnFunction, oListener): sap.m.WizardStep

Detaches event handler fnFunction from the complete event of this sap.m.WizardStep.

The passed function and listener object must match the ones used for event registration.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.WizardStepReference to this in order to allow method chaining
fireActivate(mParameters?): sap.m.WizardStep
Fires event activate to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.m.WizardStepReference to this in order to allow method chaining
fireComplete(mParameters?): sap.m.WizardStep
Fires event complete to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.m.WizardStepReference to this in order to allow method chaining
getContent(): sap.ui.core.Control[]

Gets content of aggregation content.

The content of the Wizard Step.

Returns:
sap.ui.core.Control[]
getIcon(): sap.ui.core.URI

Gets current value of property icon.

Determines the icon that is displayed for this step. The icon is visualized in the progress navigation part of the Wizard control. Note: In order for the icon to be displayed, each step in the Wizard should have this property defined, otherwise the default numbering will be displayed.

Default value is .

Returns:
sap.ui.core.URIValue of property icon
getNextStep(): sap.ui.core.ID
ID of the element which is the current target of the association nextStep, or null.
Returns:
sap.ui.core.ID
getSubsequentSteps(): sap.ui.core.ID[]
Returns array of IDs of the elements which are the current targets of the association subsequentSteps.
Returns:
sap.ui.core.ID[]
getTitle(): string

Gets current value of property title.

Determines the title of the step. The title is visualized in the Wizard control.

Default value is .

Returns:
stringValue of property title
getValidated(): boolean

Gets current value of property validated.

Indicates whether or not the step is validated. When a step is validated a Next button is visualized in the Wizard control.

Default value is true.

Returns:
booleanValue of property validated
indexOfContent(oContent): int
Checks for the provided sap.ui.core.Control in the aggregation content. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.core.ControloContentThe content whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
insertContent(oContent, iIndex): sap.m.WizardStep
Inserts a content into the aggregation content.
Parameters:
sap.ui.core.ControloContentthe content to insert; if empty, nothing is inserted
intiIndexthe 0-based index the content should be inserted at; for a negative value of iIndex, the content is inserted at position 0; for a value greater than the current size of the aggregation, the content is inserted at the last position
Returns:
sap.m.WizardStepReference to this in order to allow method chaining
removeAllContent(): sap.ui.core.Control[]

Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.core.Control[]An array of the removed elements (might be empty)
removeAllSubsequentSteps(): sap.ui.core.ID[]
Removes all the controls in the association named subsequentSteps.
Returns:
sap.ui.core.ID[]An array of the removed elements (might be empty)
removeContent(vContent): sap.ui.core.Control
Removes a content from the aggregation content.
Parameters:
int|string|sap.ui.core.ControlvContentThe content to remove or its index or id
Returns:
sap.ui.core.ControlThe removed content or null
removeSubsequentStep(vSubsequentStep): sap.ui.core.ID
Removes an subsequentStep from the association named subsequentSteps.
Parameters:
int|sap.ui.core.ID|sap.m.WizardStepvSubsequentStepThe subsequentStep to be removed or its index or ID
Returns:
sap.ui.core.IDThe removed subsequentStep or null
setIcon(sIcon): sap.m.WizardStep

Sets a new value for property icon.

Determines the icon that is displayed for this step. The icon is visualized in the progress navigation part of the Wizard control. Note: In order for the icon to be displayed, each step in the Wizard should have this property defined, otherwise the default numbering will be displayed.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is .

Parameters:
sap.ui.core.URIsIconNew value for property icon
Returns:
sap.m.WizardStepReference to this in order to allow method chaining
setNextStep(oNextStep): sap.m.WizardStep
Sets the associated nextStep.
Parameters:
sap.ui.core.ID|sap.m.WizardStepoNextStepID of an element which becomes the new target of this nextStep association; alternatively, an element instance may be given
Returns:
sap.m.WizardStepReference to this in order to allow method chaining
setTitle(sTitle): sap.m.WizardStep

Sets a new value for property title.

Determines the title of the step. The title is visualized in the Wizard control.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is .

Parameters:
stringsTitleNew value for property title
Returns:
sap.m.WizardStepReference to this in order to allow method chaining
setValidated(bValidated): sap.m.WizardStep

Sets a new value for property validated.

Indicates whether or not the step is validated. When a step is validated a Next button is visualized in the Wizard control.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Parameters:
booleanbValidatedNew value for property validated
Returns:
sap.m.WizardStepReference to this in order to allow method chaining