Re: JSInterop and "JSON.stringify" method return "Converting circular structure to JSON"

2024-05-22 Thread Marco Tenti (IoProgrammo88)


I misunderstood the documentation... ty for the clarification Thomas can 
you give me some confirmations.

The Date issue, When you say to use the JsDate do you mean the one in the 
elemental2 package (elemental2.core.JsDate) or in the gwt core (
com.google.gwt.core.client.JsDate) ?

So for the Date issue i just enough to replace this code :

@JsProperty *public* *native* *Date* getDataRepertorioDocumento();

 

@JsProperty *public* *native* *void* setDataRepertorioDocumento(*Date* 
dataRepertorioDocumento);

 

With:

@JsProperty *public* *native* Js*Date* getDataRepertorioDocumento();

 

@JsProperty *public* *native* *void* setDataRepertorioDocumento(*JsDate* 
dataRepertorioDocumento);

 

Right ?

 

For the "List" and "Map" problem, i will probably try to use some 
@JsOverlay instead to use a second argument  on the JSON.stringify by the 
way can you point me out some example (i'm not very skilled with this 
library) ?  
Also I found this project updated for GWT 2.9.0 and java 11  
https://github.com/jp-solutions/gwt-interop-utils 
. it’s seem goof enough for my use case,  i’ll try out and let you know it. 

Il giorno mercoledì 22 maggio 2024 alle 11:50:10 UTC+2 Vassilis Virvilis ha 
scritto:

> or passing a @JsFunction to JSON.stringify() as its second argument 
>
>
> I wish I knew that some time before...
>  
> -- 
> Vassilis Virvilis
>

-- 
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/c3bf1105-8329-431a-a42d-97ce7b4871e8n%40googlegroups.com.


Re: Using JsInterop to create JS object literals

2024-05-21 Thread Marco Tenti (IoProgrammo88)
I thank you Thomas for the clarification unfortunately I am forced to use 
setters and getters because I cannot find another way to set the values and 
compile the GWT java client.
As you said I seem to have solved it with:

@JsProperty public native String getCodeAdministration();

@JsProperty public native void setCodeAdministration(String 
codeAdministration);

Il giorno martedì 21 maggio 2024 alle 17:15:59 UTC+2 Thomas Broyer ha 
scritto:

> With the following:
>
> @JsType(namespace = JsPackage.GLOBAL, name = "Object", isNative = true)
> public class XXXGWT {
> public String codiceAmministrazione;
> }
>
> you should be able to write:
>
> var xxx = new XXXGWT();
> xxx.codiceAmministrazione = "foo";
>
> and have it translate more or less to:
>
> let xxx = new $wnd.Object()
> xxx.codiceAmministrazione = "foo";
>
> With the getter and setter, you have to annotate them with @JsProperty, 
> but the generated JS will be identical, so you've actually only made your 
> code more verbose for no compelling reasons (besides maybe pleasing static 
> analyzers like Sonar that will yell if you don't encapsulate fields).
>
>
> On Tuesday, May 21, 2024 at 4:30:35 PM UTC+2 tenti...@gmail.com wrote:
>
> Just to be clear on my use case this is my java class:
>
> @JsType(namespace = JsPackage.GLOBAL, name = "Object", isNative = true)
> public class XXXGWT {
>
> private String codiceAmministrazione;
> 
> @JsConstructor
> public DocumentoPAC4DTOGWT() {}
>
> public native String getCodiceAmministrazione();
>
> public native void setCodiceAmministrazione(String codiceAmministrazione);
>
> }
>
> and this is the erorr i'm getting on the setter : 
>
>
> DesktopApp-0.js:13132 Tue May 21 16:24:02 GMT+200 2024 
> com.google.gwt.logging.client.LogConfiguration SEVERE: Exception caught: 
> (TypeError) : b.setCodiceAmministrazione is not a function 
> com.google.gwt.event.shared.UmbrellaException: Exception caught: 
> (TypeError) : b.setCodiceAmministrazione is not a function
> Il giorno martedì 21 maggio 2024 alle 14:56:22 UTC+2 Marco Tenti 
> (IoProgrammo88) ha scritto:
>
> Sorry Thomas about your last comment "  I'd rather user fields than 
> getters/setters for such objects "  can you point me out to some example 
> for this ?
>
> Il giorno mercoledì 29 giugno 2022 alle 09:48:49 UTC+2 Thomas Broyer ha 
> scritto:
>
> Using isNative=true, you're telling GWT that you're only "mapping" in Java 
> a *type* that exists in JS. The default naming rule is that the full name 
> of that type is the fully qualified name of the Java class, you can change 
> the simple name with 'name', and the *prefix* with namespace (which 
> defaults to the package name for top-level classes, or the enclosing type's 
> JS name for nested classes). So with namespace=GLOBAL but without the 
> name="Object", you're saying that you want to basically do a 'new 
> $wnd.MyPluginConfig()' in JS, and the browser rightfully complains that 
> there's no such MyPluginConfig. Adding name="Object" means you'll do a 'new 
> $wnd.Object()' in JS.
>
> Fwiw, I'd rather user fields than getters/setters for such objects. YMMV.
>
> On Wednesday, June 29, 2022 at 8:38:19 AM UTC+2 Nicolas Chamouard wrote:
>
> Thank you !
> It is a bit mysterious to me, but with *name = "Object"* the constructor 
> works :)
>
>
> Le mercredi 29 juin 2022 à 00:47:32 UTC+2, m.conr...@gmail.com a écrit :
>
> try adding name = "Object" so that it uses an empty javascript Object as 
> the wrapped item.
>
> I found this via Googling:
>
> @JsType(namespace = JsPackage.GLOBAL, isNative = true, name = "Object") 
> public class MyPluginConfig { @JsProperty public void set(String 
> str); @JsProperty public String get(); ... }
>
> Ref: https://stackoverflow.com/a/36329387/12407701
>
>
> On Tue, Jun 28, 2022 at 6:24 PM Nicolas Chamouard  
> wrote:
>
> Yes, it does not change anything : 
>
> @JsType(*isNative*=*true*, *namespace* = JsPackage.*GLOBAL*)
>
> *public* *class* OptionOverrides {
>
>
> @JsConstructor
>
> *public* OptionOverrides() {}
>
> 
>
> @JsProperty
>
> *public* *native* String getInitialView();
>
> @JsProperty
>
> *public* *native* *void* setInitialView(String initialView);
>
> }
>
>
> Still the same error : *$wnd.OptionOverrides is not a constructor*
>
> Le mardi 28 juin 2022 à 23:27:08 UTC+2, m.conr...@gmail.com a écrit :
>
> Have you tried giving the class a constructor?
>
>

Re: Using JsInterop to create JS object literals

2024-05-21 Thread Marco Tenti (IoProgrammo88)
Just to be clear on my use case this is my java class:

@JsType(namespace = JsPackage.GLOBAL, name = "Object", isNative = true)
public class XXXGWT {

private String codiceAmministrazione;

@JsConstructor
public DocumentoPAC4DTOGWT() {}

public native String getCodiceAmministrazione();

public native void setCodiceAmministrazione(String codiceAmministrazione);

}

and this is the erorr i'm getting on the setter : 


DesktopApp-0.js:13132 Tue May 21 16:24:02 GMT+200 2024 
com.google.gwt.logging.client.LogConfiguration SEVERE: Exception caught: 
(TypeError) : b.setCodiceAmministrazione is not a function 
com.google.gwt.event.shared.UmbrellaException: Exception caught: 
(TypeError) : b.setCodiceAmministrazione is not a function
Il giorno martedì 21 maggio 2024 alle 14:56:22 UTC+2 Marco Tenti 
(IoProgrammo88) ha scritto:

> Sorry Thomas about your last comment "  I'd rather user fields than 
> getters/setters for such objects "  can you point me out to some example 
> for this ?
>
> Il giorno mercoledì 29 giugno 2022 alle 09:48:49 UTC+2 Thomas Broyer ha 
> scritto:
>
>> Using isNative=true, you're telling GWT that you're only "mapping" in 
>> Java a *type* that exists in JS. The default naming rule is that the 
>> full name of that type is the fully qualified name of the Java class, you 
>> can change the simple name with 'name', and the *prefix* with namespace 
>> (which defaults to the package name for top-level classes, or the enclosing 
>> type's JS name for nested classes). So with namespace=GLOBAL but without 
>> the name="Object", you're saying that you want to basically do a 'new 
>> $wnd.MyPluginConfig()' in JS, and the browser rightfully complains that 
>> there's no such MyPluginConfig. Adding name="Object" means you'll do a 'new 
>> $wnd.Object()' in JS.
>>
>> Fwiw, I'd rather user fields than getters/setters for such objects. YMMV.
>>
>> On Wednesday, June 29, 2022 at 8:38:19 AM UTC+2 Nicolas Chamouard wrote:
>>
>>> Thank you !
>>> It is a bit mysterious to me, but with *name = "Object"* the 
>>> constructor works :)
>>>
>>>
>>> Le mercredi 29 juin 2022 à 00:47:32 UTC+2, m.conr...@gmail.com a écrit :
>>>
>>>> try adding name = "Object" so that it uses an empty javascript Object 
>>>> as the wrapped item.
>>>>
>>>> I found this via Googling:
>>>>
>>>> @JsType(namespace = JsPackage.GLOBAL, isNative = true, name = "Object")
>>>> public class MyPluginConfig {
>>>> @JsProperty public void set(String str);
>>>> @JsProperty public String get();
>>>> ...
>>>> }
>>>>
>>>> Ref: https://stackoverflow.com/a/36329387/12407701
>>>>
>>>>
>>>> On Tue, Jun 28, 2022 at 6:24 PM Nicolas Chamouard <
>>>> ncham...@alara-group.fr> wrote:
>>>>
>>>>> Yes, it does not change anything : 
>>>>>
>>>>> @JsType(*isNative*=*true*, *namespace* = JsPackage.*GLOBAL*)
>>>>>
>>>>> *public* *class* OptionOverrides {
>>>>>
>>>>>
>>>>> @JsConstructor
>>>>>
>>>>> *public* OptionOverrides() {}
>>>>>
>>>>> 
>>>>>
>>>>> @JsProperty
>>>>>
>>>>> *public* *native* String getInitialView();
>>>>>
>>>>> @JsProperty
>>>>>
>>>>> *public* *native* *void* setInitialView(String initialView);
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>> Still the same error : *$wnd.OptionOverrides is not a constructor*
>>>>>
>>>>> Le mardi 28 juin 2022 à 23:27:08 UTC+2, m.conr...@gmail.com a écrit :
>>>>>
>>>>>> Have you tried giving the class a constructor?
>>>>>>
>>>>>>
>>>>>> On Tue, Jun 28, 2022 at 4:04 PM Nicolas Chamouard <
>>>>>> ncham...@alara-group.fr> wrote:
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I am using JsInterop to integrate FullCalendar to my GWT application.
>>>>>>> As described here https://fullcalendar.io/docs/initialize-globals, 
>>>>>>> I am supposed to create an object literal and pass it to the Calendar() 
>>>>>

Re: Using JsInterop to create JS object literals

2024-05-21 Thread Marco Tenti (IoProgrammo88)
Sorry Thomas about your last comment "  I'd rather user fields than 
getters/setters for such objects "  can you point me out to some example 
for this ?

Il giorno mercoledì 29 giugno 2022 alle 09:48:49 UTC+2 Thomas Broyer ha 
scritto:

> Using isNative=true, you're telling GWT that you're only "mapping" in Java 
> a *type* that exists in JS. The default naming rule is that the full name 
> of that type is the fully qualified name of the Java class, you can change 
> the simple name with 'name', and the *prefix* with namespace (which 
> defaults to the package name for top-level classes, or the enclosing type's 
> JS name for nested classes). So with namespace=GLOBAL but without the 
> name="Object", you're saying that you want to basically do a 'new 
> $wnd.MyPluginConfig()' in JS, and the browser rightfully complains that 
> there's no such MyPluginConfig. Adding name="Object" means you'll do a 'new 
> $wnd.Object()' in JS.
>
> Fwiw, I'd rather user fields than getters/setters for such objects. YMMV.
>
> On Wednesday, June 29, 2022 at 8:38:19 AM UTC+2 Nicolas Chamouard wrote:
>
>> Thank you !
>> It is a bit mysterious to me, but with *name = "Object"* the constructor 
>> works :)
>>
>>
>> Le mercredi 29 juin 2022 à 00:47:32 UTC+2, m.conr...@gmail.com a écrit :
>>
>>> try adding name = "Object" so that it uses an empty javascript Object as 
>>> the wrapped item.
>>>
>>> I found this via Googling:
>>>
>>> @JsType(namespace = JsPackage.GLOBAL, isNative = true, name = "Object")
>>> public class MyPluginConfig {
>>> @JsProperty public void set(String str);
>>> @JsProperty public String get();
>>> ...
>>> }
>>>
>>> Ref: https://stackoverflow.com/a/36329387/12407701
>>>
>>>
>>> On Tue, Jun 28, 2022 at 6:24 PM Nicolas Chamouard <
>>> ncham...@alara-group.fr> wrote:
>>>
 Yes, it does not change anything : 

 @JsType(*isNative*=*true*, *namespace* = JsPackage.*GLOBAL*)

 *public* *class* OptionOverrides {


 @JsConstructor

 *public* OptionOverrides() {}

 

 @JsProperty

 *public* *native* String getInitialView();

 @JsProperty

 *public* *native* *void* setInitialView(String initialView);

 }


 Still the same error : *$wnd.OptionOverrides is not a constructor*

 Le mardi 28 juin 2022 à 23:27:08 UTC+2, m.conr...@gmail.com a écrit :

> Have you tried giving the class a constructor?
>
>
> On Tue, Jun 28, 2022 at 4:04 PM Nicolas Chamouard <
> ncham...@alara-group.fr> wrote:
>
>> Hello,
>>
>> I am using JsInterop to integrate FullCalendar to my GWT application.
>> As described here https://fullcalendar.io/docs/initialize-globals, I 
>> am supposed to create an object literal and pass it to the Calendar() 
>> constructor.
>>
>> I have managed to create this class : 
>>
>> @JsType(*namespace* = JsPackage.*GLOBAL*)
>>
>> *public* *class* OptionOverrides {
>>
>>
>> @JsProperty
>>
>> *public* *native* String getInitialView();
>>
>> @JsProperty
>>
>> *public* *native* *void* setInitialView(String initialView);
>>
>> }
>>
>> It works but the FullCalendar complains about all the Java Object 
>> stuff that is translated to javascript : equals(), hashCode(), etc
>>
>> I have tried to add* isNative=true* to my class, but in this case i 
>> cannot instantiate it in Java (error : $wnd.OptionOverrides is not a 
>> constructor)
>>
>> Is there an other way to do this, am I missing something here ?
>>
>> Thanks
>>
>>
>>
>> -- 
>> 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-tool...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-web-toolkit/a03c881a-48d4-4892-9fae-7719bc9a57b8n%40googlegroups.com
>>  
>> 
>> .
>>
> -- 
 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-tool...@googlegroups.com.

>>> To view this discussion on the web visit 
 https://groups.google.com/d/msgid/google-web-toolkit/4d8099ea-3a37-4026-b459-f228e35ca59bn%40googlegroups.com
  
 
 .

>>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscr

Re: Problems moving JsInterop from GWT 2.7 to 2.8

2024-04-15 Thread Marco Tenti (IoProgrammo88)
" I also solved the problem of List and Map with an own Interface, which is 
an ArrayList/HashMap on serverside and an own implemented native List/Map 
on gwt side" can you share the solution ?

Il giorno venerdì 29 settembre 2017 alle 14:00:12 UTC+2 Ignacio Baca 
Moreno-Torres ha scritto:

> We have been using this technique for more than a year and it works 
> perfectly. We call it "Java Notation Object", hehe and you should 
> understand the limitations, which more or less you are currently 
> fulfilling. Just a few changes...
>
> The most important, yes, you should use 
> @JsType(isNative=true,namespace=GLOBAL,name="Object"), so you are actually 
> ignoring any kind of typing, so this is more a "scheme" of where to find 
> things than an actual typed object. This is pretty important! This is 
> pretty similar to JSON but in Java, and these classes are not actually Java 
> classes, are just a scheme. All these limitations are the common 
> intersection of the feature between Java and JS.
>
> You can do some tricks to use collections but we end up removing all of 
> them and using arrays instead. But, to make it easy to work with, we added 
> some @JsOverlay to return or set the Collection. For example if you have 
> "String[] roles" you can add "@JsOverlay getRoleSet() { return 
> Stream.of(roles).collecto(toSet()); }". Overlays are ok bc there are just 
> like extension method or static method, so no behavior is added to the 
> object.
>
> This work perfectly on both sides, but there is a small annoying 
> difference between GWT and Java, in java new Foo() will initialize 
> primitive types and in GWT (js) will not. So we never use constructor 
> directly, in the kind of classes we always add a static factory method and 
> we initialize any non-nullable field, even primitives! So in java you are 
> actually creating the object of the specified type, but in JS you are just 
> calling "new Object()", but it is ok, bc where are using a scheme, no a 
> type. And we never use instanceof on these schemes! This will work on the 
> Java side, but I strongly discourage, you should not need to do that.
>
> Finally, we never use getter and setter, don't make sense, you "cannot use 
> inheritance" (you can use with some ticks too, for example using some int 
> or string field as the type indicator and using, for example, the visitor 
> pattern to traverse, this is what actually people need to do in JS so, no 
> magic just the common intersection of features between java and json), 
> almost everything is like final and you must not add behavior, so it is 
> much explicit and easier to just make all field public.
>
> I think the first you should do is removing getters and setters, and add 
> @JsType(native,Object) to all your types, this refactor can be done almost 
> instantly in your IDE (inline method). Then stop using Collection might not 
> be so easy to refactor. So you might continue using it either using 
> overlays or creating a custom jsinterop-compatible type. In this case, I 
> recommend to not to use the whole java.util API bc it will force you to 
> export the whole API and use generateJsInteropExports. If you are really 
> interested or need help there just ask, but just try out avoiding maps, and 
> using arrays. Anyways, the "Map/List own interface" should work too, just 
> neet to make it work.
>
> On Fri, Sep 29, 2017 at 12:53 PM Thomas Broyer  wrote:
>
>>
>>
>> On Friday, September 29, 2017 at 11:09:42 AM UTC+2, Jürgen Beringer wrote:
>>>
>>> Hey,
>>>
>>> currently  I tried the 2. time to move our application from gwt 2.7 to 
>>> gwt 2.8, but I have big problems with the changes of JsInterop.
>>>
>>> The application contains a serverside java part, running in a jetty and 
>>> the client part, build with gwt, so I can reuse many software on server and 
>>> client side. (It is the main part of the website  www.spreadshirt.com )
>>> To use also the same data classes (containing only fields with getter 
>>> and setter, no other methods) on both sides, I used JsInterop and it works 
>>> very well with gwt 2.7 and exchanged the data as json.
>>>
>>> Example Data class:
>>>
>>> @JsType
>>> public class MyObject {
>>> private String id;
>>> 
>>> @JsProperty
>>> public String getId() {
>>> return id;
>>> }
>>> @JsProperty
>>> public void setId(String id) {
>>> this.id = id;
>>> }
>>> }
>>>
>>>
>>> The class can be used on server side like any normal java class with any 
>>> REST Framework. On gwt side I was able to convert a transmitted json to the 
>>> class with:
>>>
>>>
>>> MyObject myObject = getJsTypeObject(JsonUtils.safeEval(jsonString));
>>> //use getter and setter to access fields
>>>
>>> public static native  T getJsTypeObject(JavaScriptObject result)/*-{
>>> return result;
>>> }-*/;
>>>
>>>
>>> And to create Objects on gwt side and send them to the server as json:
>>>
>>> MyObject myObject = new MyObject();
>>> myObject.setId("1");
>>> String 

Re: Help to undrerstand how to use domino-jackson and the annotation JSONMapper

2024-04-15 Thread Marco Tenti (IoProgrammo88)
I also try to use the external approach described here 
https://dominokit.com/solutions/domino-jackson/v1/docs/getting-started/define-mappers
 
but it should be the same i must have the XXMapperImpl somewhere , but the 
java compiler tell me that class do not exists. Maybe there is some maven 
configuration to add somewehre ?

Il giorno lunedì 15 aprile 2024 alle 09:16:49 UTC+2 Marco Tenti 
(IoProgrammo88) ha scritto:

> The problem i cannot find the generate class "Person_MapperImpl" is under 
> the target folder somewhere ?
>
> Il giorno venerdì 12 aprile 2024 alle 18:25:30 UTC+2 Thomas Broyer ha 
> scritto:
>
>> Aren't you supposed to directly use the generated class rather than using 
>> GWT.create() ? (unless you also added a  in your gwt.xml)
>>
>> https://dominokit.com/solutions/domino-jackson/v1/docs/getting-started/quick-start
>>
>> On Friday, April 12, 2024 at 1:20:27 PM UTC+2 tenti...@gmail.com wrote:
>>
>>> I'm upgrading a old project and i want to replace the old gwt-jackson (
>>> https://dominokit.com/solutions/domino-jackson/v1)  with the 
>>> domino-jackson project (https://github.com/DominoKit/domino-jackson).
>>>
>>> It should be a simple transiction, but i cannot understand how to let 
>>> the GWT compilation "see" the implementations classes of the ObjectMapper 
>>> interface.
>>>
>>> *Here the "old" code from gwt-jackson*
>>>
>>> *public static interface AltriMetadatiDTOMapper extends 
>>> com.github.nmorel.gwtjackson.client.ObjectMapper>>
>>>  
>>> {} *
>>>
>>> * ... *
>>>
>>> * AltriMetadatiDTOMapper altriMetadatiDTOMapper = 
>>> GWT.create(AltriMetadatiDTOMapper.class); String jsonAltriMetadati = 
>>> altriMetadatiDTOMapper.write(object); *
>>>
>>> *Here the "new" code from domino-jackson*
>>> *@org.dominokit.jackson.annotation.JSONMapper public interface 
>>> AltriMetadatiDTOMapper extends 
>>> org.dominokit.jackson.ObjectMapper>> {}*
>>>
>>> * ... *
>>>
>>> * AltriMetadatiDTOMapper altriMetadatiDTOMapper = 
>>> GWT.create(AltriMetadatiDTOMappe.class); String jsonAltriMetadati = 
>>> altriMetadatiDTOMapper.write(object); *
>>>
>>> but it give to me this error
>>> [ERROR] Errors in 'xxx.java' [INFO] [ERROR] Line 662: Rebind result 
>>> 'xxx.AltriMetadatiDTOMapper' must be a class
>>>
>>> Did anyone know what i'm doing wrong ?
>>>
>>

-- 
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/226c4807-d150-4d8b-8baa-9426c0686e08n%40googlegroups.com.


Re: Help to undrerstand how to use domino-jackson and the annotation JSONMapper

2024-04-15 Thread Marco Tenti (IoProgrammo88)
The problem i cannot find the generate class "Person_MapperImpl" is under 
the target folder somewhere ?

Il giorno venerdì 12 aprile 2024 alle 18:25:30 UTC+2 Thomas Broyer ha 
scritto:

> Aren't you supposed to directly use the generated class rather than using 
> GWT.create() ? (unless you also added a  in your gwt.xml)
>
> https://dominokit.com/solutions/domino-jackson/v1/docs/getting-started/quick-start
>
> On Friday, April 12, 2024 at 1:20:27 PM UTC+2 tenti...@gmail.com wrote:
>
>> I'm upgrading a old project and i want to replace the old gwt-jackson (
>> https://dominokit.com/solutions/domino-jackson/v1)  with the 
>> domino-jackson project (https://github.com/DominoKit/domino-jackson).
>>
>> It should be a simple transiction, but i cannot understand how to let the 
>> GWT compilation "see" the implementations classes of the ObjectMapper 
>> interface.
>>
>> *Here the "old" code from gwt-jackson*
>>
>> *public static interface AltriMetadatiDTOMapper extends 
>> com.github.nmorel.gwtjackson.client.ObjectMapper>>
>>  
>> {} *
>>
>> * ... *
>>
>> * AltriMetadatiDTOMapper altriMetadatiDTOMapper = 
>> GWT.create(AltriMetadatiDTOMapper.class); String jsonAltriMetadati = 
>> altriMetadatiDTOMapper.write(object); *
>>
>> *Here the "new" code from domino-jackson*
>> *@org.dominokit.jackson.annotation.JSONMapper public interface 
>> AltriMetadatiDTOMapper extends 
>> org.dominokit.jackson.ObjectMapper>> {}*
>>
>> * ... *
>>
>> * AltriMetadatiDTOMapper altriMetadatiDTOMapper = 
>> GWT.create(AltriMetadatiDTOMappe.class); String jsonAltriMetadati = 
>> altriMetadatiDTOMapper.write(object); *
>>
>> but it give to me this error
>> [ERROR] Errors in 'xxx.java' [INFO] [ERROR] Line 662: Rebind result 
>> 'xxx.AltriMetadatiDTOMapper' must be a class
>>
>> Did anyone know what i'm doing wrong ?
>>
>

-- 
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/ebe6821a-dc64-4cd9-bf5f-5d9e4d230e40n%40googlegroups.com.


Re: Really need help getting CodeServer to run with Java 11 and GWT 2.10

2024-04-12 Thread Marco Tenti (IoProgrammo88)
This project has many good examples to check 
out https://github.com/NaluKit/nalu-examples, it help me a lot.

Il giorno venerdì 12 aprile 2024 alle 14:39:16 UTC+2 Mathias ha scritto:

> Hey Jens, thanks for replying!
>
> re. the gwt-type:
>
> 1. I only have one maven module that contains the entry point. the "gwt 
> client" module
> 2. All dependencies are either on third-party such as Lombok, or my own 
> other modules that only contain java classes and are built as jar-files.
> 3. I added the "type" gwt-lib to the dependencies in the "gwt client" pom, 
> but I didn't do anything to the pom files in the jar modules that the gwt 
> client depend on. I mean, Lombok doesn't have a packaging 
> gwt-lib in its pom, either. 
>
> On Friday 12 April 2024 at 11:15:38 UTC+2 Jens wrote:
>
>> A full example for multiple maven modules (more than just three) can be 
>> found here: 
>> https://github.com/tbroyer/gwt-maven-plugin/tree/main/src/it/e2e
>>
>> You have to add gwt-lib to your own maven library 
>> modules that contain a module.gwt.xml file. Maybe you forgot that?
>>
>> -- J.
>>
>> Mathias schrieb am Freitag, 12. April 2024 um 07:50:42 UTC+2:
>>
>>> I *really* could use some help getting my project up for development 
>>> after moving to gwt 2.10 and Java 11.
>>> I can unfortunately nolonger use the GWT intellij plugin i've loved and 
>>> used for 12 years apparently, and i'm struggling a bit to get the 
>>> codeserver running for my project.
>>>
>>> *CURRENT STATUS:*
>>> My project is over 12 years, but i migrated it from the old gwt mojo 
>>> plugin to the new tbroyer one last year.
>>> It builds into a war fine and deploys on tomcat. Prior to the migration 
>>> to GWT 2.10 (with new Jetty) and Java 11, i could run it with the GWT 
>>> Intellij plugin, which I've loved and used for those same 12 years. 
>>> But now the plugin unfortunately doesn't work, and from what I can tell 
>>> due to the JettyLauncher, (I get lots of classnotfounds for for example 
>>> javax.sql.DataSource)  it's kind of impossible to make it run? So I thought 
>>> I'd try what people have been saying, move to the manual thing with server 
>>> and code server, even though it's a more cumbersome setup.
>>>
>>> As part of trying to get this show on the road, i created an archetype 
>>> project and got codeserver and server running according to the new v2 
>>> tutorial. This works fine.
>>>
>>> *PROBLEM:*
>>> Basically i can't get the codeserver to run. My project is pretty large 
>>> so my "webclient" module that contains my gwt client has a bunch of 
>>> dependencies on my own child modules, and a couple of third-party ones such 
>>> as Lombok.
>>>
>>>
>>> When i try the codeserver with this command (from the tutorial)
>>> * mvn gwt:codeserver -pl webclient -am*
>>>
>>> ,where the webclient is the module containing the gwt code and entry 
>>> point, standing in the root dir of my project,
>>> ,i get page up and page down filled with missing dependencies from stuff 
>>> and "did you forget to inherit"-errors. (see error extract at the bottom)
>>>
>>> -I'm not sure if this has something to do with the "workdir", the 
>>> directory i stand in when i try to start the codeserver as described above, 
>>> some dependency declaration i'm missing or something else.
>>>
>>> -My dependencies should be ok since i can build it with the plugin, so 
>>> i'm a bit at a loss as to how make this work.
>>>
>>> -Help would be much appreciated, right now i can't develop and rolling 
>>> our project back to 2.8 and Java 8 wouldn't be great and take time. Man how 
>>> I wish that the intellij plugin had just kept working.
>>>
>>> as a final aside:
>>> The "neither a gwt-lib or jar" warning messages in the error log below - 
>>> i still get it if i add the gwt-lib type to the dependency, and the 
>>> archetype project prints the same error when created.
>>>
>>> *Extract from the error log:*
>>>
>>> [INFO] Ignoring com.myproject:generalcommons:jar:1.0-SNAPSHOT; neither a 
>>> gwt-lib or jar:sources; Did you forget to use gwt-lib in the 
>>> dependency declaration?
>>> [INFO] Ignoring com.myproject:webshared:jar:1.0-SNAPSHOT; neither a 
>>> gwt-lib or jar:sources; Did you forget to use gwt-lib in the 
>>> dependency declaration?
>>> [INFO] Ignoring com.myproject:webmaps:jar:1.0-SNAPSHOT; neither a 
>>> gwt-lib or jar:sources; Did you forget to use gwt-lib in the 
>>> dependency declaration?
>>> [INFO] Ignoring com.myproject:webshared:jar:1.0-SNAPSHOT; neither a 
>>> gwt-lib or jar:sources; Did you forget to use gwt-lib in the 
>>> dependency declaration?
>>> [INFO] Turning off precompile in incremental mode.
>>> [INFO] Super Dev Mode starting up
>>> [INFO]workDir: 
>>> /Users/mathias/.projects/myproject/target/gwt/codeserver
>>> [INFO][WARN] Deactivated PrecompressLinker
>>> [INFO] 19:00:51.710 [main] INFO org.eclipse.jetty.util.log - Logging 
>>> initialized @778ms to org.eclipse.jetty.util.log.Slf4jLog
>>> [INFO] 19:00:51.714 [main] DEBUG 
>>> org.ecl

Help to undrerstand how to use domino-jackson and the annotation JSONMapper

2024-04-12 Thread Marco Tenti (IoProgrammo88)
I'm upgrading a old project and i want to replace the old gwt-jackson 
(https://dominokit.com/solutions/domino-jackson/v1)  with the 
domino-jackson project (https://github.com/DominoKit/domino-jackson).

It should be a simple transiction, but i cannot understand how to let the 
GWT compilation "see" the implementations classes of the ObjectMapper 
interface.

*Here the "old" code from gwt-jackson*

*public static interface AltriMetadatiDTOMapper extends 
com.github.nmorel.gwtjackson.client.ObjectMapper>>
 
{} *

* ... *

* AltriMetadatiDTOMapper altriMetadatiDTOMapper = 
GWT.create(AltriMetadatiDTOMapper.class); String jsonAltriMetadati = 
altriMetadatiDTOMapper.write(object); *

*Here the "new" code from domino-jackson*
*@org.dominokit.jackson.annotation.JSONMapper public interface 
AltriMetadatiDTOMapper extends 
org.dominokit.jackson.ObjectMapper>> {}*

* ... *

* AltriMetadatiDTOMapper altriMetadatiDTOMapper = 
GWT.create(AltriMetadatiDTOMappe.class); String jsonAltriMetadati = 
altriMetadatiDTOMapper.write(object); *

but it give to me this error
[ERROR] Errors in 'xxx.java' [INFO] [ERROR] Line 662: Rebind result 
'xxx.AltriMetadatiDTOMapper' must be a class

Did anyone know what i'm doing wrong ?

-- 
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/bc645145-3583-48ea-a757-ec2a2ad700c5n%40googlegroups.com.


Re: How to debug the java code on the eclipse ide with the tbroyer gwt maven plugin ?

2023-12-11 Thread Marco Tenti (IoProgrammo88)
So this debug mode is deprecated  
https://www.gwtproject.org/doc/latest/tutorial/debug.html  ? 

When I launch the "gwt:codeServer" command, i  go to the sources panel of 
the browser chrome, and I can browse the code and set the breakpoints , but 
I can not "see" the runtime values of the variables as it happens with 
standard javascript is this correct ?

 [image: ErrorPskCallStack.png]

Il giorno lunedì 4 dicembre 2023 alle 13:30:37 UTC+1 Ralph Fiergolla ha 
scritto:

> If I am not mistaken, you are mixing up things a little: the issue you 
> were looking at here https://github.com/tbroyer/gwt-maven-plugin/issues/82 
> is not about debugging the generated client part of your application, but 
> about the compiler that is actually generating the code you want to debug. 
>
> To avoid wasting your time trying to set up the Eclipse Plugin I would 
> suggest using your browser's built-in development tools (Ctrl+Shift+I). You 
> will see your JAVA source code and can put your breakpoints etc. and step 
> through your code. This works in Chrome, Firefox, Edge.
>
> Bon courage
> Ralph
>
> On Mon, Dec 4, 2023 at 1:16 PM Marco Tenti (IoProgrammo88) <
> tenti...@gmail.com> wrote:
>
>> Hello everyone, I am updating some old gwt projects and I started to 
>> study about 15 days ago the gwt framework, this is to specify that I don't 
>> know all the secrets of the framework yet.
>>
>> Following Nalu's approach and starting from his example at 
>> https://github.com/NaluKit/nalu-examples/tree/main/nalu-simple-app-example, 
>> I was able to start with the gwt:codeserver both client and server part of 
>> my projects successfully.
>>
>> Unfortunately, I still haven't figured out what I need to do to 
>> enablethe  debugging on the client part of the project on the IDE eclipse.
>>
>> I've read in this issue 
>> https://github.com/tbroyer/gwt-maven-plugin/issues/82 a possible 
>> solution, but it doesn't seem to work, I'm 100% sure I'm doing something 
>> wrong myself., can anyone tell me looking at Nalu's example what additional 
>> commands I need to set to configure to debugging on the client java code in 
>> the eclipse ide ?
>>
>> -- 
>> 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-tool...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-web-toolkit/3369c8a1-d86f-40de-9816-d35d865a1e4en%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-web-toolkit/3369c8a1-d86f-40de-9816-d35d865a1e4en%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/ed37a5ea-c5fa-4a74-9c37-3839311f410en%40googlegroups.com.


How to debug the java code on the eclipse ide with the tbroyer gwt maven plugin ?

2023-12-04 Thread Marco Tenti (IoProgrammo88)
Hello everyone, I am updating some old gwt projects and I started to study 
about 15 days ago the gwt framework, this is to specify that I don't know 
all the secrets of the framework yet.

Following Nalu's approach and starting from his example at 
https://github.com/NaluKit/nalu-examples/tree/main/nalu-simple-app-example, 
I was able to start with the gwt:codeserver both client and server part of 
my projects successfully.

Unfortunately, I still haven't figured out what I need to do to enablethe  
debugging on the client part of the project on the IDE eclipse.

I've read in this issue 
https://github.com/tbroyer/gwt-maven-plugin/issues/82 a possible solution, 
but it doesn't seem to work, I'm 100% sure I'm doing something wrong 
myself., can anyone tell me looking at Nalu's example what additional 
commands I need to set to configure to debugging on the client java code in 
the eclipse ide ?

-- 
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/3369c8a1-d86f-40de-9816-d35d865a1e4en%40googlegroups.com.