Skip to Content
0

Add Custom Footer Button To sap.m.TableSelectDialog

Aug 17, 2017 at 10:21 PM

113

avatar image

Anyone know of a way to add a custom button in the footer of a sap.m.TableSelectDialog object?

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

2 Answers

Craig Gutjahr Aug 18, 2017 at 05:56 PM
0

Answer..

valueTableSelectDialog._oDialog.mAggregations.beginButton.oParent.addButton(new sap.m.Button({
				text: 'New',
				press: function() {
					alert("1");
				}
			}));


valueTableSelectDialog._oDialog.mAggregations.beginButton.oParent.addButton(new sap.m.Button({
				text: 'New2',
				press: function() {
					alert("2");
				}
			}));


Share
10 |10000 characters needed characters left characters exceeded
Sharath M G Aug 18, 2017 at 02:56 AM
0

Try to manually add the buttons to the footer toolbar aggregation.

When I looked into the dialog which opens the toolbar, it provides options to add the toolbar buttons. You need to ensure that agrregation binding for the dialog toolbar is done. Check in the controller to add it through the code.

Refer to the dialog code on how to add buttons to the dialog:

https://sapui5.hana.ondemand.com/explored.html#/sample/sap.m.sample.DialogConfirm/preview

Check how button submit is added to dialog.


Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thanks.. Wasn't exactly what I needed, but it helped me figure out the answer.

valueTableSelectDialog._oDialog.mAggregations.beginButton.oParent.addButton(new sap.m.Button({
				text: 'New',
				press: function() {
					alert("1");
				}
			}));


valueTableSelectDialog._oDialog.mAggregations.beginButton.oParent.addButton(new sap.m.Button({
				text: 'New2',
				press: function() {
					alert("2");
				}
			}));

0

What you did is something similar, though.

You have obtained the handle to the Dialog variable and assigned the button to the aggregations of the dialog.

0