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"
"Sections": [{
....
....
"Separators": {
"TopSectionSeparator": false,
"BottomSectionSeparator": false,
"HeaderSeparator": false,
"FooterSeparator": false,
"ControlSeparator": false
},
"_Type": "Section.Type.ContactCell",
.....
.....
],
"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"
}]
}],
"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"
}
}
}
]
},
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`);
});
}
}
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"
}
"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 |
---|---|
21 | |
13 | |
10 | |
10 | |
9 | |
8 | |
7 | |
7 | |
7 | |
7 |