cancel
Showing results for 
Search instead for 
Did you mean: 

Dyanmic messages in MessageToastshow

Balu483
Participant
0 Kudos

hi ui5 guys,

i am having an Split App master-page contains the Standard List Items.

when i select the one of the item ,then corresponding item details has to show on detail page with message .

for example if i select the product id item at left pane the right side pane should display the corresponding product details in SimpleForm with messageToast.show () as "<so and so product> is Displayed successfully" message .

hear i am wondering how to Display the Dynamic message With MessageToast.show()

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member

Hi Chandu,

In a Master-Detail scenario, we would be using Element binding to display the details of the selected item from master page. So, when a new selection happens in master page, we will change the underlying binding element in the master page & that's when we can add a message toast. Please refer a sample code here

this.getView().bindElement({
	path : sObjectPath,
	events: {
		change : this._onBindingChange.bind(this),
		dataRequested : function () {
			oViewModel.setProperty("/busy", true);
		},
		dataReceived: function () {
			oViewModel.setProperty("/busy", false);
                        MesssageToast.show("<Your Product ID>" has been successfully displayed);
		}
	},
	parameters: {
		expand: 'ToBusinessPartner'
	}
});