Tutorials

Labels
AJAX(112) App Studio(7) Apple(1) Application Builder(245) Application Factory(207) ASP.NET(95) ASP.NET 3.5(45) ASP.NET Code Generator(72) ASP.NET Membership(28) Azure(18) Barcode(2) Barcodes(3) BLOB(18) Business Rules(1) Business Rules/Logic(140) BYOD(13) Caching(2) Calendar(5) Charts(29) Cloud(14) Cloud On Time(2) Cloud On Time for Windows 7(2) Code Generator(54) Collaboration(11) command line(1) Conflict Detection(1) Content Management System(12) COT Tools for Excel(26) CRUD(1) Custom Actions(1) Data Aquarium Framework(122) Data Sheet(9) Data Sources(22) Database Lookups(50) Deployment(22) Designer(177) Device(1) DotNetNuke(12) EASE(20) Email(6) Features(101) Firebird(1) Form Builder(14) Globalization and Localization(6) How To(1) Hypermedia(2) Inline Editing(1) Installation(5) JavaScript(20) Kiosk(1) Low Code(3) Mac(1) Many-To-Many(4) Maps(6) Master/Detail(36) Microservices(4) Mobile(63) Mode Builder(3) Model Builder(3) MySQL(10) Native Apps(5) News(18) OAuth(8) OAuth Scopes(1) OAuth2(11) Offline(20) Offline Apps(4) Offline Sync(5) Oracle(10) PKCE(2) PostgreSQL(2) PWA(2) QR codes(2) Rapid Application Development(5) Reading Pane(2) Release Notes(180) Reports(48) REST(29) RESTful(29) RESTful Workshop(15) RFID tags(1) SaaS(7) Security(80) SharePoint(12) SPA(6) SQL Anywhere(3) SQL Server(26) SSO(1) Stored Procedure(4) Teamwork(15) Tips and Tricks(87) Tools for Excel(2) Touch UI(93) Transactions(5) Tutorials(183) Universal Windows Platform(3) User Interface(338) Video Tutorial(37) Web 2.0(100) Web App Generator(101) Web Application Generator(607) Web Form Builder(40) Web.Config(9) Workflow(28)
Archive
Blog
Tutorials
Monday, September 18, 2017PrintSubscribe
Executing Requests with the Client API

All apps created with Code On Time app generator contain a single client-side API used for all server-side operations, including Select, Insert, Update, Delete, Report, Batch Edit, etc. One significant advantage of using a centralized API is that any style of user interface is able to access the same API – this has allowed the co-development of Classic and Touch UI.

Another major advantage in the client-side API is that developers are able to extend their apps with custom behavior utilizing the same data access routines – any access control rules, data controller customizations, and security restrictions will also equally apply to these custom requests.

To access the client API from custom JavaScript, simply call the method $app.execute(options) with the required parameters set on the options object. See a list of available options parameters below.

Property Description Default Value
controller The controller to direct the request to. (required)
view The view of the controller to use. grid1
done
success
Callback function when the request was send and received successfully. First argument contains the results. List of records can be found under the result property equal to the name of the controller.
fail
error
Callback function when the request failed.
command The name of the command to execute. “Select”
argument The argument of the command to execute.
lastCommand The last command name.
lastCommandArgument The last command argument.
pageSize The number of records to return in a single page. 100
pageIndex The page number to return. 0
filter An array of field filter objects. Each object must have 3 properties:
- “field” specifies the field name
- “operation” specifies the filter operation to perform
- “value” specifies the value of the filter. For operations with two operands (such as “between”), specify an array of two values.
values An array of field value objects. Each object can have the following properties:
- “name” specifies the name of the field matching the one defined in the controller.
- “value” specifies the current value of the field.
- “newValue” specifies the new value.
- “modified” specifies that the new value will be used in any Insert or Update expressions. Setting “newValue” will set “modified” to true by default.
selectedValues An array of strings that contain the primary keys of the selected records. Used for batch update.
tags Specify a list of tags that can be processed on the server.
requiresData Specifies if data should be returned to the client. true
requiresAggregates Specifies if aggregates defined on the view should be returned with the request. false
fieldFilter Specifies a list of fields to include in the response for each record. Not setting this value will return all fields.
format Specifies if field values should be formatted when the results are returned. true
includeRawResponse Specifies if the result should include the raw response in the rawResponse property. false

The simplest way to test your queries is to use the Developer Tools Console, available in most modern browsers.

First, browse to your running site in your favorite browser. Press “F12” to bring up Developer Tools. Switch to the Console tab.

Using the Console tab of Developer Tools to test the $app.execute() API.

You may now begin typing in $app.execute() requests in the console. Note the use of console.log(result), which will print the JavaScript object to the console when the request returns.

The following examples will use the online Northwind sample.

Select

The simplest use case for using the API is to request a page of data. See the following example below on how to fetch the first 10 records from the Orders table where the field “ShipCountry” is equal to “USA”.

$app.execute({
    controller: 'Orders',
    pageSize: 10,
    filter: [
        { field: 'ShipCountry', operator: '=', value: 'USA' }
    ],
    done: function (result) {
        console.log(result);
    }
})

The result shown in the Developer Tools Console.

Selecting 10 orders with a filter.

Insert

In order to insert records to a particular table, the request must specify the “Insert” command and a list of field values. This list is represented by the values property. Each field value object contains a field name. Values that will be assigned to the new record are stored in the field value’s newValue property. The primary key of the table is added as a field value object with the property value equal to null in order for the response to return the new primary key of the inserted record.

$app.execute({
    controller: 'Orders',
    command: 'Insert',
    values: [
        { name: 'OrderID', value: null },
        { name: 'ShipCity', newValue: 'San Diego' },
        { name: 'ShipCountry', newValue: 'USA' }
    ],
    done: function (result) {
        console.log(result);
    }
})

See the results below.

Inserting a record using the $app.execute() API.

Refreshing the view in the browser window will reveal the new record.

The new record is displayed in the grid.

Update

When performing operations on an existing record, either the primary key or an array of selected values must be specified. New field values must be specified in the newValue property.

$app.execute({
    controller: 'Orders',
    command: 'Update',
    values: [
        { name: 'OrderID', value: 11083 },
        { name: 'OrderDate', newValue: new Date() }
    ],
    done: function (result) {
        console.log(result);
    }
})

The result is shown below.

Updating an order via the $app.execute() API.

The result can be seen by refreshing the list of orders.

The updated field value is visible by refreshing the page.

Delete

Delete operations must specify the primary key in the values array.

$app.execute({
    controller: 'Orders',
    command: 'Delete',
    values: [
        { name: 'OrderID', value: 11079 }
    ],
    done: function (result) {
        console.log(result);
    }
})

See result below.

Deleting a record.

The rowsAffected property will be equal to “1” if the record was successfully deleted.

Friday, September 8, 2017PrintSubscribe
Announcing Cloud On Time Connector for DotNetNuke

Starting with release 8.6.6.0, apps created with any edition of Code On Time generator can be integrated with external DotNetNuke websites with the help of Cloud On Time Connector for DotNetNuke.

Cloud On Time Connector for DotNetNuke is a ready-to-deploy module that provides OAuth 2.0 endpoints for any number of external apps created with Code On Time. It also enables application data presentation/links within the portal pages. Utilize the power of Code On Time to rapidly build database applications integrated with DotNetNuke.

Users will also have the ability to “Login with DotNetNuke”, and use their existing DotNetNuke accounts in the Code On Time app.

The instructions below will use the Northwind sample and a fresh instance of DNN 9.0.2 hosted on Microsoft Azure.

Make sure to enable Content Management System for the database of your app. 

Installing Cloud On Time Connector for DotNetNuke module

The next step is to install the Cloud On Time Connector for DotNetNuke module into your DNN portal instance. Download the latest release of the module from the Releases page.

Using your preferred browser, navigate to your DNN portal and sign in with a SuperUser account.

Logging into DotNetNuke with a SuperUser  account.

In the sidebar, hover over the gear icon and press “Extensions”.

Opening extensions panel.

At the top of the Extensions panel, press “Install Extension”.

Installing a new extension.

Upload the zip file containing the Cloud On Time Connector for DotNetNuke module.

Uploading the extension.

Press “Next” to confirm the package information, and press “Next” again to confirm reviewing the release notes. Accept the license, and press “Next” one more time to begin installation.

Accepting the extension license.

Once installation is complete, the installation report will be displayed.

The package installed successfully.

The module is now installed in your DotNetNuke instance.  Note that the website will restart, which may cause some delay immediately after installation.

Configuring Authentication Endpoint

Cloud On Time Connector for DotNetNuke can integrate any number of external applications into your DotNetNuke portal. An endpoint page with an instance of the module will need to be created in the portal for each integrated application. The developer must configure the Code On Time app and the module instance on the portal page with matching parameters to enable communications over OAuth 2.0 protocol.

First, let’s create a publicly-accessible endpoint page.  Under the “Content” icon in the sidebar, select the “Pages” option.

Opening the Pages panel.

In the top right corner of the Pages panel, press “Add Page”.

Adding a new page.

Specify the following properties:

Property Value
Name end-point-app1
URL /end-point-app1
Display In Menu Off

The name and URL provided above are for demonstration purposes only. You can choose any name and URL that you like.

Under the Permissions tab, check the box to allow all users to view tab. This will enable both anonymous and authenticated users to access the page.

Allowing all users to view the tab.

Press “Add Page”. On the next screen, drag the page to the end of the page list.

Positiong the page in the menu.

The browser will then redirect to the page in edit mode. In the bottom-left corner, press the “Add Module” button.

Adding a module to the page.

From the Add Module screen, click on “Cloud On Time Connector”.

Adding the "Cloud On Time Connector" module.

Drag the floating module and drop on the first dashed placeholder in the end-point-app1 page.

Dropping the module into the first placeholder.

Mouse over the top right corner of the module instance on the page to reveal the control bar.  Mouse over the gear icon, and press “Settings” in the hover menu.

Opening the settings for the module.

Switch to the “Configuration” tab. Use the following settings:

Property Value Explanation
Mode Authentication Endpoint This module instance will serve to authenticate users and offer an endpoint for the Code On Time app.
Client ID app1 The unique identifier for your Code On Time app.
App URL [Your app URL] The location that your application is accessible from.
example: https://cotapp1.azurewebsites.net
Client Secret [randomly generated] A secret value used for server-to-server communications.
example: 4eba319ad0fe41c9b1f02ae69b7466f2
Allowed Tokens Portal:PortalName User:DisplayName A comma- or space-separated list of DNN tokens that will be passed to the app created with Code On Time at the time of user login. Optional.

When configuration is complete, press “Update” to save your changes. Now the module instance on the page end-point-app1 has been configured to accept authentication connections.

We will need to configure the app created with Code On Time to request authentication connections to the DotNetNuke portal.

Navigate to your app, login as admin, and switch to the Site Content page. Press the Plus icon to create a new record.

Adding a new Site Content record.

Select “Open Authentication Registration”, and press OK.

Creating a new Open Authentication Registration.

Configure the following:

Property Value
Authentication DotNetNuke
Client Id app1
Client Secret [randomly generated secret from the module settings]
Client Uri [Your DNN portal URL]/end-point-app1
Redirect Uri [Public URL of your app]/appservices/saas/dnn
Tokens Portal:PortalName User:DisplayName

Your configuration should look like the one below:

Open Authentication registration form has been filled out.

Press the checkmark icon to save the new record. Your app is now configured for authentication connections with DotNetNuke portal.

To test the connection, log out of your app.

Logging out of the app.

Once logged out, your app will show the login form. Notice that a new action “LOGIN WITH DOTNETNUKE” is now available.

Login with DotNetNuke is now visible on the login form.

Push the new action, and you will be navigated to your DotNetNuke portal. If you are not signed into your portal, the login page will be displayed.

Redirected to the DNN login page.

After user has logged in, the login page will redirect to the authentication endpoint. If there are no issues with the configuration, the portal and app will communicate over OAuth2.0 protocol. A user account will be created in the app membership database with the DotNetNuke username, email, roles, picture, and random password. If tokens were requested in the configuration of the app, then the values will be captured by the application.

The DotNetNuke user has been signed in.

If the Account Manager is enabled in the application, subsequent logins will not authenticate with DotNetNuke portal again until the user logs out. You can add “Auto Login: true” parameter to the sys/saas/dnn entry in the SiteContent table to automatically redirect unauthenticated users to DotNetNuke.

If you have developed multiple applications, then create additional authentication endpoint pages following the instructions above for each app. Note that your apps can be deployed anywhere and do not need to physically reside on the same server as the DotNetNuke portal.

Data Presentation in DNN Portal

The Cloud On Time Connector for DotNetNuke module also allows displaying data from your application directly in the portal pages.

Navigate to your DotNetNuke portal with the configured application endpoint as a SuperUser account.

Hover over the Content icon on the sidebar, and press “Pages”.

Opening the Pages panel.

In the top right corner of the Pages panel, press “Add Page”.

Adding a new page to the DNN portal.

Specify the following properties:

Property Value
Name Products
URL /products

Switch to the Permissions tab, and check the box to allow registered users to view tab.

Allowing registered users to access the tab.

Press “Add Page”. On the next screen, drag to place the new page after the Home page.

Positioning the Products page.

You will be navigated to the new Products page. In the bottom left corner, press “Add Module”.

Adding a module to the page.

Select the “Cloud On Time Connector” module from the list.

Adding the Cloud On Time Connector module.

Drag the floating module and drop on the first dashed area in the page.

Dropping the module onto the page.

Hover over the gear icon above the module, and press “Settings”.

Opening the settings for the module.

Switch to the Configuration tab. If the authentication endpoint has already been configured, then the Mode property of this module instance will be set to “Data Presentation”. Enter the following:

Property Value
Mode Data Presentation
App App1 ([your URL])
Page URL ~/pages/products
Height 600px
Show Navigation false

Press “Update” to save your changes. Proceed to refresh the page. The module will now display a grid of products.

A grid of products is now displayed within the DotNetNuke portal

Accessing User Tokens

If tokens were configured for both sys/saas/dnn entry and the authentication endpoint of DotNetNuke portal, then the values can be used in the implementation of business rules in the application. For example, token “User:DisplayName” can be accessed by the following sample code:

SQL:

set @Result_ShowAlert = 'Hello ' + @Profile_User_DisplayName

C#:

Result.ShowAlert("Hello " + Convert.ToString(GetProperty("Profile_User_DisplayName")));

Visual Basic:

Result.ShowAlert("Hello " & Convert.ToString(GetProperty("Profile_User_DisplayName")))
Friday, March 3, 2017PrintSubscribe
Touch UI 2017, Modals, Import, Identity Manager, OAuth, SharePoint

Release 8.6.0.0 has arrived! This release contains thousands of changes to the application framework and client library. A new revision of Touch UI has been created to match modern user design principles. Modal Forms, Import, Search, and Themes have all been implemented or overhauled for this release. The new Identity Manager and OAuth support for Facebook, Google, Windows Live, and SharePoint make it easy for your users to login and/or switch accounts. The next generation of SharePoint is now supported with Software-as-a-Service (SaaS) mode.

Read on to explore the new features available in release 8.6.0.0. Learn more about upcoming Native Online and Offline Apps.

New YouTube Channel

Watch our brand new YouTube channel! See Touch UI 2017 in action and learn the latest development techniques.

Subscribe to the channel now! New videos will be published weekly. The transcripts of the videos will soon be available on our website in HTML and PDF format.

Modal Forms

Modal forms are now supported in Touch UI. Modals offer an enhanced sense of context and continuity to the user.

Forms will be displayed in modal presentation if sufficient screen space is available. The modal will be sized based on a proportion of the screen’s width and height. Opening additional forms will slide the form in a modal from right side of the screen. The user can tap the previous modal to go back.

Every modal offers access to the “more” menu, represented by the three dot icon in the top right corner. The close icon will return the user to the previous form or grid.

"New Attachments" modal form displayed in Touch UI 2017.

The maximize icon allows the user to expand the modal to fill the screen.

Modal form that has been maximized.

If there is insufficient width to render the form in a modal, it will be rendered in full screen mode. The view tag “modal-never” will also force full screen presentation.

Form is displayed in full screen mode.

Forms that have been tagged with “modal-always” will always be rendered in a modal window.

A form marked as always modal on a tiny screen.

A system of tags allows control over the sizing of modals. See the table below for more details.

Tag Description
modal-always Always render form as a modal.
modal-never Never render form as a modal.
modal-when-tn
modal-when-xxs
modal-when-xs
modal-when-sm
modal-when-md
modal-when-lg
modal-when-xl
modal-when-xxl
Will begin rendering the form as modal if the screen is at least the specified logical size. Default is “md”.
modal-fit-content Shrink the modal to fit the content. These modals will begin stacking, instead of sliding from the right.
modal-title-none Disables the modal title bar.
modal-buttons-more-none Disables the “more” icon.
modal-buttons-fullscreen-none Disables the “fullscreen” icon.
modal-tap-out Closes the modal form if the user taps outside the modal area.
modal-max-tn
modal-max-xxs
modal-max-xs
modal-max-sm
modal-max-md
modal-max-lg
modal-max-xl
modal-max-xxl
modal-max-any
The max width of the modal will be restricted to the selected logical size.
modal-dock-top
modal-dock-left
modal-dock-right
modal-dock-bottom
Docks the modal window to the specified side of the window.

New Theming Engine

A lighter touch has been applied to themes in Touch UI. Starting with release 8.6.0.0, the user has the ability to select “Light” or “Dark” base theme. Then, the user can select an accent for the theme. Each accent contains a combination of toolbar, sidebar, and icon color definitions.

The picture below shows “Light” theme with “Aquarium” accent.

Light theme with Aquarium accent in Touch UI 2017.

Here is “Light” theme with “Dark Knight” accent.

Light theme with Dark Knight accent in Touch UI 2017.

Finally, here is a sample of “Light” theme with “Plastic” accent.

Light theme with Plastic accent in Touch UI 2017.

The new theme engine significantly reduces the amount of CSS that comes with each app, resulting in smaller apps and better performance. It also makes possible the ability to create your own themes easily using a few colors. CoT v9 will offer a built-in Theme Builder.

Note that Dark theme did not make it into this release. We will be adding it in a subsequent release. Additional color variations will be added as well.

4,000+ Icons

Starting with release 8.6.0.0, over 4,000 icons are available for use in apps created with Touch UI. Icons can be applied to a page, view, or action to help the user in navigation and data manipulation.

By default, every application comes integrated with 1,650 icons from the Material icons library, provided for re-use by Google under the Apache License Version 2.0. There are 260 Halfling glyphicons (included with Bootstrap 3.0 under MIT License integrated as well. Additional icon libraries Font Awesome (730) and Ionicons (1,466) can be included using the method described here.

Icons available on actions, forms, and pages.

Import for Touch UI

A new implementation of Import has been added to Touch UI. The “Import” action is no longer hidden from the user. By default, it is available under the Actions menu.

"Import From File" action available on the Actions menu of the action bar.

This action will open the Import modal form, prompting the user to select a file for upload.

First screen of the Import process allows the user to upload a CSV, XLS, or XLSX document.

Upon selecting a file and pressing “SUBMIT”, the file will be processed. The next form will require the user to map the column headers of the imported file with the fields defined in the command argument of the Import action, or “createForm1”. Sample values from the imported file will be displayed as footer text in each field.

Second screen of the Import process allows the user to map columns from the imported file to fields in the controller.

Upon pressing “START IMPORT”, the client will begin resolving lookups and submitting batch insert requests to the server. A modal form will display the status of the import process.

During the Import process, a modal will show status.

The user will be alerted to the fact that the import process was completed.

When Import is complete, a modal will alert the user.

Enhanced Basket Lookups

This release enhances keyboard support for “Basket” lookups. This style, compatible with “Lookup”, “Auto Complete”, and “Drop Down List”, will display a list of values associated with a particular record. Users can use the lookup control to add additional items.

The "Tags" basket lookup shows multiple tags added to the task. A dropdown allows adding more tags.

Tap on an item to remove it from the list, or view details of that record.

Tapping on an item allows viewing or deleting the item.

If the “New Data View” is specified for the field, the user can type in a new item and press “Enter”. If there is only one required field, the record will be inserted and added. Otherwise, the create form will be shown. This allows rapid entry of items. Note that non-basket lookups also allow creating items in a similar fashion.

The “Basket” lookup style offers a great way to create many-to-many records if the Check Box List does not cut it.

Splash Screen

Many app stores recommend the use of a splash screen showing a logo or app name when the app is first started. Apps created with release 8.6.0.0 will show a splash screen for 2 seconds when the user begins a new session. The application logo is displayed in the top right corner. The app footer text is displayed in the bottom right corner. A default background image is displayed on the left side.

Splash screen for apps created with Touch UI 2017.

Learn how to customize the application logo and background.

Identity Manager

Previous releases required users to sign in every time they start working with the app. The new Identity Manager will store login tokens in the browser’s local storage. If the user enables “Remember Me”, the encrypted token will also enable the user to automatically sign in when their session needs to be refreshed. This login token is valid for up to one week. Otherwise, the token will simply remember the user’s name.

When the user begins a new session, an attempt will be made to sign in with the most recently used credential that contains a login token, if one is detected. The loading screen below will be displayed during the login attempt.

Automatic login for users that remember their password.

Otherwise, if there are any credentials, the list will be displayed.

A list of users is displayed on the Identity Manager screen.

The user can select an identity to sign in, and the login form will be displayed. They can also use the three dot icon to remove the identity.

A user icon will be rendered in the top right corner of the screen when signed in. Pressing the icon allows access to the account panel. The user can view their account, log out, switch to different user, add an additional account, or manage the list of accounts.

User can switch between accounts using the account panel in the top right corner.

When the screen is too narrow to display the user icon in the top right corner, the user icon will be accessible under the menu panel.

Account panel can accessed from the menu panel if space is insufficient for the user icon.

If login tokens are remembered for several accounts, it becomes trivial to switch between them – similar to how your smartphone allows jumping between different email accounts.

Open Authentication Support for Google, Facebook, Windows Live, SharePoint

Apps created with release 8.6.0.0 support integration with external authentication services via the OAuth 2.0 API. This feature is available in Unlimited edition. Enable the functionality for each service via the following procedure:

  1. Register your app with the external service.
  2. Register the external service with the app.
  3. Login.

The following services are supported:

Actions to login with a service are automatically displayed in the login form when that service is enabled.

Login with service actions displayed on the login form.

SharePoint Software-as-a-Service

SharePoint Factory project type was originally created as a server-side application that ran a traditional Code On Time Desktop app inside SharePoint 2010. However, the most recent editions of SharePoint (Online and 2016) do not offer the capability to run server-side applications inside the server farm. They do allow embedding simple client-side web apps. As such, the best solution to bring your favorite Code On Time pages into the SharePoint instance is to embed an external Web Site Factory or Web App Factory project in an iframe.

Code On Time app running inside SharePoint Online in SaaS mode.

We now offer the Data Connector for Cloud On Time add-in on the SharePoint Store. Install this add-in to your SharePoint instance. Place the new “Data Connector” web part onto a page, and connect the web part to your app. Once your app has been registered with SharePoint and vice versa, the web part will show a permission request to the user.

User identity is delegated to the SharePoint instance via OAuth support. The SharePoint user simply grants access to your external site, and a matching user identity will be created and automatically signed in to your app.

Learn how to configure the data connector add-in.

Mini Sidebar

The sidebar and menu button behavior has been changed. On larger screens, a wide sidebar is displayed by default.

The full sidebar displayed in a Touch UI app

Medium size screens (such as a virtual iPad Pro) will default to the mini sidebar.

Touch UI app with mini sidebar.

Pressing the hamburger icon in the top left corner will toggle between the full and mini sidebar.

Expanded Keyboard Support

The new release offers better support for keyboard navigation, helping experienced users manipulate data with ease. Arrow keys can be used to navigate the grid or panels. Additional shortcuts have been added:

  • Ctrl+F will search the first visible view on the screen.
  • F10 will trigger the menu button.
  • Shift+F10 brings up the “more” panel.
  • Esc will either close any pending panels, or navigate back to the previous screen.

The developer can also define custom keyboard shortcuts for actions. If the action is visible to the user, pressing that key combination will trigger that action. For example, configure “N” to create a new record from the grid. Configure “Delete” to delete the selected record. Configure “C” to mark a record as “Complete”.

User Icons

The app displays the user identity in the app toolbar and Identity Manager. By default, the first letter will be displayed. The developer can also configure avatars to be supplied for each user.

The user icon on the toolbar offers access to the different identities registered on that device.

Touch Settings

In prior releases, app configuration options were statically generated into a code file. The code would return this static definition to the user. Release 8.6.0.0 now first reads from the “~/touch-settings.json” file in the root of the project. This file is blank by default. If various configuration settings are not present in the file, it will write default values specified at generation time. Otherwise, it will take the values defined in the file. It is also possible to programmatically change values in the settings before it returns back to the client.

This behavior now allows us to rapidly introduce new configuration settings to get you app to look and behave the way you want. For example, to configure the menu to render in the sidebar, use the following config:

{
  "ui": {
    "menu": {
      "location":  "sidebar"
    }
  }
}

The result can be seen below.

Menu is displayed in the sidebar.

Some of the changes that can be made:

  • Move the menu to the toolbar, sidebar, or hide it.
  • Move the “Apps” button to the toolbar.
  • Disable the Quick Launch area of the sidebar.
  • Restrict the number of themes available to the user.
  • Disable user options, such as “Promote Actions” or “Initial List Mode”.
  • Configure a logo and background for the app.
  • Disable the splash screen.
  • Disable the Identity Manager.

See a sample configuration below. Some of the settings will be subject to change.

{
  "defaultUI": "TouchUI",
  "appName": "Inventory Manager",
  "map": {
    "apiKey": null
  },
  "charts": {
    "maxPivotRowCount": 100
  },
  "ui": {
    "theme": {
      "name": "Light",
      "accent": "Aquarium",
      "preview": null
    },
    "displayDensity": {
      "mobile": "Auto",
      "desktop": "Condensed"
    },
    "list": {
      "labels": {
        "display": "DisplayedBelow"
      },
      "initialMode": "SeeAll"
    },
    "menu": {
      "location": null,
      "apps": {
        "tiles": null,
        "location": "sidebar"
      }
    },
    "actions": {
      "promote": true,
      "reverse": null,
      "autoReverse":  null
    },
    "transitions": {
      "style": "slide"
    },
    "sidebar": {
      "when": "Landscape",
      "mini": true,
      "toolbar": true,
      "icons": true,
      "views": {
        "styles": null,
        "names": null,
        "collapsed": false
      }
    },
    "showSystemButtons": null,
    "smartDates": true
  },
  "settings": {
    "enabled": true,
    "options": {
      "displayDensity": true,
      "theme": true,
      "transitions": true,
      "sidebar": true,
      "labelsInList": true,
      "showSystemButtons": true,
      "promoteActions": true,
      "smartDates": true,
      "initialListMode": true
    }
  },
  "membership": {
    "enabled": null,
    "profile": "view switch login logout",
    "help": true,
    "accountManager": {
      "enabled": true
    }
  },
  "help": {
    "enabled": null
  },
  "search": {
    "quickFind": {
      "history": {
        "enabled": true,
        "depth": 25
      }
    }
  },
  "splash": {
    "enabled": true,
    "duration": null,
    "background": "/images/acme-bkg.jpg",
    "logo": "/images/acme-logo.png"
  }
}

A schema will be supplied in the near future to help construct your configuration. COT v9 will offer a built-in configuration editor.

Data Islands

The new “Data Island” feature allows web-dev savvy users to create their own pages using client-side templating. Simply configure a “$app.execute” script block on your page, and the server will automatically replace that block with the requested data in JSON format using standard data controller requests. Add tags to your HTML template, and the data will be rendered according to the template when page loads in the browser without making requests to the server.

Data islands are perfect for public-facing web pages that do not require data interactivity. For example, you can add pages that display product info, account status, etc.

The example below uses a simple Bootstrap table to render the list of products.

Products rendered with Boostrap CSS styling using the new Data Island feature.

The source code of the page is shown below.

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>Product Info</title>
</head>
<body data-authorize-roles="*">
    <div data-app-role="page" data-content-framework="bootstrap">
        <div class="jumbotron">
            <div class="container">
                <h1>My Products</h1>
            </div>
        </div>
        <div class="container">
            <table class="table">
                <tr>
                    <th>Product Name</th>
                    <th>Unit Price</th>
                </tr>
                <!-- repeating control -->
                <tbody data-control="repeater" data-source="ProductList">
                    <tr>
                        <td><span data-control="field" data-field="ProductName"></span></td>
                        <td><span data-control="field" data-field="UnitPrice"></span></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>

    <!-- data island request -->
    <script data-type="$app.execute">
        ({
            "controller": "Products",
            "view": "grid1",
            "pageIndex": 0,
            "pageSize": 100,
            "sortExpression": null,
            "id": "ProductList"
        })
    </script>

    <!-- optional client-side post-render processing -->
    <script>
        $(document).on('start.app', function () {
            var productList = $app.data["ProductList"];
            if (productList && productList.length) {
                // process
            }
        });
    </script>
</body>
</html>

Search

The new Quick Find uses a modal form to render above the page content.

The new Quick Find panel displayed as a modal at the top of the screen.

Pressing the three dot icon will open the advanced search modal window.

IMPORTANT: Release 8.6.0.0 has the advanced search mode in a “temporary disabled” state.  The new advanced search allows complete customization of the user interface but is not quite stable at the moment. The feature will be re-enabled in the maintenance release expected to go out on March 13.

Miscellaneous

The release includes a host of other new features, improvements, and fixes. Some of the items are listed below:

  • CORS Support.
  • JavaScriptSerializer has been replaced with Newtonsoft.JSON to offer significantly greater performance .
  • File sizes are now displayed using “KB”, “MB”, “GB”, etc.
  • Issue with DateTime fields being shifted in reports has been resolved.
  • Footer Text property is now supported in Touch UI.
  • Floating category will create multiple internal columns in Touch UI.
  • Categories now offer “Flow” property. A value of “New Column” will render the category in a new column. A value of “New Row” will ensure that the category will move onto the next row, below any previous columns. This enables developers to configure several tabs of data views below the primary form, much like the “Tabbed” layout in previous versions of the app generator.
  • Touch UI dropdowns now render over the value, instead of below.
  • Static lookups in Touch UI grids will no longer query the database to fetch items.
  • Data View field properties are now supported.
  • “When Key Selected” is not re-enabled when opening an action in the Project Designer.
  • Removed several timers to allow Touch UI pages to load faster.
  • Alerts and confirms now use the new modal windows.
  • Desktop has been renamed to “Legacy”.
  • Legacy UI no longer scrolls incorrectly when a business rule changes a field value.