Re: Datatrans payment system with JSinterop

2021-01-21 Thread pierre...@gmail.com
Thanks Thomas,

I tried it but the compiler is complaining :
[ERROR] Line 27: Native JsType method 'void 
DatatransOption.opened()' should be native or abstract.
As I would like to implement them myself, is there a workaround ?  

Pierre
Le jeudi 21 janvier 2021 à 18:51:57 UTC+1, t.br...@gmail.com a écrit :

> You could probably also use a non-native type:
>
> public class DatatransOption {
>   @JsProperty
>   public String transactionId;
>   
>   @JsMethod
>   public void opened() {
> Window.alert("payment form opened");
>   }
> }
>
> On Thursday, January 21, 2021 at 1:07:34 PM UTC+1 pierre...@gmail.com 
> wrote:
>
>> I was able to make it work using a DatatransOption class for the config :
>> @JsType(namespace = JsPackage.GLOBAL, name = "Object", isNative = true)
>> public class DatatransOption {
>>
>>  @JsProperty
>> public String transactionId;
>> @JsProperty
>> public Func opened;
>> ...
>> @JsOverlay
>> public static DatatransOption create(String transactionId)
>> {
>> DatatransOption option = new DatatransOption();
>> option.transactionId = transactionId;
>> option.opened = new Func() {
>> @Override
>> public void call() {
>> Window.alert("payment-form opened ");
>> }
>> };
>> ...
>> return option;
>> }
>>
>>
>>
>>
>> The Func interface is from Gwt-Material
>> Le jeudi 21 janvier 2021 à 09:19:48 UTC+1, pierre...@gmail.com a écrit :
>>
>>> Hi,
>>>
>>> I am trying to integrate the Datatrans payment system with JSinterop
>>> The js script is 
>>> https://pay.sandbox.datatrans.com/upp/payment/js/datatrans-2.0.0.js
>>>
>>> the js code to be executed should be :
>>>
>>> payButton.onclick = function() {
>>>   Datatrans.startPayment({
>>> transactionId:  "{{transactionId}}",
>>> 'opened': function() {console.log('payment-form opened');},
>>> 'loaded': function() {console.log('payment-form loaded');},
>>> 'closed': function() {console.log('payment-page closed');},
>>> 'error': function() {console.log('error');}
>>>   });
>>> };
>>>
>>> I created a Datatrans class :
>>>
>>> @JsType(namespace = JsPackage.GLOBAL, isNative = true)
>>> public class Datatrans {
>>> public native static void startPayment(String transactionId);
>>> }
>>>
>>> When clicking on the payButton, the startPayment function from the js 
>>> code is executed but no dialog from datastrans is shown.
>>> I guess imy definition of my startPayment method doesnot include the 
>>> functions callbacks for opened/loaded etc
>>> How can I define these functions and change my  startPayment definition ?
>>>
>>> Thanks in advance for any help
>>> Pierre
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/2ab3f84a-681a-45f0-9956-9779b82ac022n%40googlegroups.com.


Re: Our 10+ year journey with GWT (+ job opening)

2021-01-21 Thread Marco Castillo
It is nice to hear all this experience with GWT. I would like to share 
mine. I'm based in Guatemala, our development team develop a product, 
Axeso, it is a product that enhances the security in Google Apps (next 
GSuite, now Google Workspace). We develop the administrator console using 
GWT, the backend in Google App Engine using java mainly and NoSQL 
databases, and at this time (almost ten years later) we're deciding what 
new framework would be the successor of GWT.
I was considering https://gwtmaterialdesign.github.io/gwt-material-demo/, 
we would like to give our console a more material design look. And with all 
the stories I just read, maybe I will ditch React (it was going to be our 
choosed framework for substituting GWT) and kept GWT.
Regards


Marco
On Wednesday, January 20, 2021 at 10:14:32 AM UTC-6 David Nouls wrote:

> That is actually a good point indeed. We also have very old tech in 
> production including some ALGOL.
>
> I do have the impression that the JS Frameworks race has been slowing down 
> a bit. Sure there will always be some new ideas, but the big frameworks are 
> there for quite some.
>
> At least with GWT/Java it is rather easy to maintain! GWT does not change 
> much, sometimes that is an advantage.
> On 20 Jan 2021, 16:48 +0100, lofid...@gmail.com , 
> wrote:
>
> IMHO that's the problem with frameworks / languages. If they are "strong 
> enough" they won't be gone... I don't think that TypeScript / Vue.js / 
> React / Angular etc. will be vanished. They will stay forever just like 
> COBOL and other technologies like Borland / Embarcadero Delphi Object 
> Pascal. My comment above was a joke, because I don't know what will happen 
> in 10 years. There will be another hot things. Maybe we move completely on 
> the native client development instead of Web browser? But who knows...
>
> So at the end of the day the devs need to maintain apps with the zoo of 
> frameworks and languages.  
>
> Scary if you see this history of web frameworks: 
> https://raw.githubusercontent.com/mraible/history-of-web-frameworks-timeline/master/history-of-web-frameworks-timeline.png
>
> I think, it's time that the development of apps / Web apps should go 
> higher in the abstraction level to be technology / framework independent. 
> PIM (Platform Independent Model) anyone?  😉
>
> BTW.: I still have JSPs in production. Also COBOL 😅
>
> Cheers,
> Lofi
> t.br...@gmail.com schrieb am Mittwoch, 20. Januar 2021 um 14:36:30 UTC+1:
>
>> Why did you bet on GWT 10 years ago and wouldn't bet on TypeScript 
>> nowadays? 
>> (fwiw, TypeScript is already 8 years old; Vue.js is 6 years old, React is 
>> 7)
>>
>> On Tuesday, January 19, 2021 at 5:26:38 PM UTC+1 lofid...@gmail.com 
>> wrote:
>>
>>> @swas... 
>>>
>>> 
>>> Yes, almost 10 years for me too and production application  running for 
>>> 3 years.
>>> GWT 2.6.1 + Eclipse 4.8.  Tomcat8 + MySQL5.7  + Java8 + JasperReport
>>> my next 10 years plan is  move to TypeScript + VueJS.
>>> 
>>>
>>> After 10 years, will we still be able to see TypeScript + VueJS? 😂
>>>
>>> Cheers,
>>> Lofi
>>> RobW schrieb am Dienstag, 19. Januar 2021 um 15:29:42 UTC+1:
>>>
 Our web front end is on 15 years with GWT as of this year, and we're 
 expecting 5 more with luck. So we'll hit the 20 year mark if all goes well

 On Tuesday, 19 January 2021 at 10:46:44 UTC aka...@gmail.com wrote:

> I wonder if that will actually last for the next 10 years.
>
> On Tuesday, January 19, 2021 at 10:04:19 AM UTC+2 swas...@gmail.com 
> wrote:
>
>> Yes, almost 10 years for me too and production application  running 
>> for 3 years.
>> GWT 2.6.1 + Eclipse 4.8.  Tomcat8 + MySQL5.7  + Java8 + JasperReport
>> my next 10 years plan is  move to TypeScript + VueJS. 
>> On Monday, 4 January 2021 at 23:37:53 UTC+7 Alexander Bertram wrote:
>>
>>> Nice to hear from everyone!
>>>
>>> Here's to the next ten years :-)
>>>
>>> Best wishes for 2021,
>>> Alex
>>>
>>> On Tuesday, December 22, 2020 at 10:22:08 AM UTC+1 Segun Razaq 
>>> Sobulo wrote:
>>>

 I've been using GWT for 7+ years (with appengine java backends) and 
 actively looking for a job. I'll push my resume. 

 Thanks
 On Monday, 21 December 2020 at 15:24:19 UTC+1 aka...@gmail.com 
 wrote:

> We are in times where working remotly id actually a good option.
>
> On Monday, December 21, 2020 at 4:19:13 PM UTC+2 David Nouls wrote:
>
>> Hi Alex,
>>
>> Same story here. I have been working with GWT since it first came 
>> out. For our current project we again opted for GWT because we share 
>> a lot 
>> of code between client and server and productivity is high.
>>
>> I’m not available at the moment (maybe end of next year)… but 
>> living in Belgium/Leuven I don’t think that is doable. Reloca

Re: Datatrans payment system with JSinterop

2021-01-21 Thread Thomas Broyer
You could probably also use a non-native type:

public class DatatransOption {
  @JsProperty
  public String transactionId;
  
  @JsMethod
  public void opened() {
Window.alert("payment form opened");
  }
}

On Thursday, January 21, 2021 at 1:07:34 PM UTC+1 pierre...@gmail.com wrote:

> I was able to make it work using a DatatransOption class for the config :
> @JsType(namespace = JsPackage.GLOBAL, name = "Object", isNative = true)
> public class DatatransOption {
>
>  @JsProperty
> public String transactionId;
> @JsProperty
> public Func opened;
> ...
> @JsOverlay
> public static DatatransOption create(String transactionId)
> {
> DatatransOption option = new DatatransOption();
> option.transactionId = transactionId;
> option.opened = new Func() {
> @Override
> public void call() {
> Window.alert("payment-form opened ");
> }
> };
> ...
> return option;
> }
>
>
>
>
> The Func interface is from Gwt-Material
> Le jeudi 21 janvier 2021 à 09:19:48 UTC+1, pierre...@gmail.com a écrit :
>
>> Hi,
>>
>> I am trying to integrate the Datatrans payment system with JSinterop
>> The js script is 
>> https://pay.sandbox.datatrans.com/upp/payment/js/datatrans-2.0.0.js
>>
>> the js code to be executed should be :
>>
>> payButton.onclick = function() {
>>   Datatrans.startPayment({
>> transactionId:  "{{transactionId}}",
>> 'opened': function() {console.log('payment-form opened');},
>> 'loaded': function() {console.log('payment-form loaded');},
>> 'closed': function() {console.log('payment-page closed');},
>> 'error': function() {console.log('error');}
>>   });
>> };
>>
>> I created a Datatrans class :
>>
>> @JsType(namespace = JsPackage.GLOBAL, isNative = true)
>> public class Datatrans {
>> public native static void startPayment(String transactionId);
>> }
>>
>> When clicking on the payButton, the startPayment function from the js 
>> code is executed but no dialog from datastrans is shown.
>> I guess imy definition of my startPayment method doesnot include the 
>> functions callbacks for opened/loaded etc
>> How can I define these functions and change my  startPayment definition ?
>>
>> Thanks in advance for any help
>> Pierre
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/acc60a13-b764-418d-8f14-5a6be5276becn%40googlegroups.com.


Re: Datatrans payment system with JSinterop

2021-01-21 Thread pierre...@gmail.com
I was able to make it work using a DatatransOption class for the config :
@JsType(namespace = JsPackage.GLOBAL, name = "Object", isNative = true)
public class DatatransOption {

 @JsProperty
public String transactionId;
@JsProperty
public Func opened;
...
@JsOverlay
public static DatatransOption create(String transactionId)
{
DatatransOption option = new DatatransOption();
option.transactionId = transactionId;
option.opened = new Func() {
@Override
public void call() {
Window.alert("payment-form opened ");
}
};
...
return option;
}




The Func interface is from Gwt-Material
Le jeudi 21 janvier 2021 à 09:19:48 UTC+1, pierre...@gmail.com a écrit :

> Hi,
>
> I am trying to integrate the Datatrans payment system with JSinterop
> The js script is 
> https://pay.sandbox.datatrans.com/upp/payment/js/datatrans-2.0.0.js
>
> the js code to be executed should be :
>
> payButton.onclick = function() {
>   Datatrans.startPayment({
> transactionId:  "{{transactionId}}",
> 'opened': function() {console.log('payment-form opened');},
> 'loaded': function() {console.log('payment-form loaded');},
> 'closed': function() {console.log('payment-page closed');},
> 'error': function() {console.log('error');}
>   });
> };
>
> I created a Datatrans class :
>
> @JsType(namespace = JsPackage.GLOBAL, isNative = true)
> public class Datatrans {
> public native static void startPayment(String transactionId);
> }
>
> When clicking on the payButton, the startPayment function from the js code 
> is executed but no dialog from datastrans is shown.
> I guess imy definition of my startPayment method doesnot include the 
> functions callbacks for opened/loaded etc
> How can I define these functions and change my  startPayment definition ?
>
> Thanks in advance for any help
> Pierre
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/affed184-d0f1-430c-83f5-78c4718a0efdn%40googlegroups.com.


Datatrans payment system with JSinterop

2021-01-21 Thread pierre...@gmail.com
Hi,

I am trying to integrate the Datatrans payment system with JSinterop
The js script is 
https://pay.sandbox.datatrans.com/upp/payment/js/datatrans-2.0.0.js

the js code to be executed should be :

payButton.onclick = function() {
  Datatrans.startPayment({
transactionId:  "{{transactionId}}",
'opened': function() {console.log('payment-form opened');},
'loaded': function() {console.log('payment-form loaded');},
'closed': function() {console.log('payment-page closed');},
'error': function() {console.log('error');}
  });
};

I created a Datatrans class :

@JsType(namespace = JsPackage.GLOBAL, isNative = true)
public class Datatrans {
public native static void startPayment(String transactionId);
}

When clicking on the payButton, the startPayment function from the js code 
is executed but no dialog from datastrans is shown.
I guess imy definition of my startPayment method doesnot include the 
functions callbacks for opened/loaded etc
How can I define these functions and change my  startPayment definition ?

Thanks in advance for any help
Pierre

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/e822ef6b-cc25-426d-837a-a01f42431979n%40googlegroups.com.