Four Js Development Tools Forum

Discussions by product => GAS and GBC => Topic started by: . on December 17, 2008, 07:01:36 am



Title: How to make link in menu or content
Post by: . on December 17, 2008, 07:01:36 am
How to point a string to an URL in a menu or in the content?

Like in HTML I use to 4js (https://4js.com)


Title: Re: How to make link in menu or content
Post by: . on December 17, 2008, 09:32:14 am
Hello,

This is now possible in version 2.20.
There are several possibilities:

  • Use simple html in a TextEdit or a Label (with textFormat=html). The default url handler - your browser - will be called to display the linked page: see https://4js.com/techdocs/genero/gdc/devel/DocRoot/User/NewFeatures.html#220Hyperlinks
  • Use a Button with style buttonType=link. It will be displayed as a classic link, but it reacts like a normal button: ON ACTION is triggered when clicking on it: see https://4js.com/techdocs/genero/gdc/devel/DocRoot/User/NewFeatures.html#220ButtonLink

I would then recommend you to participate to the EAP and test this, and all exciting new features of the coming 2.20.


Title: Re: How to make link in menu or content
Post by: Olivier E. on December 17, 2008, 01:25:04 pm
Dear Shahrun Nadzree,



Perhaps you don't know, EAP means Early Access Program. It is a marketing word to say Alpha or Beta test program. :)

Click on the following link to look at the main new features and how to subscribe to the Genero 2.20 Early Access Program :

https://4js.com/templates/en/1/affiche.php?idparent=6_2&id=259

Thank you and regards,



Olivier ECKERT - Four J's


Title: Re: How to make link in menu or content
Post by: Huy H. on December 17, 2008, 05:07:20 pm
With GAS/BDL version 2.20, you can also make a call to a front-end function to launch a URL from your BDL program:

CALL ui.Interface.frontCall("standard", "launchurl", ["http://fourjs.com"], [op_status])


Title: Re: How to make link in menu or content
Post by: . on December 18, 2008, 07:53:47 am
I have found a way to do this on:

Genero Web Client - Genero Application Server
Version 2.11.10

This is how i do it.

STEP 1 :

Quote
<OUTPUT>
  <MAP Id="DUA_AJAX">
   <THEME>
     <SNIPPET Id="Label" Style="PrintPayslip">$(res.path.tpl.ajax)/PrintPayslip.xhtml</SNIPPET>
   </THEME>
  </MAP>
 </OUTPUT>

Include an output to the application configuration file.

STEP 2 :

Create a snippets to the located path that will include a link.
Quote
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Copyright 2006-2008 Four J's Development Tools. All Rights Reserved. -->
<!-- $Id: Dialog.xhtml 17161 2008-01-02 14:09:31Z flgu $ -->
<html xmlns:gwc="https://4js.com/GWC">

   <!-- the head element is ignored -->
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>Dialog snippet</title>
   </head>
 
   <!-- the content of the body element is the snippet -->
   <body>


<a href="http://10.2.8.185:6394/pdf/payslip.pdf" target="_blank">Print Payslip[/url]
   </body>
</html>

STEP 3:

Attach a style to a label in the form file
Quote
LABEL f01 = formonly.f01, STYLE = "PrintPayslip" ;

There you go, You got a link on that form file.


Hope this will help others.

Regards,
Nadzree






Title: Re: How to make link in menu or content
Post by: . on December 18, 2008, 03:57:14 pm
Hi Shahrun,

Here is a link on the GAS dev documentation which gives two ways to display a label as a hyperlink:

https://4js.com/techdocs/genero/gas/devel/DocRoot/User/HOWTO_DisplayAsHyperLink.html

It should be helpful for you. Don't hesitate if you need more information.

Best regards


Title: Re: How to make link in menu or content
Post by: . on December 19, 2008, 04:08:34 am
Thanks a lot.

With that now i can do a dynamic link.

Another not so related question. I want to blast a mail with a link that contain some confidential information in a query string. Is it possible to encrypt that information.

Regards,
Nadzree


Title: Re: How to make link in menu or content
Post by: . on December 19, 2008, 05:49:46 am
Additional to that. I've already found a way to blast emails using SMTP. Only need to know how to encrypt and decrypt strings using 2 way type of encryption.

Thanks in advance


Title: Re: How to make link in menu or content
Post by: . on December 19, 2008, 08:03:53 am
With Genero 2.20 (did you register to our Early Access Program ?), you may use the new Java bridge to access Java APIs to manage encryption/decryption. We also plan to provide in our WebServices extension (FGLGWS 2.20) an utility builtin class to crypt/decrypt strings.
If you need a solution in an earlier Genero version, you will have to develop your own C extension or use external tools.


Title: Re: How to make link in menu or content
Post by: . on December 19, 2008, 08:25:30 am
Yes I did register to EAP.

Currently we are using Version 2.11.10
Critical to upgrade because UAT is near. Afraid if we counter the bug during UAT.

If there any other way?

Currently as a plan B. What we do is create a snippets to an Iframe contain a PHP script that manage the encryption.

Regards,
Nadzree



Title: Re: How to make link in menu or content
Post by: . on December 19, 2008, 04:36:08 pm
Hi Nadzree,

Concerning your encryption question, may I ask you to contact your support center ? For this kind of issues, it's the best way to get the most efficient assistance.
Please send all information about your application context (OS, products involved with their exact version ...) and your exact need with your deadlines.

Thank you,
Best regards


Title: Re: How to make link in menu or content
Post by: . on December 20, 2008, 04:44:45 am
Will do. Thanks