
Image Section control in Layout editor

Image Section in mobile clients

Image Section in web application

Data Table in Layout editor

Data Table in mobile clients

Inline Signature control in Layout editor

Inline Signature in mobile clients
"ActionBar": {
"Items": [{
"_Name": "ActionBarItem0",
"Caption": "Item",
"SystemItem": "$(PLT, line.3.horizontal.decrease.circle, filter_list)",
"Position": "Right"
}],
"_Name": "ActionBar1"
},
"ToolBar": {
"Items": [{
"_Type": "Control.Type.ToolbarItem",
"_Name": "ToolbarItem0",
"Caption": "ToolbarItem",
"SystemItem": "$(PLT, doc.viewfinder, document_scanner)"
}]
}![]()
System Icons in mobile clients
let result = [
//createFilterCriteria(filterType: FilterType, name: string, caption: string, filterItems: Array‹object›, isFilterItemsComplex: boolean)
context.createFilterCriteria(context.filterTypeEnum.Sorter, 'FormCellSorter0', undefined, ['NumberOfProducts desc'], false),
context.createFilterCriteria(context.filterTypeEnum.Filter, 'FormCellFilter0', undefined, ['NumberOfProducts ge 4'], true),
context.createFilterCriteria(context.filterTypeEnum.Filter, 'FormCellFilter1', undefined, ['MainCategoryName eq \'Smartphones & Tablets\''], true)
];
return result;
filters are pre-applied on loading of a page in mobile clients

filters are pre-applied on loading of a page in web application
let currentAppliedFilters = context.getPageProxy().getControl('SectionedTable').filters;
//convertFilterCriteriaArrayToJSONString method allows to save/restore filters using string
var currentFilterInJSONString = context.convertFilterCriteriaArrayToJSONString(currentAppliedFilters);
context.getClientData().currentFilterInJSONString = context.convertFilterCriteriaArrayToJSONString(currentAppliedFilters);
alert('Current applied filters are:\n\n' + currentFilterInJSONString);
Currently applied filter criteria to the Sectioned Table in mobile clients

Currently applied filter criteria to the Sectioned Table in web application
const sectionedTable = clientAPI.getPageProxy().getControl('SectionedTable');
//convertJSONStringToFilterCriteriaArray method converts JSON string to array of FilterCriteria
sectionedTable.filters = clientAPI.convertJSONStringToFilterCriteriaArray(clientAPI.getClientData().currentFilterInJSONString);
Setting filter criteria to the Sectioned Table in mobile clients

Setting filter criteria to the Sectioned Table in web application
{
"_Type": "Control.Type.SectionObjectCell",
"Title": "{Name}",
"Visible": true,
"Selected": false,
"Footnote": "{Price} {CurrencyCode}",
"Description": "{CategoryName}",
"StatusText": "Depth: {DimensionDepth} {DimensionUnit}",
"SubstatusText": "Height: {DimensionHeight} {DimensionUnit}",
"DetailImage": "/MDK61/Services/SampleServiceV2_offline.service/{@odata.readLink}/$value",
"DetailImageIsCircular": false,
"AccessoryType": "disclosureIndicator",
"PreserveIconStackSpacing": false,
"OnPress": "/MDK61/Actions/ImageSection/NavToProducts_Detail.action"
}{
"_Type": "Control.Type.SectionedTable",
"_Name": "SectionedTable0",
"Sections": [{
"_Type": "Section.Type.ObjectTable",
"_Name": "SectionObjectTable0",
"ObjectCell": "/MDK61/Fragments/ProductObjectCell.fragment"
}]
}
Fragment support in Layout editor

Overflow icon in mobile clients
ObjectCells": [{
"ObjectCell": {
"AccessoryType": "none",
"DetailImageIsCircular": false,
"DetailImageText": "AI",
"Title": "Avatar Image"
}
},
{
"ObjectCell": {
"AccessoryType": "none",
"DetailImageIsCircular": true,
"DetailImageText": "CI",
"Title": "Circular Avatar Image"
}
}
]{
"Controls": [{
"Section": "/MDK61/Rules/GenerateSectionContents/GetSection.js",
"_Type": "Control.Type.SectionedTable",
"Target": {
"Service": "/MDK61/Services/SampleServiceV2_online.service",
"EntitySet": "ProductCategories",
"QueryOptions": "$top=3"
},
"_Name": "SectionedTable0"
}],
"_Type": "Page",
"_Name": "ProductsCategories_generate",
"Caption": "Products By Categories"
}export default function GetSection(context) {
const binding = context.binding;
if (binding.CategoryName == 'Bins & Baskets') {
return {
"_Type": "Section.Type.ObjectTable",
"EmptySection": {
"Caption": "No product for {CategoryName}"
},
"Header": {
"Caption": "{CategoryName}",
"UseTopPadding": true
},
"Target": {
"EntitySet": "Products",
"Service": "/MDK61/Services/SampleServiceV2_online.service",
"QueryOptions": "$filter=CategoryName eq '{CategoryName}'"
},
"ObjectCell": {
"Title": "{Name}",
"Footnote": "{CategoryName}",
"Description": "{ProductId}",
"StatusText": "{Price} {CurrencyCode}",
"DetailImage": "/MDK61/Services/SampleServiceV2_online.service/{@odata.readLink}/$value"
}
};
}
else {
return {
"_Type": "Section.Type.ObjectCollection",
"EmptySection": {
"Caption": "No product for {CategoryName}"
},
"Header": {
"Caption": "{CategoryName}",
"UseTopPadding": true
},
"Layout": {
"NumberOfColumns": 2
},
"Target": {
"EntitySet": "Products",
"Service": "/MDK61/Services/SampleServiceV2_online.service",
"QueryOptions": "$filter=CategoryName eq '{CategoryName}'&$top=4"
},
"ObjectCell": {
"Title": "{Name}",
"Footnote": "{CategoryName}",
"StatusText": "{Price} {CurrencyCode}",
"DetailImage": "/MDK61/Services/SampleServiceV2_online.service/{@odata.readLink}/$value"
}
};
}
}
Generating sections in mobile clients

Generating sections in web application
{
"_Type": "Control.Type.FormCell.Note",
"_Name": "FormCellNote0",
"IsEditable": true,
"IsVisible": true,
"PlaceHolder": "MinNumberOfLines 2 MaxNumberOfLines 5",
"MaxNumberOfLines": 5,
"MinNumberOfLines": 2
},
var noteFormCell = context.evaluateTargetPathForAPI("#Control:FormCellNote0");
message += "\n\n Note: \n MaxNumberOfLines: " + noteFormCell.getMaxNumberOfLines();
message += "\n MinNumberOfLines: " + noteFormCell.getMinNumberOfLines();
alert(message);var noteFormCell = context.evaluateTargetPathForAPI("#Control:FormCellNote0");
noteFormCell.setMinNumberOfLines(10);
noteFormCell.setMaxNumberOfLines(20);
noteFormCell.setPlaceHolder("MinNumberOfLines 10 MaxNumberOfLines 20");
Getting and setting FormCell controls properties in mobile clients

Getting and setting FormCell controls properties in mobile clients
export default function EnterSearchText(context) {
let eventData = {
Placeholder: "Watering Can"
};
// executeCustomEvent ClientAPI accepts two parameters "EventType" and "Data"
// Client API executeCustomEvent(String: EventType, Object: Data)
context.getPageProxy().executeCustomEvent("SearchEvent", eventData);
}
export default function SearchEvent(context) {
let eventData = context.getAppEventData();
let sectionTableProxy = context.getPageProxy().getControl('SectionedTable');
sectionTableProxy.searchString = eventData.Data.Placeholder;
}.
Custom event support in mobile clients
"ContactCell": {
"DetailImage": "sap-icon://customer",
"Headline": "{FirstName} {LastName}",
"Subheadline": "{City}, {Country}",
"ActivityItems": "/MDK61/Rules/ActivityItems.js"
}export default function ActivityItems (context) {
let customerId = context.evaluateTargetPath("CustomerId");
let activityItems = [];
activityItems.push({
ActivityType: 'VideoCall',
ActivityValue: "0123456789"
});
activityItems.push({
ActivityType: 'Email',
ActivityValue: "mailme@mail.de"
});
activityItems.push({
ActivityType: 'Detail',
ActivityValue: customerId
});
return activityItems;
}<EntityType Name="Product" m:HasStream="true">
<Key>
<PropertyRef Name="ProductId"/>
</Key>
<Property Name="Category" Type="Edm.String" Nullable="true" MaxLength="40"/>
<Property Name="ProductId" Type="Edm.String" Nullable="false" MaxLength="36"/>
...
...
<Property Name="WeightUnit" Type="Edm.String" Nullable="true" MaxLength="3"/>
</EntityType>{
"_Type": "Action.Type.ODataService.UploadMedia",
"ActionResult": {
"_Name": "OData"
},
"OnFailure": "/MDK61/Rules/ODataImage/FailureUploadMedia.js",
"OnSuccess": "/MDK61/Actions/CloseModalPage_Complete.action",
"Target": {
"Service": "/MDK61/Services/SampleServiceV2_online.service",
"EntitySet": "Products",
"ReadLink": "{@odata.readLink}"
},
"Media": "#Control:FormCellAttachment1/#Value"
}
Upload a media in mobile clients

Upload a media in web application
//OData Media Entity
{
"ObjectCell": {
"DetailImage": "/MDK61/Services/SampleServiceV2_online.service/{@odata.readLink}/$value"
}
}
//OData property (Picture) with type Edm.stream
{
"ObjectCell": {
"DetailImage": "/MDK61/Services/SampleServiceV4_online.service/{@odata.readLink}/Picture"
}
}//OData Media Entity
{
"_Type": "Action.Type.OpenDocument",
"Path": "/MDK61/Services/SampleServiceV2_online.service/{@odata.readLink}/$value",
"MimeType": "image/jpeg"
}
//OData property (Picture) with type Edm.stream
{
"_Type": "Action.Type.OpenDocument",
"Path": "/MDK61/Services/SampleServiceV4_online.service/{@odata.readLink}/Picture",
"MimeType": "image/jpeg"
}

{
"_Type": "Action.Type.SetDebugSettings",
"OnSuccess": "/MDK61/Actions/Success.action",
"DebugODataProvider": true,
"TracingEnabled": false,
"Categories": [
"mdk.trace.odata"
]
}export default function SetDebugSettings(context) {
let debugODataProvider = true;
let tracingEnabled = true;
let tracingCategories = [
'mdk.trace.action',
'mdk.trace.odata',
'mdk.trace.profiling'
]
context.setDebugSettings(debugODataProvider, tracingEnabled, tracingCategories);
}
Follow these tutorials to get your hands dirty and learn more about Mobile development kit!

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 24 | |
| 14 | |
| 13 | |
| 12 | |
| 11 | |
| 11 | |
| 10 | |
| 9 | |
| 8 | |
| 8 |