TO DO

This section is incomplete and will be concluded as soon as possible.

1 Catalogued SQL

2 Javascript functions

3 Globals

4 Form events

Allows to execute logic by form level.


Event type Execut JS when...
Before Input Click on the button which has reset form function.
Before Insert Click on insert register button before executing INSERT sentence.
Before Update Click on modify button register before executing UPDATE sentence.
Before Delete Click on delete button register before executing DELETE sentence.
On Load Browser loads the form.
On Unload Focus leaves the page (which contains the form).

5 Field events

Allows to execute logic to level all fields of the forms.

It is needed to indicate the field where JS has been executed when the event has done.

Event type Executes JS when...
Reset Click button used to reset the form.
On Focus Focus enters on the field.
On Blur Focus leaves the field.
On Change Focus leaves the field and value is modified.
On Click Click on field.

6 Field format

In this section is explained how to format, real time, user input in a form field. As a user types something into an input field the value will be adjusted automatically, adding things like punctuation and dashes or removing unexpected characters.

This approach can greatly facilitate users when entering form data. It makes the process easier, minimizes errors, gives feedback, and generally improves the user experience.

6.1 Implementation

To begin with, field format is handled by the Field attributes (wic_jdic_colattr) entity. In first place, it must be considered that Axional Studio Forms automatically apply right space trimming. On second hand, changing the word-casing is managed by the attribute Letter case from the mentioned Field attributes settings. On third place, more complex formats are achieved by implementing a piece of script named format function.

6.1.1 Format function

Format functions are implement in Javascript language.

Code reuse

The definition of format functions itself allows allows code reuse by defining a function and assigning it to different columns. But sometimes the function might require input parameters which can be different depending on the form the function is invoked. In that cases, the function can be defined in Client side library repositories (wic_jrep_form_import_js) and be invoked from each format function specifying the specidic parameters for each object.

6.2 Execution

7 Field validation

TO DO

This section is incomplete and will be concluded as soon as possible.

8 Actions

Form Actions can be triggered from Client Side calling the JS function executeFormAction(action_code).

Copy
executeFormAction("ACTION_REFRESH_CURSOR");

As the action is not called from a server object, some functionalities will not work when calling a form action with a JS function, like these:

  • Icon and Style of the action have no sense when calling form action from Client Side
  • Update mode will not work if it is "Refresh Box", in this case the "Refresh row" mode will be applied

Also, form actions will not work in these situations:

  • When an action is called from Client Side, the data will come from the closest sql statement:
    • If the statement match with the adapter the call will be executed correctly
    • Otherwise, if the action has references to data the call will not work because it is not known which is the closest statement
  • When an action has an Iteration statement defined, it will not execute correctly

Action constraint

Like on Server Side, only actions of the current JRep Object can be executed.

9 Pre-defined functions

More info

10 Import of Javascript code

10.1 Main box

Menu path:
[SOAPException: faultCode=SOAP-ENV:Client; msg=Deployment error in SOAP service 'urn:SOAPDOCServer': class name 'deister.webstudio.core.services.soap.serializers.ElementSerializer' could not be resolved as a serializer: deister.webstudio.core.services.soap.serializers.ElementSerializer] at deister.axional.docs.xsl.CMSSOAPClient.__doSOAPCall(CMSSOAPClient.java:102) at deister.axional.docs.xsl.CMSSOAPClient.getDictionaryObjectData(CMSSOAPClient.java:197) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:343) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:440) at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:222) at org.apache.xalan.transformer.TransformerImpl.extFunction(TransformerImpl.java:475) at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:208) at org.apache.xpath.objects.XRTreeFragSelectWrapper.execute(XRTreeFragSelectWrapper.java:69) at org.apache.xpath.XPath.execute(XPath.java:337) at org.apache.xalan.templates.ElemVariable.getValue(ElemVariable.java:280) at org.apache.xalan.templates.ElemVariable.execute(ElemVariable.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394) at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:711) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253) at deister.axional.server.lang.xsl.XSLProcessor.__execute(XSLProcessor.java:862) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:699) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:691) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
[SOAPException: faultCode=SOAP-ENV:Client; msg=Deployment error in SOAP service 'urn:SOAPDOCServer': class name 'deister.webstudio.core.services.soap.serializers.ElementSerializer' could not be resolved as a serializer: deister.webstudio.core.services.soap.serializers.ElementSerializer] at deister.axional.docs.xsl.CMSSOAPClient.__doSOAPCall(CMSSOAPClient.java:102) at deister.axional.docs.xsl.CMSSOAPClient.getDictionaryObjectData(CMSSOAPClient.java:197) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:300) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:440) at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:222) at org.apache.xalan.transformer.TransformerImpl.extFunction(TransformerImpl.java:475) at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:208) at org.apache.xpath.objects.XRTreeFragSelectWrapper.execute(XRTreeFragSelectWrapper.java:69) at org.apache.xpath.XPath.execute(XPath.java:337) at org.apache.xalan.templates.ElemVariable.getValue(ElemVariable.java:280) at org.apache.xalan.templates.ElemVariable.execute(ElemVariable.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394) at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:711) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253) at deister.axional.server.lang.xsl.XSLProcessor.__execute(XSLProcessor.java:862) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:699) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:691) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
[SOAPException: faultCode=SOAP-ENV:Client; msg=Deployment error in SOAP service 'urn:SOAPDOCServer': class name 'deister.webstudio.core.services.soap.serializers.ElementSerializer' could not be resolved as a serializer: deister.webstudio.core.services.soap.serializers.ElementSerializer] at deister.axional.docs.xsl.CMSSOAPClient.__doSOAPCall(CMSSOAPClient.java:102) at deister.axional.docs.xsl.CMSSOAPClient.getDictionaryObjectData(CMSSOAPClient.java:197) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:300) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:440) at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:222) at org.apache.xalan.transformer.TransformerImpl.extFunction(TransformerImpl.java:475) at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:208) at org.apache.xpath.objects.XRTreeFragSelectWrapper.execute(XRTreeFragSelectWrapper.java:69) at org.apache.xpath.XPath.execute(XPath.java:337) at org.apache.xalan.templates.ElemVariable.getValue(ElemVariable.java:280) at org.apache.xalan.templates.ElemVariable.execute(ElemVariable.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394) at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:711) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253) at deister.axional.server.lang.xsl.XSLProcessor.__execute(XSLProcessor.java:862) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:699) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:691) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
[SOAPException: faultCode=SOAP-ENV:Client; msg=Deployment error in SOAP service 'urn:SOAPDOCServer': class name 'deister.webstudio.core.services.soap.serializers.ElementSerializer' could not be resolved as a serializer: deister.webstudio.core.services.soap.serializers.ElementSerializer] at deister.axional.docs.xsl.CMSSOAPClient.__doSOAPCall(CMSSOAPClient.java:102) at deister.axional.docs.xsl.CMSSOAPClient.getDictionaryObjectData(CMSSOAPClient.java:197) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:300) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:440) at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:222) at org.apache.xalan.transformer.TransformerImpl.extFunction(TransformerImpl.java:475) at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:208) at org.apache.xpath.objects.XRTreeFragSelectWrapper.execute(XRTreeFragSelectWrapper.java:69) at org.apache.xpath.XPath.execute(XPath.java:337) at org.apache.xalan.templates.ElemVariable.getValue(ElemVariable.java:280) at org.apache.xalan.templates.ElemVariable.execute(ElemVariable.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394) at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:711) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253) at deister.axional.server.lang.xsl.XSLProcessor.__execute(XSLProcessor.java:862) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:699) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:691) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)

10.2 Example

The following example shows how to automatically inform the email field of the employee form by entering the first and last name. To do this, a Javascript function will be defined that will be cataloged and assigned to the employees object.

To start, you have to define the javascript function that you want to import. In this case, it would be as follows:

  • Code: emailfromname

  • Description: Email from name

Definition of the function:

Copy
function emailfromname(firstname, lastname, database) {
    return firstname + '.' + lastname + '@' + database + '.com';
}

Once the javascript function that you want to import has been defined and selected, you must go to the section 'Events' where the sentence that will be executed by the javascript will be defined, in this case, each time the focus of the javascript is removed. the column 'firstname'.

For this, in 'Colname' you have to put 'firstname' and the definition of the event will be as follows:

Copy
var m_email = emailfromname(getFieldValue("employee.firstname"),
              getFieldValue("employee.lastname"),getDbms());
var m_curr_email = getFieldValue("employee.email");
if(m_curr_email===''){
   setFieldValue("employee.email",m_email);
}

Now in the form 'employee' if the user wants to insert a new employee.


By filling in the sections 'name' and 'last name', you will automatically receive an email, also using the database in which the form is located.



In the same way, the JavaScript function will be imported into the form 'client'. In old versions, Form only allows import one JS functions file. Current version was improved to support more than one.

Old version. It has been deprecated.

Actual version.


In this case, in the event it will be indicated that the function is executed when the focus of the column 'surname' is removed and the sentence will be as follows:

Copy
var m_email = emailfromname(getFieldValue("customer.firstname"),
              getFieldValue("customer.lastname"),getDbms());
var m_curr_email = getFieldValue("customer.email");
if(m_curr_email===''){
   setFieldValue("customer.email",m_email);
}

Now, as in the employee form, when the 'name' and 'surname' fields are filled in, the field 'email' will automatically be informed.


The import of JavaScript code into forms is done starting from the premise that the code will be assigned to more than one form. Cataloging a Javascript for a single form is meaningless, since it can be included directly in the form itself.