General

Expand
titleWhat are the skills needed for me to start developing in Canvas?

This would be dependent on the nature of functionality that you are putting together. For configuring Apps for Inquiry and Data Visibility close to zero coding knowledge is needed. If you are looking to increase user interaction on the App (like listening to user clicks or taps and handling those), then you would need basic JavaScript knowledge. Canvas comes with an associated Message Hub that provides protocol adapters and message conversion options to handle easy consumption external interfaces. In cases where there is a need for custom logic for data fetch or massaging, related coding knowledge to execute the logic in Java is necessary. For working with transaction forms, additionally would include ability to configure validation rules (XML), database logic (SQL).

...

Expand
titleFor any changes done through Canvas, would it require to keep repackaging the application for changes to be reflected in the App distributed through Apple Store or Google Playstore?

For most of the scenarios, the answer is No. It is not required to redistribute the App. Canvas uses a unique modeling concept that allows for the UI configuration information to be updated seamlessly into the App without having the need to repackage the App. Having said that, there are few situations like changes to skins, images, logic written through Canvas extensions that would require a repackage.

Encryption

Expand
titleHow to enable encryption of business data, request and response between client and server in the application built using Canvas?

You can enable encryption for the application built using Canvas by setting the 'ENCRYPT_SERVER_CALLS' property to 'Y' in the 'systempreferences.properties' file.

Note

When you enable encryption, Canvas will encrypt all requests coming to your application including log out.

A sample 'systempreferences.properties' file is available in CTModelHouseResource.jar in the Model House application that comes as part of the Canvas platform package.

Note that you must stop and start your application server to enable this feature. After the application server is restarted, access the widgets in the application and check the Network tab in the browser console to verify the encryption.

CSS

Expand
titleHow to enable horizontal scroll bar for a widget?

You can explicitly enable horizontal scroll bar for a widget through CSS. Let's consider a grid widget shown in the following screen shot taken from the sample application, ModelHouse.

Assume that the ModelHouse application is using the Market theme and the corresponding CSS file is: D:\Canvas\apache-tomcat-7.0.67\webapps\ctmodelhouse\css\style\market\jqtbs\market-jqtbs-ltr.css.

To enable horizontal scroll bar for the grid widget, perform the following:

  1. Open the market-jqtbs-ltr.css file and add the following code in it:

    Code Block
    languagecss
    .CT_CARD_SUMMARY_WGT .table-wrapper-container 
    {
    	overflow-x: scroll;
    }
    
    /* where CT_CARD_SUMMARY_WGT is the widget ID. */


  2. Save the changes to market-jqtbs-ltr.css file.
  3. Refresh the browser and verify if the horizontal scroll bar appears on the widget as shown in the following screenshot:


...

Expand
titleHow to insert icons for form item labels?

You can insert icons for form item labels through CSS. Let's consider a form shown in the following screen shot taken from the sample application, ModelHouse.

Assume that the ModelHouse application is using the Market theme and the corresponding CSS file is: D:\Canvas\apache-tomcat-7.0.67\webapps\ctmodelhouse\css\style\market\jqtbs\market-jqtbs-ltr.css.

To insert icons for the form item labels, perform the following:

  1. Open the market-jqtbs-ltr.css file and add the following code in it.

    Code Block
    languagecss
    [data-item-id="FORM_CREDITCARD"] .CITY-bs label.ct-form__label:before
    {
        font-family: fontAwesome;
        content: '\f1ad';
    }
    
    [data-item-id="FORM_CREDITCARD"] .DOB-bs label.ct-form__label:before
    {
        font-family: fontAwesome;
        content: '\f073';
    }
    
    [data-item-id="FORM_CREDITCARD"] .INCOME-bs label.ct-form__label:before
    {
        font-family: fontAwesome;
        content: '\f0b1';
    }
    
    [data-item-id="FORM_CREDITCARD"] .EMAIL-bs label.ct-form__label:before
    {
        font-family: fontAwesome;
        content: '\f1fa';
    }
    
    [data-item-id="FORM_CREDITCARD"] .MOBILE-bs label.ct-form__label:before
    {
        font-family: fontAwesome;
        content: '\f1ac';
    }
    
    /* Here, FORM_CREDITCARD is the form ID. 
    *  CITY, DOB, INCOME, EMAIL, and MOBILE are the respective form item IDs. 
    */


  2. Save the changes to market-jqtbs-ltr.css file.
  3. Refresh the browser and verify that the icons are appearing on the left side of the form item labels as shown in the following screenshot:

Forms

Expand
titleHow to insert a form in another form using Form Designer?

To insert a form in another form, perform the following steps:

  1. In Canvas Studio, click Create > Form. The Form Designer displays.
  2. In the left pane of Form Designer, click Containers & More.
  3. In Component category, click Form.
  4. From the list of existing forms, select a form and click Save. Selected form will be inserted in the form design area.

...

Expand
titleHow to change the placeholder for error message for each form field?

The mechanism to change the placeholder for displaying error messages for each form field is supported at the application-level, meaning the placeholder can be set for all form items globally across the whole application. By default, Canvas displays the error message for a form field on hovering over the error icon that is adjacent to the form item. However, you can change it to display the error message below the form items. For details of this mechanism, refer Displaying Error Messages below the Form Items.


Data can be fetched using Instruction classes (Java class) in Canvas. Canvas uses iBatis library for database access. Callable statements can be used to access Stored Procedures and Functions to get the data.

Login ID, Language etc. will be passed as parameters by Canvas which can be used to filter data accordingly.
Expand
titleHow to get information from stored procedures or functions with parameters, such as log-in user ID, language, in datasource?
Expand
titleOn-demand loading of form listeners is at workspace-level, can it be done at form-loading level?

Yes. Define filesets in the ondemandjsfile.xml grouping the JS files needed. Use canvas.core.downloadManager object's requireScripts API to fetch this fileset before loading the form.


Expand
titleSample code for form data submission to a web service.

Refer Posting Data using the POST Method.

Database

Expand
titleHow to get information from stored procedures or functions with parameters, such as log-in user ID, language, in datasource?

Data can be fetched using Instruction classes (Java class) in Canvas. Canvas uses iBatis library for database access. Callable statements can be used to access Stored Procedures and Functions to get the data.


Login ID, Language etc. will be passed as parameters by Canvas which can be used to filter data accordingly.


Expand
titleCan the existing DB connections of Adrenalin application be reused for the app created using Canvas instead of creating new ones in Studio?

Database details are fetched by Canvas as JNDI lookups (preferred approach). Alternatively, the connection details can be stored in the DB and datasources can be created to point to these connections to fetch data.

...

Expand
titleHow are the data connection strings stored (as part of WAR or outside)?

Data connection strings are stored on the server in the case of JNDI. The JNDI names are referred in a property file as part of the application WAR file. Alternative approach stores the database details in the Canvas framework's database instance.

SSO

Expand
titleHow to implement SSO authentication for the app created using Canvas?

The authentication token provided by the SSO's authentication provider has to be stored in a Canvas' custom object called SessionInfo, which will be stored in the session object. This will be passed by Canvas to the application code for all requests coming in which can be used by application to do re-authentication/re-authorization as appropriate. This re-authentication is typically done in a SessionFilter, which is attached to all requests.

Entitlement

Expand
titleHow to specify multiple entitlement criteria for a column for data-level entitlement?

Canvas supports multiple criteria values that can be defined at Product-SubProduct-Function level. Each grid column can specify one criteria to be respected.

Charts

Yes Chart allows customizations via a configuration (using properties that are exposed by Fusion Charts).No. End users are not allowed to change the column titles. However, they can change the filters applied by default and can save those as custom views which will be applicable to those users
Expand
titleScroll bars for Chart based on data volume. Is it possible to increase/decrease chart height?
.
Expand
titleIs it possible to enable end-users (application users) to change the display name of columns in a widget?
Is it possible to increase/decrease chart height?

Yes. Chart allows customizations via a configuration (using properties that are exposed by Fusion Charts).


Yes. Define filesets in the ondemandjsfile.xml grouping the JS files needed. Use canvas.core.downloadManager object's requireScripts API to fetch this fileset before loading the form.
Expand
titleOn-demand loading of form listeners is at workspace-level, can it be done at form-loading level?
Is it possible to enable end-users (application users) to change the display name of columns in a widget?

No. End users are not allowed to change the column titles. However, they can change the filters applied by default and can save those as custom views which will be applicable to those users.

Session

Refer Posting Data using the POST Method.
Expand
titleHow Canvas manages users sessions and timeout?

When a user is logging in, Canvas creates a custom SessionInfo object, loads it with user details, and stores it in session. When the session times out or when the user logs out, session is invalidated and the SessionInfo is cleared. This is orchestrated by a class called SessionManager. Application must call SessionManager's validate session. Each request will be validated for a valid session using SessionFilter.

Expand
titleSample code for form data submission to a web service.

Templates

Expand
titleHow to load CT framework's template files that have been modified using etag?

Whenever you modify any CTTPL files that comes with CT framework, it is necessary to ensure that the updated template (CTTPL) files are loaded correctly. To load the updated CT framework templates files using etag, add the following code snippet in the CT_Home.jsp page of Canvas Studio:

Note

The following code must be added to the Home page JSP of the application too if the application is not created using the Canvas platform's codegen.


Code Block
languagexml
<%@ page
	import = "com.intellectdesign.canvas.login.sessions.SessionInfo,
	org.json.JSONArray,org.json.JSONObject,org.json.JSONException,
	com.intellectdesign.canvas.login.sessions.SessionManager,
	com.intellectdesign.canvas.deviceband.TargetedFramework,
	com.intellectdesign.canvas.downloadmanager.RuntimeChangeRegistry"
%>

<div 
	data-item-id = "CHANGED_CTTPL" 
	style = "display:none">
	
	<%
		RuntimeChangeRegistry changedCttpFiles = RuntimeChangeRegistry.getInstance();
		out.print(changedCttpFiles.getCttplFilesChanged());
	%>
</div>
	
<!-- The following div tag code will be used to load the default CTTPL file -->
<div 
	data-item-id = "DEFAULT_CTTPL" 
	style = "display:none">
	
	<%
		RuntimeChangeRegistry defaultCttpFile=RuntimeChangeRegistry.getInstance();

		if(defaultCttpFile.getDefaultCttplFileChanged() != null && !defaultCttpFile.getDefaultCttplFileChanged().isEmpty())
			out.print(defaultCttpFile.getDefaultCttplFileChanged().get(0));
		else
			out.print("");
	%>
</div>


...