Base Class for manipulating and receiving changes of hash segment.
Fires a hashChanged
event if the relevant hash changes.
Event | Description |
---|---|
hashChanged |
The 'hashChanged' event is fired when the relevant hash segment is changed |
hashReplaced |
The 'hashReplaced' event is fired when sap.ui.core.routing.HashChangerBase#replaceHash is called |
The 'hashChanged' event is fired when the relevant hash segment is changed
Param | Type | Description |
---|---|---|
oEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
oldHash | string |
The hash segment before it's changed |
newHash | object |
The new hash segment |
fullHash | string |
The full format of the hash if the newHash only contains part of the relevant hash |
The 'hashReplaced' event is fired when sap.ui.core.routing.HashChangerBase#replaceHash is called
Param | Type | Description |
---|---|---|
oEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
hash | string |
The relevant hash segment |
Method | Description |
---|---|
sap.ui.core.routing.HashChangerBase.extend |
Creates a new subclass of class sap.ui.core.routing.HashChangerBase with name
|
sap.ui.core.routing.HashChangerBase.getMetadata |
Returns a metadata object for class sap.ui.core.routing.HashChangerBase. |
replaceHash |
Replaces the hash with a certain value. When using the replace function, no browser history entry is written. If you want to have an entry in the browser history, please use the #setHash function. The |
setHash |
Sets the hash to a certain value. When using this function, a browser history entry is written. If you do not want to have an entry in the browser history, please use the #replaceHash function. |
Creates a new subclass of class sap.ui.core.routing.HashChangerBase 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.base.EventProvider.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Returns a metadata object for class sap.ui.core.routing.HashChangerBase.
Replaces the hash with a certain value. When using the replace function, no browser history entry is written. If you want to have an entry in the browser history, please use the #setHash function.
The sDirection
parameter can be used to provide direction information on the navigation which leads to this hash replacement. This is typically used when synchronizing the hashes between multiple frames to provide information to the frame where the hash is replaced with the navigation direction in the other frame where the navigation occurs.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHash | string |
New hash |
|
sDirection | sap.ui.core.routing.HistoryDirection |
The direction information for this hash replacement |
Sets the hash to a certain value. When using this function, a browser history entry is written. If you do not want to have an entry in the browser history, please use the #replaceHash function.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHash | string |
New hash |