Web Embedded File

Web Embedded File

This control template will allow you to display files within your WebClient page. Primarily this is used to display images dynamically on your page.

1) Copy WebEmbeddedFile.ctrl into your Custom Templates folder so that it can be referenced by WebClient.

2) In Plex, you will want to have an Edit field on your panel that you will use to display the File.   This field will need to have a length long enough to display the file path of the file. 200 characters is usually enough, but if you need longer you can have the field be as long as you want. Please note that the size of the edit control in the Panel Editor will be the size it appears in WebClient. So, set the size accordingly.

3) In the Action Diagram code, set the value of the field to the file path of the file relative to the Web Server. For example, if you have a folder in your WebContent folder called "MyImages", and in that have an image file called "myImage.jpg", you would set the value of the field to "MyImages/myImage.jpg".   Then, do a Put on the field.   The Put is what will update the file being shown in the panel.

Note: If you want to display files that are outside of your WebProject, you can set up a Context in your server.xml to reference external folders. It would look something like this:

<Context docBase="C:\MyImages" path="mywebproject/MyImages"/>

This would allow you to reference the images by setting the field value to "MyImages/myImage.jpg".

    • Related Articles

    • Web Controls

      What Are the Different Types of Controls? Include files (*.inc)   are evaluated within the referencing template and can be useful for repeated blocks of code. They can have parameters, such as :nc (do not evaluate comments) or :parameterName=pValue ...
    • How to implement file viewer in WebClient using Office Web Viewer

      Reference https://www.microsoft.com/en-us/microsoft-365/blog/2013/04/10/office-web-viewer-view-office-documents-in-a-browser/ How to implement the FileViewer.ctrl The FileViewer.ctrl template is applied over an edit control in your Plex panel, at ...
    • Incident Reporter for Web

      Video Walkthrough Pattern Functions All functions will be under "Patterns.Web". GoogleMap This pattern is a simple UIBasicShell.  It displays a single field: GoogleMap for GoogleMap.  This field has a Control Name of ...
    • TrafficCam for Web

      Watch the Walkthrough We are going to develop a web application with CA Plex and CM First's WebClient templates. The application will allow us to access a network of real-time traffic cameras around the State of Maryland, view their live video feeds, ...
    • CM WebClient File Upload Setup

      File Upload This guide will show you how to upload files to your Web Server from your WebClient application. 1. Import the attached zip Java Project into your Eclipse Workspace. 2. Right click your Java Project, and select Properties. Under “Java ...