...

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>



Grids

Expand
titleHow to enable column filtering and pagination on grids displaying web service data?

To enable columns sorting and filtering, and pagination on grid apps that display data from web services, it is necessary to enable the data cache option.

Let’s assume that the ACCOUNT DETAILS classic grid app (widget), with a web service data source is already created in Canvas Studio.

  1. In App Designer, click the View Config tab and then proceed to select the Caching option.
    1. Click the Enable Data Cache toggle and select the App Instance option in Caching Scope.  

      Image Added


  2. To apply data filters, click the FilterImage Addedicon. 
    1. To configure the column properties of ACCOUNT_ID, click Configure.
    2. In View Column Configuration, click the Sort & Filter option. 

      Image Added

  3. In Sort & Filter, configure the parameters, as shown in the following screen shot:

    Image Added

  4. Proceed to save the app. 

    Let’s assume that the ACCOUNT DETAILS app is mapped to the ACCOUNT SUMMARY workspace. The data of the ACCOUNT DETAILS app, fetched from the web service is displayed in the functional application, Modelhouse:

  5. Click the FilterImage Addedicon on the right side of the app, select the Account_ID column and click Contains

    Image Added

  6. In the Account_ID contains search box, enter the appropriate value and press Enter

    Image Added

    The data matching the search criteria provided for ACCOUNT_ID column appear in the grid.    

    Image Added