Uniface User Forum

 View Only
  • 1.  Is there a Uniface Javascript module or package?

    Posted 07-22-2021 10:55

    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?



  • 2.  RE: Is there a Uniface Javascript module or package?



  • 3.  RE: Is there a Uniface Javascript module or package?

    Posted 07-22-2021 11:23

    Hi Ingo,


    Java and JavaScript are two different languages.

    JavaScript is used in HTML.

    Java runs on its own.


    Norbert



  • 4.  RE: Is there a Uniface Javascript module or package?

    Posted 07-22-2021 11:26

    Hi Norbert

    Sorry, did only see the buzzword "java" 🙂

    Ingo



  • 5.  RE: Is there a Uniface Javascript module or package?

    Posted 07-22-2021 11:35

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



  • 6.  RE: Is there a Uniface Javascript module or package?

    Posted 07-22-2021 11:54

    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.



  • 7.  RE: Is there a Uniface Javascript module or package?

    Posted 07-22-2021 12:28

    What about this videos ?



  • 8.  RE: Is there a Uniface Javascript module or package?

    ROCKETEER
    Posted 07-22-2021 13:26

    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



  • 9.  RE: Is there a Uniface Javascript module or package?

    Posted 07-22-2021 15:34

    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



  • 10.  RE: Is there a Uniface Javascript module or package?

    ROCKETEER
    Posted 07-22-2021 15:50

    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.



  • 11.  RE: Is there a Uniface Javascript module or package?

    Posted 07-22-2021 15:52

    Oh that makes sense. I will try that.



  • 12.  RE: Is there a Uniface Javascript module or package?

    ROCKETEER
    Posted 07-22-2021 15:53

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