Wednesday, October 31, 2018

Re: java.util.Date clientside incorrect timezone

For properly working with timezones you have to use ZonedDateTime.
It's emulated for GWT, see https://github.com/slavap/gwt-joda-java-time

On Tuesday, October 30, 2018 at 5:49:25 AM UTC-7, Edson Richter wrote:
Did you find a solution?



Em quinta-feira, 6 de novembro de 2014 10:18:13 UTC-2, Stepan escreveu:
hello everyone!

I have a strange problem with dates. when i work in dev mode all is ok, but when i work in web mode i have problems on client side. 

i have this code on the client side(App gwt + gxt). 

private static Logger log = Logger.getLogger("DateUtils");
.....
log.log(Level.INFO, to + " " + from);
return (int) ((to.getTime() - from.getTime()) / MILLIS_IN_DAY);

This code write in chrome console when i  am use two dates:

Thu Nov 06 14:48:34 GMT+300 2014 DateUtils

INFO: Fri Jan 09 00:00:00 GMT+400 2015 Tue Jan 06 00:00:00 GMT+300 2015 


in Russia we have transition 26 october and  now in Moscow, we have always timezone GMT +3 (in the past has been the time zone GMT +4).
i am apply to java tzupdater and on server side all it is ok. problem only on client side in java.util.Date

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Plug in External Application to GWT

Just use iframe for hosting external app inside of the panel of your GWT app.

On Thursday, October 25, 2018 at 3:25:56 PM UTC-7, Vishal Mistry wrote:


On Thursday, 25 October 2018 20:12:49 UTC+11, Jens wrote:
If that external application produces a HTML page then yes, you could display this HTML page in an HTML iframe within a GWT application. Otherwise you must rebuild the UI of the external application in your GWT app and query the external application for data that you use to fill the UI of your GWT app. Querying for data can either happen directly from the GWT app using HTTP requests or indirectly by first querying a HTTP server you implement which in turn asks your external application somehow to provide the data.

While you program in Java when using GWT, at the end you just get a JavaScript application. So in GWT you can only do what a Web Browser / Node.Js allows you to do. Or put differently: If you can't solve your issue using plain JavaScript + HTML then you can't solve it using GWT.

-- J.

Thanks a lot Jens for your quick response on my post...much appreciated 

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: StackPanel Toggle

@Rogelio, Thanks for your input. Please see animated gif here: http://www.AppyBuilder.com/temp/stackpanel.gif
It uses StackPanel. However, Stackpanel, by default opens-up the 1st panel. What I like to do is to be able to toggle and expand OR collapse (e.g. User Interface panel). 

So, what you are saying is that I need to overwrite the default behavior?

Thanks,
-Hossein.

On Wednesday, October 31, 2018 at 2:16:14 PM UTC-4, Rogelio Flores wrote:
Ok, I forgot about the StackPanel, which already does what you want, except you have to click on the header of each "stacked" panel, so I assume what you want is to click on the "body" of the panel (?) or add the ability to open multiple panels at the same time (?). I don't think StackPanel (or better, you should use StackLayoutPanel), support either of these two capabilities. To create that behavior, see if you can extend and overwrite the default behavior of StackPanel, otherwise, you might want to consider other widget libraries such as DominoUI which already has a Collapse component that supports multiple subpanels to be opened at the same time for example. I don't know of any widget that supports clicking anywhere to collapse/expand:



On Tuesday, October 30, 2018 at 6:43:02 PM UTC-6, Hossein wrote:
@Rogelio,

Thanks for your response. Please see attached. How would I create that behavior myself? Any help would be appreciated.

Thanks

On Tuesday, October 30, 2018 at 7:13:51 PM UTC-4, Rogelio Flores wrote:
Of course you can always create that behavior yourself, or you could simply put your panel inside a DisclosurePanel:



On Monday, October 29, 2018 at 2:56:31 PM UTC-6, Hossein wrote:
Is it possible to toggle the StackPanel; i.e. clicking will open; and consecutive click will collapse.

Thanks,
Hossein.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: StackPanel Toggle

@Rogelio, Thanks for your input. Please see attached animated gif.
It uses StackPanel. However, Stackpanel, by default opens-up the 1st panel. What I like to do is to be able to toggle and expand OR collapse (e.g. User Interface panel). 

So, what you are saying is that I need to overwrite the default behavior?

Thanks,
-Hossein.

On Wednesday, October 31, 2018 at 2:16:14 PM UTC-4, Rogelio Flores wrote:
Ok, I forgot about the StackPanel, which already does what you want, except you have to click on the header of each "stacked" panel, so I assume what you want is to click on the "body" of the panel (?) or add the ability to open multiple panels at the same time (?). I don't think StackPanel (or better, you should use StackLayoutPanel), support either of these two capabilities. To create that behavior, see if you can extend and overwrite the default behavior of StackPanel, otherwise, you might want to consider other widget libraries such as DominoUI which already has a Collapse component that supports multiple subpanels to be opened at the same time for example. I don't know of any widget that supports clicking anywhere to collapse/expand:



On Tuesday, October 30, 2018 at 6:43:02 PM UTC-6, Hossein wrote:
@Rogelio,

Thanks for your response. Please see attached. How would I create that behavior myself? Any help would be appreciated.

Thanks

On Tuesday, October 30, 2018 at 7:13:51 PM UTC-4, Rogelio Flores wrote:
Of course you can always create that behavior yourself, or you could simply put your panel inside a DisclosurePanel:



On Monday, October 29, 2018 at 2:56:31 PM UTC-6, Hossein wrote:
Is it possible to toggle the StackPanel; i.e. clicking will open; and consecutive click will collapse.

Thanks,
Hossein.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: StackPanel Toggle

Ok, I forgot about the StackPanel, which already does what you want, except you have to click on the header of each "stacked" panel, so I assume what you want is to click on the "body" of the panel (?) or add the ability to open multiple panels at the same time (?). I don't think StackPanel (or better, you should use StackLayoutPanel), support either of these two capabilities. To create that behavior, see if you can extend and overwrite the default behavior of StackPanel, otherwise, you might want to consider other widget libraries such as DominoUI which already has a Collapse component that supports multiple subpanels to be opened at the same time for example. I don't know of any widget that supports clicking anywhere to collapse/expand:

https://dominokit.github.io/domino-ui-demo/index.html?theme=indigo#components/collapse


On Tuesday, October 30, 2018 at 6:43:02 PM UTC-6, Hossein wrote:
@Rogelio,

Thanks for your response. Please see attached. How would I create that behavior myself? Any help would be appreciated.

Thanks

On Tuesday, October 30, 2018 at 7:13:51 PM UTC-4, Rogelio Flores wrote:
Of course you can always create that behavior yourself, or you could simply put your panel inside a DisclosurePanel:



On Monday, October 29, 2018 at 2:56:31 PM UTC-6, Hossein wrote:
Is it possible to toggle the StackPanel; i.e. clicking will open; and consecutive click will collapse.

Thanks,
Hossein.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Dynamic SelectionCell

I misunderstood your question to mean that you just wanted to make data dynamic in your table, which looks like you already are, except for the SelectionCell.

Looks like SelectionCell can only get its list of available options in its constructor, so what I would try is getting the updated list of options from the server (or wherever you get them) before getting the new values to display on the table, replace the SelectionCell with the new values in your table, and then get the values to display on the table immediately after (assuming you get a new list of options for the SelectionCell every time you get a new list of values for the table).


On Wednesday, October 31, 2018 at 3:04:20 AM UTC-6, Ousti Driss wrote:
Can you elaborate ? 
I managed to update all the columns with the response I got from the servlet, except the one with the selection cell,
this is how I instanciate a SelectionCell
Column<Record, String> categoryColumn = new Column<Record, String>(new SelectionCell(list)) {
}
where list is a List<String>,
therefore all my rows have list as value in the categoryColumn ...

On Wednesday, October 31, 2018 at 12:22:43 AM UTC+1, Rogelio Flores wrote:
Of course it is possible, just look at the CellTable in the GWT Showcase:

http://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwCellTable

Instead of a DataProvider as in the example, you probably want an AsyncDataProvider which gets the data from the server through your servlet.


On Monday, October 29, 2018 at 9:38:52 AM UTC-6, Ousti Driss wrote:
Hi everyone!!
I have a cell table which contains three rows.
I added a selection cell column,
the problem is the contents of this columns is static, I need something similar, but instead of being static I can update it with the response I get from my servlet
is such thing possible? 
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-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Dynamic SelectionCell

Can you elaborate ? 
I managed to update all the columns with the response I got from the servlet, except the one with the selection cell,
this is how I instanciate a SelectionCell
Column<Record, String> categoryColumn = new Column<Record, String>(new SelectionCell(list)) {
}
where list is a List<String>,
therefore all my rows have list as value in the categoryColumn ...

On Wednesday, October 31, 2018 at 12:22:43 AM UTC+1, Rogelio Flores wrote:
Of course it is possible, just look at the CellTable in the GWT Showcase:

http://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwCellTable

Instead of a DataProvider as in the example, you probably want an AsyncDataProvider which gets the data from the server through your servlet.


On Monday, October 29, 2018 at 9:38:52 AM UTC-6, Ousti Driss wrote:
Hi everyone!!
I have a cell table which contains three rows.
I added a selection cell column,
the problem is the contents of this columns is static, I need something similar, but instead of being static I can update it with the response I get from my servlet
is such thing possible? 
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-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Tuesday, October 30, 2018

Re: StackPanel Toggle

@Rogelio,

Thanks for your response. Please see attached. How would I create that behavior myself? Any help would be appreciated.

Thanks

On Tuesday, October 30, 2018 at 7:13:51 PM UTC-4, Rogelio Flores wrote:
Of course you can always create that behavior yourself, or you could simply put your panel inside a DisclosurePanel:



On Monday, October 29, 2018 at 2:56:31 PM UTC-6, Hossein wrote:
Is it possible to toggle the StackPanel; i.e. clicking will open; and consecutive click will collapse.

Thanks,
Hossein.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Dynamic SelectionCell

Of course it is possible, just look at the CellTable in the GWT Showcase:

http://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwCellTable

Instead of a DataProvider as in the example, you probably want an AsyncDataProvider which gets the data from the server through your servlet.


On Monday, October 29, 2018 at 9:38:52 AM UTC-6, Ousti Driss wrote:
Hi everyone!!
I have a cell table which contains three rows.
I added a selection cell column,
the problem is the contents of this columns is static, I need something similar, but instead of being static I can update it with the response I get from my servlet
is such thing possible? 
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-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: StackPanel Toggle

Of course you can always create that behavior yourself, or you could simply put your panel inside a DisclosurePanel:

http://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwDisclosurePanel


On Monday, October 29, 2018 at 2:56:31 PM UTC-6, Hossein wrote:
Is it possible to toggle the StackPanel; i.e. clicking will open; and consecutive click will collapse.

Thanks,
Hossein.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Hash of a Java Type

The hash is a hash of the class, not the value. It's there to ensure that the client and server use the exact same classes, with the same fields, of the same types, in the same order.
This means that the value is dependent on the version of oVirt that you're using, and only on the version of oVirt. IIRC, you should be able to find them in the serialization policy files, or of course in the JS files running in the browser (the hash is computed at compile-time, not at runtime, at least on the client-side, can't remember on the server)
Whenever you update oVirt, the hashes might change, which means that the way the objects are serialized/deserialized has changed; this means you'll then need to update your proxy to account for the changes.

On Tuesday, October 30, 2018 at 1:51:13 PM UTC+1, Anastasiya Ruzhanskaya wrote:
Are there any ideas about this hash function?

пн, 29 окт. 2018 г. в 11:38, Anastasiya Ruzhanskaya <anastasiya.ruzhanskaya@frtk.ru>:
Hello!
I am trying to build a proxy, which will intercept requests from oVirt and send errors if the action should not be performed. I just need to implement it in such a manner due to some legacy issues with using internal access control.

I think that by importing some information from oVirt I can easily parse the message in order to find the action type and id of the object on which it is performed.

The problem is with the answer: I need to send the valid answer.
I created a user in oVirt which is a read-only user. So, I get the following answer:

//OK[0,0,10,0,471,9,8,1,0,1,0,1,7,0,0,0,1,6,3,5,3,4,3,3,1,0,2,1,1,["java.util.ArrayList/4159755760","org.ovirt.engine.core.common.action.ActionReturnValue/4163585948","java.lang.String/2004016611","VAR__ACTION__SHUTDOWN","VAR__TYPE__VM","USER_NOT_AUTHORIZED_TO_PERFORM_ACTION","vm1","org.ovirt.engine.core.common.errors.EngineFault/2377218566","org.ovirt.engine.core.common.errors.EngineError/1938278732","ENGINE"],0,7]

I think the answer should be always pretty the same (maybe only for some cases another one). The only thing which I find tricky here is how to generate a valid hash value?

I found a function in sources of GWT but it accepts a serialization policy and the custom serializers (which is not appropriate for me as for incoming requests I will always look for action type and then object, and for answers I want just to generate this type errors, which I provided above, so I want to include to my proxy as minimum additional information as possible).

So, I would like to find an easy way of generation this hash values (org.ovirt.engine.core.common.errors.EngineFault/2377218566). Or probably it is even possible not ti generate them at all?

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Hash of a Java Type

Are there any ideas about this hash function?

пн, 29 окт. 2018 г. в 11:38, Anastasiya Ruzhanskaya <anastasiya.ruzhanskaya@frtk.ru>:
Hello!
I am trying to build a proxy, which will intercept requests from oVirt and send errors if the action should not be performed. I just need to implement it in such a manner due to some legacy issues with using internal access control.

I think that by importing some information from oVirt I can easily parse the message in order to find the action type and id of the object on which it is performed.

The problem is with the answer: I need to send the valid answer.
I created a user in oVirt which is a read-only user. So, I get the following answer:

//OK[0,0,10,0,471,9,8,1,0,1,0,1,7,0,0,0,1,6,3,5,3,4,3,3,1,0,2,1,1,["java.util.ArrayList/4159755760","org.ovirt.engine.core.common.action.ActionReturnValue/4163585948","java.lang.String/2004016611","VAR__ACTION__SHUTDOWN","VAR__TYPE__VM","USER_NOT_AUTHORIZED_TO_PERFORM_ACTION","vm1","org.ovirt.engine.core.common.errors.EngineFault/2377218566","org.ovirt.engine.core.common.errors.EngineError/1938278732","ENGINE"],0,7]

I think the answer should be always pretty the same (maybe only for some cases another one). The only thing which I find tricky here is how to generate a valid hash value?

I found a function in sources of GWT but it accepts a serialization policy and the custom serializers (which is not appropriate for me as for incoming requests I will always look for action type and then object, and for answers I want just to generate this type errors, which I provided above, so I want to include to my proxy as minimum additional information as possible).

So, I would like to find an easy way of generation this hash values (org.ovirt.engine.core.common.errors.EngineFault/2377218566). Or probably it is even possible not ti generate them at all?

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: java.util.Date clientside incorrect timezone

Did you find a solution?



Em quinta-feira, 6 de novembro de 2014 10:18:13 UTC-2, Stepan escreveu:
hello everyone!

I have a strange problem with dates. when i work in dev mode all is ok, but when i work in web mode i have problems on client side. 

i have this code on the client side(App gwt + gxt). 

private static Logger log = Logger.getLogger("DateUtils");
.....
log.log(Level.INFO, to + " " + from);
return (int) ((to.getTime() - from.getTime()) / MILLIS_IN_DAY);

This code write in chrome console when i  am use two dates:

Thu Nov 06 14:48:34 GMT+300 2014 DateUtils

INFO: Fri Jan 09 00:00:00 GMT+400 2015 Tue Jan 06 00:00:00 GMT+300 2015 


in Russia we have transition 26 october and  now in Moscow, we have always timezone GMT +3 (in the past has been the time zone GMT +4).
i am apply to java tzupdater and on server side all it is ok. problem only on client side in java.util.Date

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Monday, October 29, 2018

StackPanel Toggle

Is it possible to toggle the StackPanel; i.e. clicking will open; and consecutive click will collapse.

Thanks,
Hossein.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Dynamic SelectionCell

Hi everyone!!
I have a cell table which contains three rows.
I added a selection cell column,
the problem is the contents of this columns is static, I need something similar, but instead of being static I can update it with the response I get from my servlet
is such thing possible? 
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-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Hash of a Java Type

Hello!
I am trying to build a proxy, which will intercept requests from oVirt and send errors if the action should not be performed. I just need to implement it in such a manner due to some legacy issues with using internal access control.

I think that by importing some information from oVirt I can easily parse the message in order to find the action type and id of the object on which it is performed.

The problem is with the answer: I need to send the valid answer.
I created a user in oVirt which is a read-only user. So, I get the following answer:

//OK[0,0,10,0,471,9,8,1,0,1,0,1,7,0,0,0,1,6,3,5,3,4,3,3,1,0,2,1,1,["java.util.ArrayList/4159755760","org.ovirt.engine.core.common.action.ActionReturnValue/4163585948","java.lang.String/2004016611","VAR__ACTION__SHUTDOWN","VAR__TYPE__VM","USER_NOT_AUTHORIZED_TO_PERFORM_ACTION","vm1","org.ovirt.engine.core.common.errors.EngineFault/2377218566","org.ovirt.engine.core.common.errors.EngineError/1938278732","ENGINE"],0,7]

I think the answer should be always pretty the same (maybe only for some cases another one). The only thing which I find tricky here is how to generate a valid hash value?

I found a function in sources of GWT but it accepts a serialization policy and the custom serializers (which is not appropriate for me as for incoming requests I will always look for action type and then object, and for answers I want just to generate this type errors, which I provided above, so I want to include to my proxy as minimum additional information as possible).

So, I would like to find an easy way of generation this hash values (org.ovirt.engine.core.common.errors.EngineFault/2377218566). Or probably it is even possible not ti generate them at all?

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Thursday, October 25, 2018

Re: Plug in External Application to GWT



On Thursday, 25 October 2018 20:12:49 UTC+11, Jens wrote:
If that external application produces a HTML page then yes, you could display this HTML page in an HTML iframe within a GWT application. Otherwise you must rebuild the UI of the external application in your GWT app and query the external application for data that you use to fill the UI of your GWT app. Querying for data can either happen directly from the GWT app using HTTP requests or indirectly by first querying a HTTP server you implement which in turn asks your external application somehow to provide the data.

While you program in Java when using GWT, at the end you just get a JavaScript application. So in GWT you can only do what a Web Browser / Node.Js allows you to do. Or put differently: If you can't solve your issue using plain JavaScript + HTML then you can't solve it using GWT.

-- J.

Thanks a lot Jens for your quick response on my post...much appreciated 

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: How to dispose entire memory which is occupied by a GWT-Module

Thank You, Thomas, for instant answer!

Am Donnerstag, 25. Oktober 2018 18:11:05 UTC+2 schrieb Thomas Broyer:


On Thursday, October 25, 2018 at 3:16:11 PM UTC+2, Jewgenij Moldawski wrote:
Dear GWT Experts,
I've a website with a GWT-App-area. For our purposes I want to end the GWT-App and release the entire memory, which this GWT-App occupies in my browser.
How can I do it?

You can't.

There's been an attempt (something like 4–5 years ago) to "unload" a GWT module (and hope for the browser to garbage-collect it), but it wasn't conclusive and was ultimately reverted.

If you really need to "unload" something, navigate away (possibly by having it run in an iframe)

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: How to dispose entire memory which is occupied by a GWT-Module



On Thursday, October 25, 2018 at 3:16:11 PM UTC+2, Jewgenij Moldawski wrote:
Dear GWT Experts,
I've a website with a GWT-App-area. For our purposes I want to end the GWT-App and release the entire memory, which this GWT-App occupies in my browser.
How can I do it?

You can't.

There's been an attempt (something like 4–5 years ago) to "unload" a GWT module (and hope for the browser to garbage-collect it), but it wasn't conclusive and was ultimately reverted.

If you really need to "unload" something, navigate away (possibly by having it run in an iframe)

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

How to dispose entire memory which is occupied by a GWT-Module

Dear GWT Experts,
I've a website with a GWT-App-area. For our purposes I want to end the GWT-App and release the entire memory, which this GWT-App occupies in my browser.
How can I do it?
Thanks a lot in advance!

JeMo

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Plug in External Application to GWT

If that external application produces a HTML page then yes, you could display this HTML page in an HTML iframe within a GWT application. Otherwise you must rebuild the UI of the external application in your GWT app and query the external application for data that you use to fill the UI of your GWT app. Querying for data can either happen directly from the GWT app using HTTP requests or indirectly by first querying a HTTP server you implement which in turn asks your external application somehow to provide the data.

While you program in Java when using GWT, at the end you just get a JavaScript application. So in GWT you can only do what a Web Browser / Node.Js allows you to do. Or put differently: If you can't solve your issue using plain JavaScript + HTML then you can't solve it using GWT.

-- J.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Wednesday, October 24, 2018

Plug in External Application to GWT

Hi,
I am bit new to GWT and need guidance on following.
I am trying to plug in external application (which is developed in different technology) to GWT. Is there any way I can call an external application from GWT and it will be displayed in one of the panel ?

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

gRPC-Web for GWT and/or J2CL?

Hi,

It seems like gRPC has gone GA.

https://www.cncf.io/blog/2018/10/24/grpc-web-is-going-ga/

It seems it can emit closure annotated classes and I guess it would be
not too hard to output the equivalent jsinterop annotated classes.
This would make it very easy to get excellent integration into J2CL
and event GWT2.x.

Eyeballing it makes it seem like a very attractive target. Has anyone
used it or done any work with it before? Or know of any equivalent
GWTish generator for it.

--
Cheers,

Peter Donald

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: Preferred IDE

Hi, 

I am using Eclipse (STS 4.0) with GWT plugin and it just works.

Stas

On Saturday, October 13, 2018 at 5:22:46 PM UTC+2, subroutines wrote:
Hi,

I am curious to know what is preferred IDE to use GWT?

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Orientation For GWT Mobile Application

Is there any chance to identify the Orientation of the application and change the orientation for the application in GWT.

I am using iPad 12

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: parsing GWT messages in oVirt project (webadmin interface)


On Wednesday, October 24, 2018 at 7:21:08 AM UTC+2, Anastasiya Ruzhanskaya wrote:
Also I notice that there might be such situation: there is a  java list of elements, but instead of writing that this is a list type and it has 0 elements, I just have 0.
Also for guid:  there can stand also only 0 without specifying that this is guid type. I am not sure that it is impossible to determine this type in runtime as previously in the same message I already had guid fields.

For the example that I sent, the last numbers correspond to the following:

14(TransactionScopeOption)|2(enum, =required)|
0(useCinderCommandCallback)| (bool)
0(vdsRunningOn, null, guid)| (Guid)
0(vdsmTaskIds)| (List)
0(first last bool param)|
0(second last bool param)|


The vdsRunningOn and vdsmTaskIds are 'null'. Specifically, vdsmTaskIds is not an empty list, it's 'null'; as in "vdsmTaskIds == null" would be 'true', and "vdsmTaskIds.isEmpty()" would throw a NullPointerException.
 

вторник, 23 октября 2018 г., 14:50:33 UTC+3 пользователь Thomas Broyer написал:


On Tuesday, October 23, 2018 at 1:16:57 PM UTC+2, Anastasiya Ruzhanskaya wrote:
Dear Thomas,
thank you a lot for a detailed answer!

I saw this documentation, but seems should look more thoroughly into serialization inside GWT.

Concerning the numbers 0|5|0|0|0 - after VmOperationParameterBase class where there is a private field vmId we move down to ActionParameterBase class (as you said), so 0 here will correspond to the first parameter inside this class in alphabetical order (seems commanId)? And five - to some value or to a type of parameter? (sometimes it is not clear does the payload mean the type or the value itself). There is a field there - ActionType commandType; which has type 5.

From the doc, if the declared type of the value is a primitive type or java.lang.String, then the value is used directly (for strings, 0 means null and all other values are indices in the string table); in all other cases (including "primitive wrapper types" such as java.lang.Boolean or java.lang.Integer), the value will always start with its runtime type (or 0 if it's null).

Assuming we're looking at the correct version of the sources, we'll indeed find, in order, commandId as a null Guid, commandType as the first constant of the ActionType enum (type = 5 = ActionType, followed by 0 = ordinal in the enum). The next 2 '0' would be compensationEnabled as a boolean false, and correlationId as a null String, respectively.
Next would be endProcedure, as the the second (ordinal = 1) constant of the EndProcedure enum, i.e. PARENT_MANAGED; and so on and so on.

The one thing that's not clear in the doc, is how to interpret negative values for objects (in place of the type or 0 for null, to reference an already deserialized object). I suppose that you could put each object into an array, and you'd use the absolute value as a 1-based index in that array.
I see a -6 in the payload, but I have no idea at first glance whether it'll be a numeric value or a reference to an already-deserialized object. You have to go through the pipe-delimited fields one by one to know what each one means.
 

вторник, 23 октября 2018 г., 13:26:06 UTC+3 пользователь Thomas Broyer написал:
On Tuesday, October 23, 2018 at 11:46:56 AM UTC+2, Anastasiya Ruzhanskaya wrote:
Hello all!
I am working with oVirt (which helps to manage virtual machines) project and it uses GWT RPC protocol in it's communications.
I want to parse messages in GWT RPC format which I get after deciphering the traffic.

I hope that even without being totally familiar with the ovirt project, someone will be able to help me a little bit.

I already separated it on some meaningful parts), numbers in braces just help to make correspondence between payload and strings:
7|
0|
14|
(1)https://engine.localdomain/ovirt-engine/webadmin/|  //URL
(2)E8B2AD24442204349EF795039C3B87E5|   // policy name
(3)org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTService| //service interface
(4)runMultipleActions| //name of the method
(5)org.ovirt.engine.core.common.action.ActionType/12242454|, // type1
(6)java.util.ArrayList/4159755760|, // type2
(7)Z| // type3 (bool)
(8)org.ovirt.engine.core.common.action.ShutdownVmParameters/1694554255| // class which contains uuid of the virtual machine
(9)org.ovirt.engine.core.compat.Guid/1992968158|
(10)java.util.UUID/2940008275| // seems the uuid of the virtual machine)
(11)org.ovirt.engine.core.common.action.ActionParametersBase$EndProcedure/1568822488|
(12)java.util.Collections$EmptyMap/4174664486|
(13)org.ovirt.engine.core.common.businessentities.VDSStatus/1938301532|
(14)org.ovirt.engine.core.compat.TransactionScopeOption/1475850853|
(the following is the payload separated and commented in places where I can understand it)
1|
2|
3|
4| 
4|- 4 method parameters
5|- first type = ActionType
6|- second type = arraylist
7|- third type = boolean
7|- fourth type = boolean
5(actionType)|9 (shutdown)|
6(arrayList)|1(??)|
8 (shutdown vm parameters, list object)|1|0|0|0|(??)
9 (guid, ?)|10(UUID)|J$m4mk9wVi3|MjeP460Xkpb (vm uuid)|0|5|0|0|0|11|1|0|6|0|0|0|0|0|0|12|0|-6|13|0|1|0|1|14|2|0|0|0|0|0|


Until virtual machine uuid parameter it is kind of clear what is happening, but I still wonder what do the parameters 1 and 0 mean in places marked as (??). I understand, that there is a method called runMultipleActions and it has four parameters. I found in source examples of calling this method .Then I determine types of these parameters. Then the type of action performed ( I shut down the machine). Then  there should be an ArrayList, which contains several objects. I assume that 8(shutdown vm parameters) should follow right after 6 (arraylist), but there a "1" which I can't explain. Also I don't know what for are these four boolean values (1|0|0|0) What do they mean? And how can I cope with the left payload?

This is the example of the call from ovirt source code:

ArrayList<ActionParametersBase> parameters = new ArrayList<>();
parameters
.add(new ActionParametersBase());
parameters
.get(0).setCommandId(Guid.Empty);
parameters
.add(new ActionParametersBase());
frontend
.runMultipleAction(ActionType.AddLocalStorageDomain, parameters, false, mockMultipleActionCallback,
                testState
);



Thank you in advance for any help!


I know this is kind of specific for oVirt but probably there is something more that I should know about parsing the messages ( in the internet I found a couple of articles about this, which helped me to understand the first part of the message).


The first value after the ArrayList runtime type is its length (see [1] and [2]). In this case, the list contains only one item.

Then, according to the doc, the fields of the ShutdownVmParameters are serialized in alphabetical order, walking up the class hierarchy. So the first boolean would be ShutdownVmParameters#waitBeforeShutdown (boolean true), followed by StopVmParametersBase#stopReason (0 means null), then VmOperationParameterBase#quotaId (again a null), and VmOperationParameterBase#rerun (boolean false).
This is then followed by VmOperationParameterBase#vmId, which is a Guid, itself having a single field of type UUID, which is serialized as a pair of longs by a UUID_CustomFieldSerializer [3], as you correctly identified.
Following would be the ActionParametersBase [4] fields, followed by the last 2 method arguments.


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Re: parsing GWT messages in oVirt project (webadmin interface)

A null is a null, it has no "runtime type". Whenever you're unserializing a Java object (non primitive, non String) value, you'll have:
  • either a 0, which means 'null' (and then you're done, there's nothing else to learn about a 'null')
  • or a positive number, which references the runtime type in the string table. This guides you to how you'll deserialize that value (look for a CustomFieldSerializer, otherwise use the zero-arg constructor then deserialize the object's fields). For example, the declared type (of the method parameter, or of an object's field) could be java.lang.Number, the runtime type will be any of its subclasses: java.lang.Double, java.lang.Long, java.math.BigDecimal, etc. those types will be (de)serialized in different ways.
  • or a negative number, referencing an object that has previously been deserialized (so you already know its actual type, etc.)

On Wednesday, October 24, 2018 at 6:53:21 AM UTC+2, Anastasiya Ruzhanskaya wrote:
Yes, -6 was the reference to already serialized values, seems from the previous calls.

Also I would like to ask, if there is a zero value in place where I see there should a type description in a payload, this means that we don't know how to decode it in runtime, but there will be some following info, or it is just 0 and we move to the next field in the class? Or this 0 could  also mean that this is an uninitialized value?

The first field of an object is a number indicating how to decode it. A '0' means null.

вторник, 23 октября 2018 г., 14:50:33 UTC+3 пользователь Thomas Broyer написал:


On Tuesday, October 23, 2018 at 1:16:57 PM UTC+2, Anastasiya Ruzhanskaya wrote:
Dear Thomas,
thank you a lot for a detailed answer!

I saw this documentation, but seems should look more thoroughly into serialization inside GWT.

Concerning the numbers 0|5|0|0|0 - after VmOperationParameterBase class where there is a private field vmId we move down to ActionParameterBase class (as you said), so 0 here will correspond to the first parameter inside this class in alphabetical order (seems commanId)? And five - to some value or to a type of parameter? (sometimes it is not clear does the payload mean the type or the value itself). There is a field there - ActionType commandType; which has type 5.

From the doc, if the declared type of the value is a primitive type or java.lang.String, then the value is used directly (for strings, 0 means null and all other values are indices in the string table); in all other cases (including "primitive wrapper types" such as java.lang.Boolean or java.lang.Integer), the value will always start with its runtime type (or 0 if it's null).

Assuming we're looking at the correct version of the sources, we'll indeed find, in order, commandId as a null Guid, commandType as the first constant of the ActionType enum (type = 5 = ActionType, followed by 0 = ordinal in the enum). The next 2 '0' would be compensationEnabled as a boolean false, and correlationId as a null String, respectively.
Next would be endProcedure, as the the second (ordinal = 1) constant of the EndProcedure enum, i.e. PARENT_MANAGED; and so on and so on.

The one thing that's not clear in the doc, is how to interpret negative values for objects (in place of the type or 0 for null, to reference an already deserialized object). I suppose that you could put each object into an array, and you'd use the absolute value as a 1-based index in that array.
I see a -6 in the payload, but I have no idea at first glance whether it'll be a numeric value or a reference to an already-deserialized object. You have to go through the pipe-delimited fields one by one to know what each one means.
 

вторник, 23 октября 2018 г., 13:26:06 UTC+3 пользователь Thomas Broyer написал:
On Tuesday, October 23, 2018 at 11:46:56 AM UTC+2, Anastasiya Ruzhanskaya wrote:
Hello all!
I am working with oVirt (which helps to manage virtual machines) project and it uses GWT RPC protocol in it's communications.
I want to parse messages in GWT RPC format which I get after deciphering the traffic.

I hope that even without being totally familiar with the ovirt project, someone will be able to help me a little bit.

I already separated it on some meaningful parts), numbers in braces just help to make correspondence between payload and strings:
7|
0|
14|
(1)https://engine.localdomain/ovirt-engine/webadmin/|  //URL
(2)E8B2AD24442204349EF795039C3B87E5|   // policy name
(3)org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTService| //service interface
(4)runMultipleActions| //name of the method
(5)org.ovirt.engine.core.common.action.ActionType/12242454|, // type1
(6)java.util.ArrayList/4159755760|, // type2
(7)Z| // type3 (bool)
(8)org.ovirt.engine.core.common.action.ShutdownVmParameters/1694554255| // class which contains uuid of the virtual machine
(9)org.ovirt.engine.core.compat.Guid/1992968158|
(10)java.util.UUID/2940008275| // seems the uuid of the virtual machine)
(11)org.ovirt.engine.core.common.action.ActionParametersBase$EndProcedure/1568822488|
(12)java.util.Collections$EmptyMap/4174664486|
(13)org.ovirt.engine.core.common.businessentities.VDSStatus/1938301532|
(14)org.ovirt.engine.core.compat.TransactionScopeOption/1475850853|
(the following is the payload separated and commented in places where I can understand it)
1|
2|
3|
4| 
4|- 4 method parameters
5|- first type = ActionType
6|- second type = arraylist
7|- third type = boolean
7|- fourth type = boolean
5(actionType)|9 (shutdown)|
6(arrayList)|1(??)|
8 (shutdown vm parameters, list object)|1|0|0|0|(??)
9 (guid, ?)|10(UUID)|J$m4mk9wVi3|MjeP460Xkpb (vm uuid)|0|5|0|0|0|11|1|0|6|0|0|0|0|0|0|12|0|-6|13|0|1|0|1|14|2|0|0|0|0|0|


Until virtual machine uuid parameter it is kind of clear what is happening, but I still wonder what do the parameters 1 and 0 mean in places marked as (??). I understand, that there is a method called runMultipleActions and it has four parameters. I found in source examples of calling this method .Then I determine types of these parameters. Then the type of action performed ( I shut down the machine). Then  there should be an ArrayList, which contains several objects. I assume that 8(shutdown vm parameters) should follow right after 6 (arraylist), but there a "1" which I can't explain. Also I don't know what for are these four boolean values (1|0|0|0) What do they mean? And how can I cope with the left payload?

This is the example of the call from ovirt source code:

ArrayList<ActionParametersBase> parameters = new ArrayList<>();
parameters
.add(new ActionParametersBase());
parameters
.get(0).setCommandId(Guid.Empty);
parameters
.add(new ActionParametersBase());
frontend
.runMultipleAction(ActionType.AddLocalStorageDomain, parameters, false, mockMultipleActionCallback,
                testState
);



Thank you in advance for any help!


I know this is kind of specific for oVirt but probably there is something more that I should know about parsing the messages ( in the internet I found a couple of articles about this, which helped me to understand the first part of the message).


The first value after the ArrayList runtime type is its length (see [1] and [2]). In this case, the list contains only one item.

Then, according to the doc, the fields of the ShutdownVmParameters are serialized in alphabetical order, walking up the class hierarchy. So the first boolean would be ShutdownVmParameters#waitBeforeShutdown (boolean true), followed by StopVmParametersBase#stopReason (0 means null), then VmOperationParameterBase#quotaId (again a null), and VmOperationParameterBase#rerun (boolean false).
This is then followed by VmOperationParameterBase#vmId, which is a Guid, itself having a single field of type UUID, which is serialized as a pair of longs by a UUID_CustomFieldSerializer [3], as you correctly identified.
Following would be the ActionParametersBase [4] fields, followed by the last 2 method arguments.


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Tuesday, October 23, 2018

Re: parsing GWT messages in oVirt project (webadmin interface)

Also I notice that there might be such situation: there is a  java list of elements, but instead of writing that this is a list type and it has 0 elements, I just have 0.
Also for guid:  there can stand also only 0 without specifying that this is guid type. I am not sure that it is impossible to determine this type in runtime as previously in the same message I already had guid fields.

For the example that I sent, the last numbers correspond to the following:

14(TransactionScopeOption)|2(enum, =required)|
0(useCinderCommandCallback)| (bool)
0(vdsRunningOn, null, guid)| (Guid)
0(vdsmTaskIds)| (List)
0(first last bool param)|
0(second last bool param)|



вторник, 23 октября 2018 г., 14:50:33 UTC+3 пользователь Thomas Broyer написал:


On Tuesday, October 23, 2018 at 1:16:57 PM UTC+2, Anastasiya Ruzhanskaya wrote:
Dear Thomas,
thank you a lot for a detailed answer!

I saw this documentation, but seems should look more thoroughly into serialization inside GWT.

Concerning the numbers 0|5|0|0|0 - after VmOperationParameterBase class where there is a private field vmId we move down to ActionParameterBase class (as you said), so 0 here will correspond to the first parameter inside this class in alphabetical order (seems commanId)? And five - to some value or to a type of parameter? (sometimes it is not clear does the payload mean the type or the value itself). There is a field there - ActionType commandType; which has type 5.

From the doc, if the declared type of the value is a primitive type or java.lang.String, then the value is used directly (for strings, 0 means null and all other values are indices in the string table); in all other cases (including "primitive wrapper types" such as java.lang.Boolean or java.lang.Integer), the value will always start with its runtime type (or 0 if it's null).

Assuming we're looking at the correct version of the sources, we'll indeed find, in order, commandId as a null Guid, commandType as the first constant of the ActionType enum (type = 5 = ActionType, followed by 0 = ordinal in the enum). The next 2 '0' would be compensationEnabled as a boolean false, and correlationId as a null String, respectively.
Next would be endProcedure, as the the second (ordinal = 1) constant of the EndProcedure enum, i.e. PARENT_MANAGED; and so on and so on.

The one thing that's not clear in the doc, is how to interpret negative values for objects (in place of the type or 0 for null, to reference an already deserialized object). I suppose that you could put each object into an array, and you'd use the absolute value as a 1-based index in that array.
I see a -6 in the payload, but I have no idea at first glance whether it'll be a numeric value or a reference to an already-deserialized object. You have to go through the pipe-delimited fields one by one to know what each one means.
 

вторник, 23 октября 2018 г., 13:26:06 UTC+3 пользователь Thomas Broyer написал:
On Tuesday, October 23, 2018 at 11:46:56 AM UTC+2, Anastasiya Ruzhanskaya wrote:
Hello all!
I am working with oVirt (which helps to manage virtual machines) project and it uses GWT RPC protocol in it's communications.
I want to parse messages in GWT RPC format which I get after deciphering the traffic.

I hope that even without being totally familiar with the ovirt project, someone will be able to help me a little bit.

I already separated it on some meaningful parts), numbers in braces just help to make correspondence between payload and strings:
7|
0|
14|
(1)https://engine.localdomain/ovirt-engine/webadmin/|  //URL
(2)E8B2AD24442204349EF795039C3B87E5|   // policy name
(3)org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTService| //service interface
(4)runMultipleActions| //name of the method
(5)org.ovirt.engine.core.common.action.ActionType/12242454|, // type1
(6)java.util.ArrayList/4159755760|, // type2
(7)Z| // type3 (bool)
(8)org.ovirt.engine.core.common.action.ShutdownVmParameters/1694554255| // class which contains uuid of the virtual machine
(9)org.ovirt.engine.core.compat.Guid/1992968158|
(10)java.util.UUID/2940008275| // seems the uuid of the virtual machine)
(11)org.ovirt.engine.core.common.action.ActionParametersBase$EndProcedure/1568822488|
(12)java.util.Collections$EmptyMap/4174664486|
(13)org.ovirt.engine.core.common.businessentities.VDSStatus/1938301532|
(14)org.ovirt.engine.core.compat.TransactionScopeOption/1475850853|
(the following is the payload separated and commented in places where I can understand it)
1|
2|
3|
4| 
4|- 4 method parameters
5|- first type = ActionType
6|- second type = arraylist
7|- third type = boolean
7|- fourth type = boolean
5(actionType)|9 (shutdown)|
6(arrayList)|1(??)|
8 (shutdown vm parameters, list object)|1|0|0|0|(??)
9 (guid, ?)|10(UUID)|J$m4mk9wVi3|MjeP460Xkpb (vm uuid)|0|5|0|0|0|11|1|0|6|0|0|0|0|0|0|12|0|-6|13|0|1|0|1|14|2|0|0|0|0|0|


Until virtual machine uuid parameter it is kind of clear what is happening, but I still wonder what do the parameters 1 and 0 mean in places marked as (??). I understand, that there is a method called runMultipleActions and it has four parameters. I found in source examples of calling this method .Then I determine types of these parameters. Then the type of action performed ( I shut down the machine). Then  there should be an ArrayList, which contains several objects. I assume that 8(shutdown vm parameters) should follow right after 6 (arraylist), but there a "1" which I can't explain. Also I don't know what for are these four boolean values (1|0|0|0) What do they mean? And how can I cope with the left payload?

This is the example of the call from ovirt source code:

ArrayList<ActionParametersBase> parameters = new ArrayList<>();
parameters
.add(new ActionParametersBase());
parameters
.get(0).setCommandId(Guid.Empty);
parameters
.add(new ActionParametersBase());
frontend
.runMultipleAction(ActionType.AddLocalStorageDomain, parameters, false, mockMultipleActionCallback,
                testState
);



Thank you in advance for any help!


I know this is kind of specific for oVirt but probably there is something more that I should know about parsing the messages ( in the internet I found a couple of articles about this, which helped me to understand the first part of the message).


The first value after the ArrayList runtime type is its length (see [1] and [2]). In this case, the list contains only one item.

Then, according to the doc, the fields of the ShutdownVmParameters are serialized in alphabetical order, walking up the class hierarchy. So the first boolean would be ShutdownVmParameters#waitBeforeShutdown (boolean true), followed by StopVmParametersBase#stopReason (0 means null), then VmOperationParameterBase#quotaId (again a null), and VmOperationParameterBase#rerun (boolean false).
This is then followed by VmOperationParameterBase#vmId, which is a Guid, itself having a single field of type UUID, which is serialized as a pair of longs by a UUID_CustomFieldSerializer [3], as you correctly identified.
Following would be the ActionParametersBase [4] fields, followed by the last 2 method arguments.


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.