Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.


Expand
titleError in Encrypt or Decrypt methods

Check for following error pattern in the log file:

Code Block
[c.i.c.s.e.EncryptionUtils][ERROR] {[CTCOM00155]:Error occured in the decrypt JWT method : {}}
com.intellectdesign.canvas.servercomm.encryption.DecryptionException: no_error_message
	at com.intellectdesign.canvas.servercomm.encryption.AESEngine.decrypt
Caused by: javax.crypto.IllegalBlockSizeException: last block incomplete in decryption
	at org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher.engineDoFinal(Unknown Source) 

[com.intellectdesign.canvas.servercomm.encryption.PublicKeyImpl][ERROR] {[CTRND00412]:Exception occurred in the Encryption and decryption of Req/Res : {}}
javax.crypto.BadPaddingException: unknown block type

Solution

If such error pattern occurs in the logs, then check the following:

  1. Java version must be higher than 1.8.251.
  2. If the CT version is lower than 19.1.7.6_17307, then the bcprov-jdk16-1.46.jar file must be present.
  3. If the CT version is above 19.1.7.6_17307, then the bcprov-ext-jdk15to18-169.jar must be present.
  4. If the CT version is lower than 19.1.1.0, then the bcprov-ext-jdk15on-150.jar must be present.


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:


...