on 08-17-2017 11:21 PM
Anyone know of a way to add a custom button in the footer of a sap.m.TableSelectDialog object?
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");
}
}));
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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");
}
}));
User | Count |
---|---|
75 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.