Thank you for being a valued client of CM First Group. If you have any technical issues or concerns, please open a ticket on support.cmfirstgroup.com, email CM First technical support at support@cmfirstgroup.com or call us on our 24/7 customer hotline at +1 (512) 623-7586.

Follow

How to Manage Custom Files in CM WebClient Mobile

Introduction

WebClientMobile allows the use of Custom Files to modify your application as needed.

A common problem experienced by users is related to the location of these customized files. By default all files used in the application (CSS, JavaScript, etc.) must be contained in the WebClientMobile folder, the problem with this is that when you are going to update your WebClientMobile version, you will need to save all your custom files manually in order to avoid losing your changed versions.

To prevent this problem the best you can do is to manage your custom files in a different location following the steps described in this manual.

Procedure to Manage Custom Files

In order to correctly manage your custom files you must create a new Project (CustomTemplate) on which your custom files will be contained, also you have to create a new library to reference the location of this folder, to do all this follow these next steps:

  1. Create a new entry in your MANIFEST.MF file from your web project
    This new entry will serve us to reference the location from our custom resource folder.
    1. Expand the web project from your application in Eclipse
    2. Locate and open the file MANIFEST.MF
    3. Add the following line “Web-Library-Id: com.custom.WebClientMobile” at the end of the file and save the changes.
  2. Create a page template called Custom-page.wcli:
    This new page template will serve us to override the default library from WebClient Mobile
    1. On your CustomTemplate project create a new template page called “Custom-page.wcli”
    2. Add the following code to the new page template (Replace the name files from the links with your file name):

      /(!HeadArea)
      <link rel="stylesheet" href="/(!WsRes)/css/<your css file>" type="text/css">
      <script type="text/javascript" src="/(!WsRes)/js/<your js file>"></script>
      /(!AttachPoint:name=HeadArea)
      /(!HeadArea)

  3. Create a new folder called CustomWC in your web project:
    This folder will contain all our custom files
    1. Expand the “WebContent” folder from your web project
    2. Create a new folder called “CustomWC”
    3. Expand the “CustomWC” folder and create 3 new folders called “images”, “js” and “css”
    4. Copy your custom files to the “CustomWC” folder
  4. Modify the WebClient.properties file
    Add a new “resurl” property to define the location from the “CustomWC” folder
    1. Open the WebClient.properties file from your web project.
    2. Locate the “resurl” properties section and add this line:

      resurl.com.custom.WebClientMobile=/YourWebProjectName/CustomWC

    3. Save your changes
  5. In Plex create a function called Custom:
    This function will use our “Custom-page.wcli” template
    1. Create a new function called Custom
    2. Define its implementation name with the value of “Custom”
  6. In Plex make all your application functions inherited from the Custom function.
    For your application to use the custom files should make all functions inherited from the "Custom".
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk