Versions Compared

Key

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

...

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.  



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



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



  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 Filtericon on the right side of the app, select the Account_ID column and click Contains



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


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


Expand
titleHow to add new set of records for the Live Scroll Grid with Cache widgets?

To add new set of records for the Live Scroll Grid with Cache or Paging Grid widget, perform the following steps: 

  1. Specify the env option in the appropriate listener file of the paging grid widget, as shown in the following code snippet: 

    Code Block
    languagejs
    ct.env.options.widget.enableLoadOnScroll=true;


  2. While configuring the app (widget) in App Designer, select the Paging Grid view type. 
  3. The styles should be specified for the paging grid widget, as shown in the following code snippet: 

    Code Block
    languagejs
    [data-widgetid="WGT_BENE"] tbody
    	  {
    	    display:block;
    	    overflow: auto;
    	    height:120px;  // Sample Height 
    	    width:auto;
    	  }
    [data-widgetid="WGT_BENE"] thead tr
    	  {
    	    display:block;
    	    width:auto;
    	  } 
    [data-widgetid="WGT_BENE"] th,td 
          {
    	    width:180px;  // Sample Width
    	  }

    In the aforementioned code snippet, the Widget ID is WGT_BENE


Cookies

Expand
titleWhy do the Hybrid Mobile Apps don't send the cookies to the server?

By default, in the HTTP response header, the SameSite attribute in the Set-Cookie header element prevents the cookies from being sent to the server in the hybrid mobile apps. For example, if the SameSite attribute has been specified as "SameSite=Strict", ensure that you nullify the SameSite attribute with "None", for instance, "SameSite=None", thereby removing the SameSite attribute from the Set-Cookie header element in the HTTP response. 

Note

The Hybrid Mobile Apps get loaded as ad hoc units in the WebView instances and therefore it is essential that the SameSite attribute should be removed or nullified in the Set-Cookie header element in the HTTP response. 


...