Skip to main content
Mitratech Success Center

Client Support Center

Need help? Click a product group below to select your application and get access to knowledge articles, webinars, training content, and release notes or to contact our support team.

Authorized users - log in to create a ticket, view tickets status and check your success plan details.

 

Manual Conversion Suggestions

This section contains suggested approaches for manual editing of code that could not be handled by the automated conversion tool. Such code will be noted in the log file ManualConversionLog.txt, which is produced during the execution of the automated conversion tool.

JavaScript Conversions

DOM: Form name conversion

The document object model consisted of the following naming conventions:

2.x: document.bodyform.EO__Name__STR and document.forms['bodyform'].EO__Name__STR

3.x: document.forms['mainForm'].EO__Name__STR

which must be renamed to for 4.x and 5.x

document.forms['mainForm'].elements

System fields name conversion

Binding to system fields and usage of system fields in Javascript will require edits. For example,

EO__NumberString__STR

must become

enterpriseEntity.idNumber

Also, you must check for changes in field names in the object model. For example the version 2.x field numberString became idNumber in later versions.

Custom fields name conversion

In 2.x custom field names were formatted as:

EO__Detail_{category}__{fieldType}_{fieldName}__{paramType}

In 4.x these must be formatted as:

command_categories[category]_customFields[fieldName]_value

So in the example below, custom field name

EO__Detail_OPPS__DetailNumbValue_PlAcOCReserveChange__DBL

will become

command_categories[OPPS]_customFields[PlAcOCReserveChange]_value

Access to elements in a form, in Javascript, must be rewritten like this:

document.bodyform.EO__Name__STR.value

becomes

document.forms['mainForm'].elements['applicationEntity.name'].value

i.e. document.bodyform becomes document.forms['mainForm']

Another example:

document.forms['bodyform'].EO__Detail_LITP_OUTC__DetailTextValue_InvAccrual5__STR.value

becomes

document.forms['mainForm'].elements['command_categories[LITP_OUTC]_customFields[InvAccrual5]_value'].value

Common Javascript method conversions

Calls to Javascript methods in TeamConnect 2.x required referencing the "top" frame. However, in TeamConnect 3.x, 4.x, 5.x and 6.x, frames do not exist. Thus, all references to the "top" frame must be removed in calls on Javascript functions and variables.

Translating references to top.submitCommand()/invokePageDetailAction() in Tools

In 2.x and 3.x versions, you might see a reference to the submitCommand(...) and invokePageDetailAction functions, which allowed implementers the ability to call methods with or without parameters in page details, as shown in the following examples:

top.submitCommand('_self', 'anchor', 'PD', 'clickEntityCheck(*STR, *STR)', 'checkName', 'entityValue');

invokePageDetailAction(this, 'anchor', 'clickEntityCheck(*STR, *STR), 'checkName', 'entityValue');

top.submitCommand('_self', 'anchor', 'PD', 'generate()'); invokePageDetailAction(this, 'anchor', 'generate()');

While 3.x CJBs using the invokePageDetailAction continue to work, you can use the invokeToolAction function in any new 4.x and 5.x CJBs.

For example, the following examples execute a 4.x and 5.x tool action:

invokeToolAction('action')

invokeToolAction('actionWithArguments', arg1, arg2)

In addition to executing a 4.x and 5.x tool action, you can also indicate the HTML element for the code to focus on once the page reloads, as shown in the following examples:

invokeToolActionAndAnchor('anchor', 'action')

invokeToolActionAndAnchor('anchor', 'actionWithArguments', arg1, arg2)

Translating references to top.submitCommand()/invokeBlockAction() in CJBs

In 2.x and 3.x versions, you might see a reference to the invokeBlockAction function, as shown in the following examples:

top.submitCommand('_self', 'anchor1', 'PD', 'invokeBlockAction(STR, STR)', 'invokeBlockActionCjb', 'argument');

invokeBlockAction(this, 'anchor1', 'invokeBlockActionCjb', 'argument');

While 3.x CJBs using the invokeBlockAction function continue to work, you can use the invokeCustomAction function in any new 4.x, 5.x, 6.x CJBs.

For example, the following examples execute a 4.x block action:

invokeCustomAction(this, 'cjb', 'action')

invokeCustomAction(this, 'cjb', 'actionWithArguments', arg1, arg2)

In addition to executing a 4.x and 5.x block action, you can also indicate the HTML element for the code to focus on once the page reloads, as shown in the following examples:

invokeCustomActionAndAnchor(this, 'anchor', 'cjb', 'action')

invokeCustomActionAndAnchor(this, 'anchor', 'cjb', 'actionWithArguments', arg1, arg2)

Remove occurrences of top.didChange and top.didChangeText()

All occurrences of top.didChange and top.didChangeText should be removed. In 2.x these are used to enable/disable buttons like Save, or Save & Close. In 3.x and 4.x these are no longer needed.

<tc:newRecordLink..> conversion review

The tc:newRecordLink tag is a 3.x, 4.x, 5.x and 6.x autoconversion of the 2.x Javascript method 

openPageWithKeyAndArgs(...).

openPageWithKeyAndArgs in 2.x

For example:

<a onClick="top.openPageWithKeyAndArgs('NEW_PROJECT_WIZARD_OBJECT', '{ wizard = ADVICE; application = ADCO; isFromMatter=1; embeddedObject=RADC; parentKey = 3}');">

New Advice And Counsel

</a>

is converted by the automated conversion tool to newRecordLink tag:

<tc:newRecordLink entityCode="ADCO" entityToLink="${enterpriseEntity}" pageArgs="{ isFromMatter=1; embeddedObject="RADC"; parentKey = 3}" wizardUniqueKey="ADVICE">

New Advice And Counsel

</tc:newRecordLink>

Here is the conversion of attributes from openPageWithKeyAndArgs to tc:newRecordLink:

{ wizard = ADVICE; application = ADCO; isFromMatter=1; embeddedObject=RADC; parentKey = 3}

will become

pageArgs="{ isFromMatter=1; embeddedObject="RADC"; parentKey = 3}"

  • application value is used as value for entityCode attribute.
    entityCode="ADCO"
  • wizard value is used as value for wizardUniqueKey attribute.
    wizardUniqueKey="ADVICE"
  • Other arguments become attribute values in pageArgs.
  • New attribute entityToLink value should be set to ${enterpriseEntity}
Dynamic content conversion

In certain screens dynamic content is rendered by invocation of methods using tags. The following code dynamically renders a call to openPageWithKeyAndArgs.

<tc:component componentType="WOString" value="${cjb.getWizardHref}" />

where getWizardHref() returns:

<a onClick="top.openPageWithKeyAndArgs('NEW_PROJECT_WIZARD_OBJECT', '{ wizard = ADVICE; application = ADCO; isFromMatter=1; embeddedObject=RADC; parentKey = 3}');">

New Advice And Counsel

</a>

In the previous example, tc:component can rewritten as the tc:newRecordLink tag in 3.x, 4.x and 5.x.

Other Conversions

<CLProjectTitle..> conversion:

There is no equivalent tag for the 2.x <CLProjectTitle..> in 4.x, 5.x, and 6.x. This needs to be manually handled in the screens.

An equivalent title can be displayed by writing a method in the CJB:

public String getProjectTitle(){

return platform.getInternationalizationService().getObjectTitle(project);

}

...and then invoking that method in XML with the tc:out tag, like so:

<tc:out value="${cjb. projectTitle}"/> 

  • Was this article helpful?