Skip to Content
0

Dyanmic messages in MessageToastshow

Feb 18, 2017 at 10:13 AM

68

avatar image
Former Member

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()

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Feb 18, 2017 at 03:06 PM
1

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'
	}
});
Share
10 |10000 characters needed characters left characters exceeded