A: a. Login to your group model and remove the old WebClient group model and add the new WebClient group model from your library list.
b. Extract a new local model.
Important Note: If you get error messages during this operation, please contact CM First support for guidance.
A: No, you don't have to. You may choose to upgrade only if you need the new WebClient pattern.
A: You need to install WebClient 1.8 project and make sure that you have the same WebClientBuilderPlugin installed in your Eclipse plugin.
A: WebClientLiveInstall is not designed for WebClient development purpose. If you are setting up WebClient development environment, you should build your environment from scratch. Subclipse will work with official eclipse installation.
A: a. Before you start installing WebClient 1.8, you will need to close your eclipse.
b. Go to your Eclipse/plugins folder, delete the old com.adcaustin.webclient.WebClientPlugin-1.6.jar and copy the new com.cmfirstgroup.webclient.WebClientPlugin-1.8.jar to the folder. Note: if you are using Eclipse Juno, the builder plugin has to be copied to Eclipse/dropins folder.
c. Start your Eclipse.
d. Close your existing WebClient project, right-click on the project and select Delete.
e. Close your Eclipse.
f. Go to your workspace directory using Windows Explorer and delete WebClient folder from your workspace.
g. Start your Eclipse.
h. Go to the Eclipse menu: File → Import → Expand General folder → Select Existing Projects into Workspace → click Next > → Check Select archive file and browse to where you download WebClient-1.8.zip → Click Finish.
i. There should be an Eclipse window prompting you to enter your license. Please copy your generator ID and open a ticket on our support website to request for your new generator license. If you have purchased Advanced Controls, please mention it in the ticket. All customers are entitled to 30-day free trial license. New licenses will be issued within 2-3 business days.
j. To get started with WebClient 1.8, you can use the trial version.
Please note that the upgrade procedures will not work with Eclipse that you installed from WebClientLive.
A: You need to delete the old WebClient Plugin from Eclipse/plugins folder and replace it with the latest WebClientPlugin builder.
A: Create a license folder anywhere you want. Copy both adclsdt.dat and genlicense.lic to the new folder. Browse to the license folder if prompted in Eclipse to enter your license.
A: Send a support request for ISV server license on our support website and provide the gen ID, licensee name and issuer name in the ticket description. Click here on how to get the generator id. After you receive the license.lic from our support team, you can apply the server license by setting the license file path in the WebClient.properties file.
licensingserver.licensefile=<path to the license.lic file with forward slashes>
For example:
licensingserver.licensefile=C:/WebclientLicense/developer.lic
Note: if you have a # in front of the property, remove it to enable the property.
A: Check your Tomcat project folder in your <workspace directory>\.<server path>\<deploy path>\<context path>\WEB-INF\lib.
Server path is usually set to .metadata\.plugins\org.eclipse.wst.server.core\tmp0.
Deploy path is usually set to wtpwebapps.
Context path is usually set to the name of your web project.
A: Create a page template, for example: locale-page.wcli on your custom template project. In your locale-page.wcli file, it should have something like the following.
/(!djConfig) locale:'fi-fi', /(!djConfig)
Above is the example for setting locale in Finnish. Remember to add a new triple in your function to apply the new page template.
myFunction is a FNC
~WebShell customPage is a FNC
~WebUI
myFunction is a FNC
customPage customPage impl name
locale
A: Go to Run → Run Configurations… → Select Java Application → Click New launch configuration.
In the Main tab window, browse and select your java project (the project that has your java source files). For the main class, search for ObRun.ObPanel.ObLaunch and click Apply.
Open Arguments tab window → In the Program arguments field, enter your function entry point in the format of <package name>.<function implementation name> “Path= “ → Click Apply → Click Run.
For example: WXPCOURSE60.WXuF “Path= “
A: Edit file /conf/server.xml and add to the HTTP Connector configuration like below.
compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml,application/json"
An example of an HTTP Connector configuration with compression enabled could be:
<Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml"/>
A:Go to your Eclipse directory -> Confiuration folder -> .settings folder and delete com.cmfirsttech.webclient file.
A: Set the control name of the time edit field to <control name>:MainArea:template=DojoTimePicker:default.
A: Add TreeView pattern from WebClient advanced control as you would for WebTreeView. The Java bean class in the panel properties should be set to WebAccordionTree.
A: WebFilteringSelect.ctrl is similar to WebCombo.ctrl except that user may enter more than one character in the input field. Set the control name of the combo box to <control name>:MainArea:template=WebFilteringSelect:escapChar=3:default.
escapChar can be customized to any number you like. The number represents how many character you enter before the combo box display the list based on the character you enter.
A: WebGridExport is used to export a grid to a CSV file format. First, you need to upgrade to the latest WebClient group model. Second, you need to add WebExportGrid to your function inheritance path.
A: WebGridFilter.ctrl is used to filter the data of a grid based on one of its column values. To use this control you will need to create two fields: one combo field and one edit field. Set the control name of the combo box to <controlname>:<attachpoint>:template=WebGridFilter:GridId=Grid1P:TextId=filterContains:default.
GridId should be set to the control name of the grid. TextId should be set to the control name of edit field.
The edit field control name should be set to filterContains:<attachpoint>. The control name should match the TextId in the combo box.
At runtime the combo box will list all the avaliable columns in the grid, the data of the grid will be filtered according to the text you enter in the edit field and the selected column in the combo box.
A: WebURLGrid.ctrl is a prototype control that is used to convert data in the grid column to a URL with the text "Link". The control name of the column heading will need to be set to <control name>:Grid1P.ColumnsArea:template=WebURLGrid:<ColumnsHeadingText>
A: LiteralHTML.ctrl is used to run hard-coded HTML that is entered in the Plex panel text property. The control name of the field should be set to <controlname>:MainArea:template=LiteralHTML:default.
A: The control name of the grid should be set to Grid1P:MainArea:ColumnToggling=Yes:default.
A: WebLogMessages should not be used in combination with WebMessages. Create a new function in your Plex local model like follows.
WebLogMsg is a FNC
WebShell.
WebLogMsg impl name NME
WebLogMessages.
A: See this link http://www.caplexwebclient.cmfirstgroup.com/?p=589
3. Set the value of your field with a valid URL, for example in this test case we will open the default Google main page:
A: ObClient.properties: To externalize this file you can use the webclient.plex.propertyfilename entry in your WebClient.properties file to define the location of the ObClient.properties, example:
webclient.plex.propertyfilename=C: /Properties /obclient.properties
WebClient.properties: To externalize this file you must configure the web.xml file of your Web project to add a new parameter called webclient.proppath and the value will be the path to your WebClient.propertiesfile, you can do this either using a init-param tag or a context-param tag, example:
<init-param>
<param-name>webclient.proppath</param-name>
<param-value>C: /Properties /WebClient.properties</param-value>
</init-param>
<context-param>
<param-name>webclient.proppath</param-name>
<param-value>C: /Properties /WebClient.properties</param-value>
</context-param>
A: Try removing your web project from your Tomcat server and publish and then add the web project back to the server and republish.
A: Make sure that your function works in Java Swing. If it is not working in Java Swing, check if your Eclipse is using the correct JDK version. You should be using JDK 1.6 or higher.
A: If you are using PlexResource folder to store your Plex .panelresource or .resource files, the PlexResource folder should set as a source folder. To set your PlexResource folder as a source folder:
A: There are several things that may have caused this error. It could be that you are missing server functions or a JAR file. First, check the entry point in webclient.properties if it is correct. Second, check the servlet log. The servlet log folder can be found in WebClient.properties. Third, if there is no additional information on the log, we recommend that you run your application in Java Swing (See how do I run my application in Java Swing using Eclipse).
A: A web application has no way of knowing if any windows are open with the same session ID, so this situation can't be always avoided. However, the following recommendations will suffice in practice.
1. Do not have the users bookmark the WebClient servlet directly. Instead, launch the application from a menu or a portal page.
2. When launching the WebClient application, use a targeted anchor window reference to avoid opening the servlet in multiple windows/tabs at the same time, and also to disable the back button. More information: http://graphcomp.com/info/specs/target.html
3. For additional protection, define a Plex right-click context menu. The user will not see the "Open link in new tab" option, and the developer can provide the user more appropriate actions to take.
Again, this will not bullet-proof the case where the curious user is going into the address bar and copy/pasting the URL, or doing other kinds of experimentation. However, in practice, this should handle the normal uses of the application.
A: For Tomcat 6: locate the relevant Context element in either server.xml or in the context descriptor and declare the no-op session manager.
<Context .. > <Manager pathname="" /> </manager></context>
For Tomcat 7, turn off this feature in Tomcat by uncommenting the following in your webapp's context.xml
<Manager pathname="" />
A: Two items to check in Plex panel properties.
A: That means the function that you are calling requires an input parameter.
A: Restarting Eclipse would usually fix the issue.
A: The movement of the PopUp functions depends of the size of the BODY element from the document and if these values are not defined then the PopUp functions will not move, the default styles of WebClient do not include CSS code to define the BODY size, so you must be sure to add CSS code for the BODY element in your custom CSS file, if you don't know how to achieve this, please try these steps:
-Create a custom CSS file for your application(see the following article How to Customize CM WebClient StyleSheet)
-Add the following CSS code to your custom CSS file:
html {
height: 100%;
width: 100%;
}
body{
height: 100%;
width: 100%;
}
body form {
height: 100%;
width: 100%;
}
A: After the release of WebClient 1.8.5 there have appeared some problems with the license, here are some common things to check in order to solve these issues(Be sure to remove any previous license you had, if you not know how to achieve this you can see the following article "How do I remove an existing genlicense file setting from Eclipse workspace"):
A: WebClient i+ Mobile is free to download at http://code.google.com/p/webclient-mobile-for-ca-plex/.
A: For more information about WebClient i+ Mobile support, please contact John Rhodes.
A: All functions have to inherit from ~WebShell just like standard WebClient. All field control names have to be set in Plex panel properties.
How to set it up in Eclipse workspace:
resurl.com.cmfirsttech.webclientmobile=<web context>
A: By default, you need to set control name to all of edit fields in order to set the control name to the label fields. Please see below for examples.
To display Address edit and label fields, set the control name of the edit field to
myAddress
The control name of label field should be set to
myAddressLbl:myAddress.Label.
Another way to specify the label of the field is to set the control name of the edit field as follows.
myAddress:MainArea:label=Address
You do not need to specify the control template for edit, password, combo, multilineedit, and checkbox fields. If you choose to specify a control template used or customize a WebClient i+ Mobile control, you will need to specify the area after the control name.
To display a date field with a date picker, set the control name of the edit field to
myDate:MainArea:template=DatePicker
To display numeric field with spinner control, set the control name of the edit field to
myNumber:MainArea:template=WebSpinnerEdit
If you choose to modify the width of label, set the control name of the label field to
myAddress:myAddress.Label:width=70%.
By default, the width is set to 40%.
To position edit fields in a fieldset, set the control name of the edit field to
myAddress:MainArea:fielset=Info
To position two edit fields on the same row, set the control name of the first edit field to
myPrice
set the control name of the second edit field to
myTotal:myPrice.Extra
To specify a decimal point for a numeric field, set the control name of the edit field to
myPrice:decimal=2
There are two ways to modify the height of multiline edit control.
1. If you choose to modify the rows of multiline edit field, set the control name of the edit field to
myAddress:MainArea:maxRows=10
2. If you choose to automatically size the height of the control, set the control name of the edit field to
myAddress:MainArea:autoExpand
To position button on the toolbar area, set the control name of the button to
Next:ToolbarArea:ui=confirm-round:align=right
For details on ui options to use, please check Sencha Touch 1.1 documentation.
To set control name for grid by grouping based on the first column of the grid, set the control name to
Grid1P:FullscreenArea:grouped=true:indexBar=false
A: Enabling GZIP compression on the web server increases the response time from the server because the response is first compressed and then send to the client.
A: Delete com.cmfirsttech.webclient.prefs file from eclipse installation dir/configuration/.settings folder.
A: Yes, it is. You can set the WebClient.properties file path in the web.xml of your server by adding the following context parameter. The param-name is webclient.proppath and the param-value should be set to the file path.
<context-param>
<param-name>webclient.proppath</param-name>
<param-value>C:\Temp\WebClient.properties</param-value>
</context-param>
See Tomcat Documentation on setting context parameter. https://tomcat.apache.org/tomcat-8.0-doc/config/context.html#contextparameters
A:This feature is for advanced developer only. You can specify multiple class or package names using userclassexceptionlist property in WebClient.properties file. For example:
userclassexceptionlist = com.mycustompackage,org.Customclass
We do not support wildcard.
A:The Loader widget is used to indicate when some XML HTTP REQUEST is going on via topics, to implement this you must create a custom page template that include the following:
-The call to the Loader class: dojo.require("dojox.widget.Loader");
-A div element that uses the Loader class: <div dojoType="dojox.widget.Loader"></div>
Here is a simple example of a custom template that implements this Loader widget:
/(!JSInit:once)
dojo.require("dojox.widget.Loader");
/(!JSInit)
/(!MainArea)
<div dojoType="dojox.widget.Loader"></div>
/(!AttachPoint:name=MainArea)
/(!MainArea)
A: CM WebClient Compatibility Matrix and SysTemplate Support
https://support.ca.com/us/product-information/ca-plex.html?d=t&type=Knowledge?d=t&type=Knowledge
A:Add the following CSS code in your CSS custom file(If you don't know how to add a custom CSS file please follow this guide How to Customize CM WebClient StyleSheet):
.dojoxGrid-cell span{
white-space: normal !important;
}
A: In WebClient you cannot execute actions in the initialize subroutine because this subroutine is executed before the page is loaded, if you need the execute an action when the page loads you can achieve that by creating a custom template that execute a physical event in Plex when the page is loaded, then you can add the custom code to trigger the action you need in that event, here is an example of how to do this:
/(!JSOnLoad)
/(!AJAXDoEvent:phys=Modified)
/(!JSOnLoad)
<input type="hidden" name="/(!NameID)" id="/(!NameID)" value="/(!This)">
/(!EnableAction:SetValue,SetState,SetFocus)
/(!JS)
/(!Action:SetValue)
document.getElementById("/(!NameID)").value=/(!This);
/(!Action)
/(!JS)
A: The WebGrid.ctrl has an action that allows you to modify the column heading at runtime, to use this you must follow these steps:
com.adcaustin.webclient.ctrl.WebObGridData gridctl = (com.adcaustin.webclient.ctrl.WebObGridData) (Object) ObUserAPI.getControlByName(getFunction(), new ObCharFld("*Current"), &(3:).toString()).getData();
org.json.JSONObject values;
try {
values = new org.json.JSONObject();
values.put("colIndex", &(1:).toString());
values.put("newHeading", &(2:).toString()); } catch (org.json.JSONException ex) {
throw new RuntimeException(ex);
}
gridctl.processAction("ChangeColumnHeading", values);
A: You can generate source codes in Plex to Encrypt/Decrypt the data you need, for example you may want to encrypt the value of a field that will be stored in a cookie so the clients cannot see that value at runtime using the browser console, then you will also need decrypt the value of that cookie anytime you need that value in the server side, here are some examples of source codes that you can use for both cases:
IMPORTANT: The code used in this example only works in Java 8, you may need to modify this code in order to work in other versions of Java
ENCRYPT SOURCE CODE
import java.security.Key;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import java.security.MessageDigest;
{
String strData = &(1:).toString();
String strKey = &(2:).toString();
String EncryptedText = "";
MessageDigest sha = null;
try
{
byte[] key = strKey.getBytes("UTF-8");
sha = MessageDigest.getInstance("SHA-1");
key = sha.digest(key);
key = Arrays.copyOf(key, 16);
SecretKeySpec secretKey = new SecretKeySpec(key, "AES");
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, secretKey);
EncryptedText = Base64.getEncoder().encodeToString(cipher.doFinal(strData.getBytes("UTF-8")));
&(3:).fromString(EncryptedText) ;
}
catch (Exception e)
{
System.out.println("Error while encrypting: " + e.toString());
}
}
DECRYPT SOURCE CODE
{
String strData = &(1:).toString();
String strKey = &(2:).toString();
String DecryptedText = "";
MessageDigest sha = null;
try
{
byte[] key = strKey.getBytes("UTF-8");
sha = MessageDigest.getInstance("SHA-1");
key = sha.digest(key);
key = Arrays.copyOf(key, 16);
SecretKeySpec secretKey = new SecretKeySpec(key, "AES");
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5PADDING");
cipher.init(Cipher.DECRYPT_MODE, secretKey);
DecryptedText = new String(cipher.doFinal(Base64.getDecoder().decode(strData))) ;
&(3:).fromString(DecryptedText);
}
catch (Exception e)
{
System.out.println("Error while encrypting: " + e.toString());
}
}{
String strData = &(1:).toString();
String strKey = "CM1";
String DecryptedText = "";
MessageDigest sha = null;
try
{
byte[] key = strKey.getBytes("UTF-8");
sha = MessageDigest.getInstance("SHA-1");
key = sha.digest(key);
key = Arrays.copyOf(key, 16);
SecretKeySpec secretKey = new SecretKeySpec(key, "AES");
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5PADDING");
cipher.init(Cipher.DECRYPT_MODE, secretKey);
DecryptedText = new String(cipher.doFinal(Base64.getDecoder().decode(strData))) ;
&(2:).fromString(DecryptedText);
}
catch (Exception e)
{
System.out.println("Error while decrypting: " + e.toString());
}
}
Here is an example of how you can implement this in a Plex function: