Skip to main content

Hello. I am wondering if a Uniface Javascript module, package or library exists.

I am doing an internship and I am writing a Javascript application in which I would like to use Uniface's javascript API.


In javascript you can import modules like so: 

import module from 'module'


does something like this exists for Uniface?

Hello. I am wondering if a Uniface Javascript module, package or library exists.

I am doing an internship and I am writing a Javascript application in which I would like to use Uniface's javascript API.


In javascript you can import modules like so: 

import module from 'module'


does something like this exists for Uniface?

Quick and dirty:Yes 🙂

https://documentation.uniface.com/09/uniface/integration/Java/tasks/useJavaCallinAPI.htm



Hi Ingo,


Java and JavaScript are two different languages.

JavaScript is used in HTML.

Java runs on its own.


Norbert


Hi Norbert

Sorry, did only see the buzzword "java" 🙂

Ingo


Oh that is Java not Javascript but do you think the same name (com.compuware.uniface) would work in javascript?


I have found that a Javascript API exists, I just have no idea how I can import it into my javascript program. The program I am writing is a seperate javascript program, that is not being built in Uniface. I simply wish to import Uniface's Javascript API in the program.


Hello. I am wondering if a Uniface Javascript module, package or library exists.

I am doing an internship and I am writing a Javascript application in which I would like to use Uniface's javascript API.


In javascript you can import modules like so: 

import module from 'module'


does something like this exists for Uniface?

What about this videos ?


Hello. I am wondering if a Uniface Javascript module, package or library exists.

I am doing an internship and I am writing a Javascript application in which I would like to use Uniface's javascript API.


In javascript you can import modules like so: 

import module from 'module'


does something like this exists for Uniface?

The JavaScript API is normally used in Uniface Dynamic Server Pages (which may include JavaScript triggers and operations) for two-directional communication. You can also use it to communicate between JavaScript applications and a Uniface Server. This Uniface 9.7 sample is fairly old, but should migrate to Uniface 10 on import (I haven't tried it) and give you a better understanding of how to use it: UNIFACE AS JAVASCRIPT LIBRARY , WRDURL AND PROMISES


The JavaScript API is normally used in Uniface Dynamic Server Pages (which may include JavaScript triggers and operations) for two-directional communication. You can also use it to communicate between JavaScript applications and a Uniface Server. This Uniface 9.7 sample is fairly old, but should migrate to Uniface 10 on import (I haven't tried it) and give you a better understanding of how to use it: UNIFACE AS JAVASCRIPT LIBRARY , WRDURL AND PROMISES

The files you sent refer to a uniface.js file in the code but I cannot find tha uniface.js file. Also I am trying to call the Uniface Javascript API in just a regular javascript file outside of Uniface. Is there an import statement similar to this import statement https://documentation.uniface.com/09/uniface/integration/Java/tasks/useJavaCallinAPI.htm

from java but then for javascript? 


Thanks


The JavaScript API is normally used in Uniface Dynamic Server Pages (which may include JavaScript triggers and operations) for two-directional communication. You can also use it to communicate between JavaScript applications and a Uniface Server. This Uniface 9.7 sample is fairly old, but should migrate to Uniface 10 on import (I haven't tried it) and give you a better understanding of how to use it: UNIFACE AS JAVASCRIPT LIBRARY , WRDURL AND PROMISES

uniface.js is supplied in a Uniface installation (e.g. C:\\Program Files (x86)\\Uniface 10 Community Edition\\uniface\\webapps\\uniface\\common), and available by default in the uniface web context (virtual directory) via Tomcat.

It doesn't use an import statement, you just include the script as documented and demonstrated in the sample and you should have the uniface namespace available.


The JavaScript API is normally used in Uniface Dynamic Server Pages (which may include JavaScript triggers and operations) for two-directional communication. You can also use it to communicate between JavaScript applications and a Uniface Server. This Uniface 9.7 sample is fairly old, but should migrate to Uniface 10 on import (I haven't tried it) and give you a better understanding of how to use it: UNIFACE AS JAVASCRIPT LIBRARY , WRDURL AND PROMISES

Oh that makes sense. I will try that.


The JavaScript API is normally used in Uniface Dynamic Server Pages (which may include JavaScript triggers and operations) for two-directional communication. You can also use it to communicate between JavaScript applications and a Uniface Server. This Uniface 9.7 sample is fairly old, but should migrate to Uniface 10 on import (I haven't tried it) and give you a better understanding of how to use it: UNIFACE AS JAVASCRIPT LIBRARY , WRDURL AND PROMISES

P.S. If you don't have a Uniface installation, you can register to download the community edition.