|
| Copyright © Cloud Software Group, Inc. All Rights Reserved |
By default, all the text that appears in the form definition is treated as one large block of text with spacing preserved and carriage returns between the lines. Where fields appear in the iProcess Modeler Form, one or more HTML elements will be inserted into that block of text. By default, this block of HTML is enclosed inside an HTML <pre> tag. This preserves all whitespace in the form, including multiple spaces and line feeds. It also limits fonts to monospaced fonts.Pre-formatting could interfere with the appearance of some types of HTML you embed. If it does, the pre-formatting can be disabled by including the HTML comment “<!-- DISABLE PRE -->” anywhere in the form definition. When that comment is detected, the HTML <pre> tag will not be placed around the HTML for the form. If there are some isolated sections of your form that still need to be pre-formatted, <pre> tags can be added where needed in the form definition.Where the iProcess Modeler Form definition includes IF / ELSE / ENDIF conditions, the blocks affected by a condition are enclosed in an HTML <span> tag. Make sure that any opening and closing HTML tags that you add nest properly with these. For instance, you should not put a <B> tag on the line before an IF statement and the matching </B> tag on the line right after the IF. You could, however, put the matching </B> tag after the ENDIF.Two .js files are imported into the page generated for an iProcess Modeler Form:
• spddate.js - Contains functions for date, time, and numeric data conversions.
• spdform.js - Contains functions for accessing the work item / case data and performing other interactions with the iProcess Modeler Forms.Comments inside of spddate.js describe the available functions. The file also contains many private variables and functions. The names of these private variables and functions all begin with the text “_private”. You should not call or access these private items as they are subject to change or removal in future versions.Comments inside of spdform.js describe the functions that are available for use from scripting. The ones that are specifically for use with HTML embedded directly into the form definition are labeled with the text “Supported in Client Scripting”. Do not use other functions in the file as they are only for use with file-cache customizations, or are private functions that are subject to change or removal in future versions.
• spdSetFieldValue(fieldName, fvalue, spdFormat, spdPreDecimalDigits)
• spdGetFieldValue(fieldName, spdFormat, getInitialValue)
•
• spdIsFieldValid(fieldName)
• spdGetFieldErrorMsg(fieldName)
• spdSetFieldNotificationFunction(fieldName, notificationFunction)Use the spdSetFieldValue() and spdGetFieldValue() functions to get and set the values of any work item or case fields whether or not the field is included as a marking. Any change to the field value through these functions will update the information displayed in marking controls on the form.Separate functions (spdGetWorkItemTag() and spdGetProcTag()) exist for retrieving the work item tag and procedure tag, since these are not actually accessible as case fields.The spdIsFieldValid() function returns false if invalid data is entered on the form for a field, for example, a date with a value of “13/13/2006”. When the field data is not valid, the field error message will contain a text description of the problem.The spdSetFieldNotificationFunction() function lets you specify a function to be called when the value of the specified field changes. The function will also be called during initialization of the form if the form includes a marking for the field (including hidden or embedded markings).The appearance of the various marking controls is set through a cascading style sheet named spdform.css. You should not directly alter this file, but can include styles to override the values directly in your form definition or add a reference to an additional CSS file to override settings.
• SPD_CONTAINER - Style for an area containing the entire iProcess Modeler Form. Used to create a border, padding default color and font information.
• SPD_MARKING_REQ - Style applied to input controls (text input or select) for required markings.
• SPD_MARKING_OPT - Style applied to input controls (text input or select) for optional markings.
• SPD_MARKING_EMBEDDED - Style applied to embedded marking data.
• SPD_MARKING_READONLY - Style applied to read-only marking data.
• SPD_MEMO_BUTTON_REQ - Style applied to memo buttons for editing required memo fields.
• SPD_MEMO_BUTTON_OPT - Style applied to memo buttons for editing optional memo fields.
• SPD_MEMO_BUTTON_READONLY - Style applied to memo buttons for displaying read-only memo fields.
• SPD_MESSAGE - Style applied to a message area that could appear at the top of the form (rarely shown).
• SPD_BUTTON - Style applied to the buttons used to trigger the undo, keep, and release actions.
• SPD_HELP - Style applied to area/link for displaying field help.
• SPD_CALENDAR - Style applied to the area/link for displaying the popup calendar.
• SPDCAL_CONTAINER - Style for an area containing a popup calendar (used to set border/padding/ default color/font).
• SPDCAL_PREV - Style for the area/link for going to the previous year and month.
• SPDCAL_NEXT - Style for the area/link for going to the next year and month.
• SPDCAL_HEADER - Style for the heading areas displaying the year and month name.
• SPDCAL_WEEKDAYS - Style for the area displaying the abbreviated day names.
• SPDCAL_ACTIVEDAY - Style for all selectable days from the displayed month.
• SPDCAL_INACTIVEDAY - Style for all the non-selectable days before/after the display month.
• SPDCAL_SELECTEDDAY - Style for the currently selected day (or current date if none was already selected).The file IPCBrowserExamples.xpdl contains several example procedures illustrating embedded HTML. This file is located in the following directory:InstallationHomeDir\iprocessclientbrowser\samples\IPCBrowserFormExampleswhere InstallationHomeDir is the directory in which the installer places administrative files, such as the uninstaller, documentation, and sample code. This defaults to C:\tibco on Windows systems, and /opt/tibco on UNIX systems, but can be specified as a different directory when the iProcess Workspace (Browser) is installed.
• An input control of the type “checkbox” is included for each field. The onclick event of the check box calls the function spdSetFieldValue() with the appropriate value for the current checked state of the control.
• A notification function is defined and is registered with the spdform.js code using the function spdSetFieldNotificationFunction().The TABFIELD example creates a set of tabs using HTML <span> elements. Clicking on the tabs will change the value of a hidden field, which in turn causes different conditional sections of the form to be displayed.The CSSCHGS example shows changing the appearance of the iProcess Modeler Form through a <style> tag embedded in the form definition.
|
| Copyright © Cloud Software Group, Inc. All Rights Reserved |