EGL Development User Group

EGL Development User Group

EGL Development User Group

The EGL Development User Group is dedicated to sharing news, knowledge, and insights regarding the EGL language and Business Developer product. Consisting of IBMers, HCL, and users, this community collaborates to advance the EGL ecosystem.

 View Only
  • 1.  how to pass variable's value between javascript file and egl handler

    Posted Fri January 27, 2017 01:23 AM

    Hi all,

    Is it possible to pass variable's value (integer) from a javascript file to an egl handler ?

    Thanks 

    michaeldefox


  • 2.  Re: how to pass variable's value between javascript file and egl handler

    Posted Mon January 30, 2017 02:14 AM

    Hi,

    do you call the javascript file from EGL and do you want to pass the value as return value?

     

    Kind Regards!

    Marcel-D


  • 3.  Re: how to pass variable's value between javascript file and egl handler

    Posted Mon January 30, 2017 02:33 AM

    Yes I m using 'includeFile'  to include js file and for example in Javascript file I set var flag = 1;  

    I want to pass this flag variable in my handler as integer variable. 

    michaeldefox


  • 4.  Re: how to pass variable's value between javascript file and egl handler

    Posted Tue January 31, 2017 04:32 AM

    Hi Michael,

    I have attached a sample project which demonstrates a solution to your question; a js variable being set in the included html file, is retrieved by the handler using an externalType JavaScriptObject.

    Kind regards,

    Guus

    gweis

    Attachments



  • 5.  Re: how to pass variable's value between javascript file and egl handler

    Posted Tue January 31, 2017 05:28 AM

    my index.html is inside WebProject  and I use it as welcome page inside web.xml

    I can't set it in includeFile in handler because it reloads page but if I don't include it i get an error 'variable undefined'

    Thanks in advance.

     

    michaeldefox


  • 6.  Re: how to pass variable's value between javascript file and egl handler

    Posted Thu February 02, 2017 06:14 AM

    See if this code helps you ..

     

            box Box{layoutData = new GridLayoutData{row = 1, column = 1, verticalAlignment = GridLayoutLib.VALIGN_TOP, horizontalSpan = 2}
                    , padding = 8, columns = 1, width = "400", marginBottom = 11
                    ,children=[ You_Image,
                        new HTML{ layoutData = new GridLayoutData{ row = 1, column = 1,horizontalSpan = 2 },
                        text=(  
                          "<a href=" + " You_Url..." + " target=\"_blank\">"  
                        + "<img src=" + " You_Url..." + " style=\"width:120px;height:60px;border:0;\">"
                        + "</a> "

                     )}
                     ]} ;

     

    ojomenezes


  • 7.  Re: how to pass variable's value between javascript file and egl handler

    Posted Fri February 03, 2017 02:12 AM

    How do you link your index.html file to your EGL's mainhandler html file?

    Is it an option to set your EGL's mainhandler html file as welcome page in web.xml?

     

     

    gweis