
Data Table control in MDK Page Editor
Editable Data Table example in MDK Mobile clients
let currentEditMode = context.getControl('SectionedTable0').getSection('SectionDataTable0').getEditMode();
context.getControl('SectionedTable0').getSection('SectionDataTable0').setEditMode('Inline');
let changedObjects = context.getControl('SectionedTable0').getSection('SectionDataTable0').getChanges();
let message = JSON.stringify(changedObjects);
let cell = context.getControl('SectionedTable0').getSection('SectionDataTable0').getCell(0, 0);
alert(cell.getValue());
context.getControl('SectionedTable0').getSection('SectionDataTable0').reset();
context.getControl('SectionedTable0').getSection('SectionDataTable0').getCell(0, 0).getParent();
context.getControl('SectionedTable0').getSection('SectionDataTable0').getCell(0, 0).getColumnIndex();
context.getControl('SectionedTable0').getSection('SectionDataTable0').getCell(0, 0).getRowIndex();
context.getControl('SectionedTable0').getSection('SectionDataTable0').getCell(0, 0).getValue();
let currentCell = context.getControl('SectionedTable0').getSection('SectionDataTable0').getCell(0, 0);
const newValue = "My Product";
currentCell.setValue(newValue);
context.getControl('SectionedTable0').getSection('SectionDataTable0').getCell(0, 1).getCaption();
let currentCell = context.getControl('SectionedTable0').getSection('SectionDataTable0').getCell(0, 1);
let caption = "New Caption";
currentCell.setCaption(caption);
let currentCell = context.getControl('SectionedTable0').getSection('SectionDataTable0').getCell(0, 1);
const targetSpecifier = currentCell.getTargetSpecifier();
let message = 'ReturnValue = ' + targetSpecifier.getReturnValue() + '\n' +
'DisplayValue = ' + targetSpecifier.getDisplayValue() + '\n' +
'Service = ' + targetSpecifier.getService() + '\n' +
'EntitySet = ' + targetSpecifier.getEntitySet() + '\n' +
'QueryOptions = ' + targetSpecifier.getQueryOptions();
alert(message);
let currentCell = context.getControl('SectionedTable0').getSection('SectionDataTable0').getCell(0, 1);
const targetSpecifier = currentCell.getTargetSpecifier().setQueryOptions("$top=5");
currentCell.setTargetSpecifier(targetSpecifier);
"TabStripType": "Segmented"
Segmented Tabs example in iOS client
Contact Table with and without Separator lines in MDK Mobile clients
Contact Table with and without Separator lines in MDK Web app
"Sections": [{
....
....
"Separators": {
"TopSectionSeparator": false,
"BottomSectionSeparator": false,
"HeaderSeparator": false,
"FooterSeparator": false,
"ControlSeparator": false
},
"_Type": "Section.Type.ContactCell",
.....
.....
],
Form Cell controls in Sectioned Table with and without Separator lines in MDK Mobile clients
Form Cell controls in Sectioned Table with and without Separator lines in MDK Web app
"Controls": [{
"_Type": "Control.Type.SectionedTable",
"_Name": "SectionedTable",
"Sections": [{
"Separators": {
"TopSectionSeparator": false,
"BottomSectionSeparator": false,
"HeaderSeparator": true,
"FooterSeparator": false,
"ControlSeparator": false
},
"Controls": [{
"Value": "{Street}",
"_Type": "Control.Type.FormCell.SimpleProperty",
"_Name": "Street",
"Caption": "Street",
"Separator": true
},
],
"_Type": "Section.Type.FormCell",
"_Name": "SectionFormCell1"
}]
}],
Section Header enhancements in MDK mobile clients
Section Header enhancements in MDK Web app
"Header": {
"_Name": "SectionHeader4",
"AccessoryType": "none",
"UseTopPadding": true,
"OnPress": {
"Name": "/MDK2304/Actions/Misc/GenericMessageBox.action",
"Properties": {
"Message": "Message from Header Bar"
}
},
"Caption": "Test caption",
"Items": [{
"_Type": "SectionHeaderItem.Type.Label",
"_Name": "label2",
"Position": "Left",
"Title": "Label 2"
},
{
"_Name": "button2",
"Title": "Button 2",
"Position": "Right",
"_Type": "SectionHeaderItem.Type.Button",
"OnPress": {
"Name": "/MDK2304/Actions/Misc/GenericMessageBox.action",
"Properties": {
"Message": "Message from button2"
}
}
},
{
"_Name": "buttonextra",
"Title": "Button Extra",
"Position": "Right",
"_Type": "SectionHeaderItem.Type.Button",
"OnPress": {
"Name": "/MDK2304/Actions/Misc/GenericMessageBox.action",
"Properties": {
"Message": "Message from button"
}
}
}
]
},
Section Header and Footer styling in MDK mobile clients
Section Header and Footer styling in MDK Web app
const MENU_NAME = 'WorkOrders';
export default function ResetWorkOrdersMenu(context) {
//Get the global side drawer control proxy
var sideDrawerControlProxy = context.getPageProxy().getGlobalSideDrawerControlProxy();
//get a single SideDrawerMenuItemProxy instance of the menu item
var menuItem = sideDrawerControlProxy.getMenuItem(MENU_NAME);
if (menuItem == null) {
alert(`Can not find menu [${MENU_NAME}]`);
} else {
menuItem.reset().then((currentPageProxy) => {
console.log("current page proxy is " + currentPageProxy);
var currentPageCaption = currentPageProxy.getCaption();
console.log("Current page caption is " + currentPageCaption);
// alert(`Reset menu [${MENU_NAME}] success, the current page caption is [${currentPageCaption}]`);
}).catch(() => {
alert(`Reset menu [${MENU_NAME}] fail`);
});
}
}
OnBackButtonPressed event option in MDK editor
Overriding Back Button example in MDK Mobile Clients
Overriding Back Button example in MDK Web app
export default function OnBackButtonPressed(context) {
return context.executeAction('/DemoSampleApp/Actions/MessageBox.action').then((result) => {
return result.data;
});
}
//MessageBox.action
{
"_Type": "Action.Type.Message",
"ActionResult": {
"_Name": "MessageBox"
},
"Message": "Are you sure want to navigate back?",
"Title": "Confirmation",
"OKCaption": "OK",
"CancelCaption": "Cancel"
}
MDK Editor in SAP Business Application Studio
SAP Mobile Services admin cockpit
"ConnectionSettings": {
"EnableOverrides": true,
...
"SignedQRCodeOption": "SignedOnly",
...
},
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |