Skip to main content

Is there a Uniface Javascript module or package?

  • July 22, 2021
  • 11 replies
  • 1 view

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?

11 replies

Ingo Stiller
Forum|alt.badge.img+3
  • Participating Frequently
  • July 22, 2021

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



Norbert Lauterbach
Forum|alt.badge.img+3

Hi Ingo,


Java and JavaScript are two different languages.

JavaScript is used in HTML.

Java runs on its own.


Norbert


Ingo Stiller
Forum|alt.badge.img+3
  • Participating Frequently
  • July 22, 2021

Hi Norbert

Sorry, did only see the buzzword "java" 🙂

Ingo


  • July 22, 2021

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


  • July 22, 2021

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.


Ingo Stiller
Forum|alt.badge.img+3
  • Participating Frequently
  • July 22, 2021

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 ?


David Akerman
Forum|alt.badge.img

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


  • July 22, 2021

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


David Akerman
Forum|alt.badge.img

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.


  • July 22, 2021

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.


David Akerman
Forum|alt.badge.img

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.