Double convert and compile from source

2 views
Skip to first unread message

Ahmed

unread,
Jun 22, 2010, 5:27:25 AM6/22/10
to GWT-Ent Developer Forum
Hi everybody,
First, I would like to thank everybody who contributed to this
project, you are doing a great job.

second, I have two questions:
1. In the serialization module: the function in the json deserializer
that handles pure objects calls the function "HandleDouble"
which handles all kinds of numbers correctly, except the double.... I
actually copied the code and implemented the interface "DoubleConvert"
and added a singe line to support the double and it works nicely...
now I want to know why it supports everything but the double??

2. I tried to check out a copy of the source... I tried to use maven
to compile a package, but the compilation always fails with some
exception in the aop, besides the structure of the packages is
different than the one available in the download section (v. 0.7.1)
May someone please, explain this and how do I compile it from
source...

3. I suggest that a link to this group should be put on the home page
of the project.

Thank you.

James Luo

unread,
Jun 22, 2010, 7:23:00 AM6/22/10
to gwt...@googlegroups.com
Hi, Ahmed

  1, I can't remember why there is a DoubleConvert interface, I think there should have a issue here that's why created DoubleConvert interface. What's the code you wrote for this? I think I can put it into source code if you don't mind.

  2, The source is totally under a big refactor, the whole package has been changed to make more sence and get ready to release 1.0; and moved to Maven. I'm new to Maven, most of the project are running under Maven now, but I'm stuck in gwtent_showcase project, now I still can't make it run. That will be great if you can help me to resolve this issue. Also I can't run GWT test cases in gwtent project. :)

  3, There is a link in Home Page, just in the right side :)

Regards
James


--
You received this message because you are subscribed to the Google Groups "GWT-Ent Developer Forum" group.
To post to this group, send email to gwt...@googlegroups.com.
To unsubscribe from this group, send email to gwt-ent+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwt-ent?hl=en.




--
Regards
James Luo

James Luo

unread,
Jun 22, 2010, 7:25:32 AM6/22/10
to gwt...@googlegroups.com
I just commited a new version
--
Regards
James Luo

Ahmed

unread,
Jun 22, 2010, 7:54:42 AM6/22/10
to GWT-Ent Developer Forum
Hi James,
thanks for the quick reply and the project in general it has really
helped me a lot and saved me a lot of time :)

About the code I added it is actually almost nothing, I followed the
pattern you used, It should be in JsonSerializer class at the end of
the function handleDouble:

else if (field.getTypeName().equals(java.lang.Double.class.getName())
|| field.getTypeName().equals("double"))
{
field.setFieldValue(this, value);
}

I used the interface "convertDouble" to override the default
conversion which doesn't handle the double, so, please, if you notice
anything wrong in this line, let me know... as I am using this in a
large project.


About maven, I would love to help but I am a java newbie and I had to
search to find out what maven is and how to use it!!
I have been using gwt for a while but no java at the desktop, so I am
not familiar with maven.

I will try to make some documentation on how to use the library as
some places are not quite clear and I had to dive into the source to
find to out how to use it, I will try to make a couple of short
tutorials...

Thanks again.
> > gwt-ent+u...@googlegroups.com<gwt-ent%2Bunsu...@googlegroups.com >
> > .

James Luo

unread,
Jun 22, 2010, 8:11:59 AM6/22/10
to gwt...@googlegroups.com
Thanks, I added to code, the source like this:


else if (field.getTypeName().equals(java.lang.Double.class.getName()) || field.getTypeName().equals("double")){
              field.setFieldValue(instance, doubleValue);
            }

There is a test case for JSON support, the class name is "
com.gwtent.client.test.json.SerializationTestCase" you can have a look, or Even if you got time, you can add more test cases in it.

Documents and tutorials are very welcome, Thank you very much. If you got anything about it, just let me know.

To unsubscribe from this group, send email to gwt-ent+u...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gwt-ent?hl=en.




--
Regards
James Luo
Reply all
Reply to author
Forward
0 new messages