cancel
Showing results for 
Search instead for 
Did you mean: 

Add Custom Footer Button To sap.m.TableSelectDialog

former_member725
Participant

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

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member725
Participant
0 Kudos

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");
				}
			}));


Sharathmg
Active Contributor
0 Kudos

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.

former_member725
Participant
0 Kudos

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");
				}
			}));

Sharathmg
Active Contributor
0 Kudos

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.