Re: GWT compiler doesn't create symbol maps files

2015-02-17 Thread Jan Swaelens
Hello,

Just wanted to notify everybody that the com.google.gwt.junit.JUnit 
inheritance is also included when you use the default errai module for 
example. We had to get rid of it by using our own module definition for 
errai excluding that entry.

cheers

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Using NumberFormat.setForcedLatinDigits

2013-06-27 Thread Jan Swaelens
Hello,

I was looking to use this method to force latin decimal symbols. Maybe I am 
doing something wrong but it is not yielding the expected result.
The locale is set to 'en' in the module configuration file, when I 
evaluate LocaleInfo.getCurrentLocale().getLocaleName() on the client this 
yields the expected result.

Making the call to NumberFormat.setForcedLatinDigits with value 'true' and 
formatting some numbers does not yield the expected result of comma as 
decimal separator and dot as grouping separator.

Any tips would be greatly appreciated!

thanks
jan

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




No symbolMaps created when using collapse-all-properties in module configuration

2013-06-20 Thread Jan Swaelens
Hi,

I was investigating why our symbolMaps where no longer created and finally 
came to the conclusion that it was caused by adding 
'collapse-all-properties' to the module configuration files.
This is on GWT 2.5.1.

Is this intended behavior? We are using the setting because it greatly 
reduces the time for the gwt compile - is there any way to get the 
symbolMaps while using this property?

thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Eclipse GWT Plugin - Display Javascript object properties functionality not working

2012-09-27 Thread Jan Swaelens


Hello,

We recently discovered the 'Display Javascript object properties' setting in 
the preferences view of the GWT plugin in eclipse.

We are on eclipse Juno (20120606-2254) and also have indigo installations. We 
can't seem to get this very nice feature to work on all our eclipses, only 1 
guy has gotten it to work and he can't recall any special steps he had to take 
before he got it to work.

We are just testing this on the hello world app which is automatically created 
when you create a new gwt project with the eclipse wizard - just to rule out 
any dependencies from our application we are building.

The only thing we are seeing when we inspect a JS object is the 
'hostedModeReference' object with its value and reference sub-fields.

Are we missing something obvious - should we do something else besides enabling 
the setting in the Preferences - Google tab page?

I hope we can get this working as this feature is a major time saver!

many thanks in advace.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/rRqEJERSdtMJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RequestFactory & JPA: Does the table has to has a field called Version?

2011-01-12 Thread Jan Swaelens
This is an extract from a post that helped me a lot:

If you can implement a single Locator class that works for all your
entities, then go with it; and otherwise make one for each entity.
For instance, if you have a base class for your entities that provides an ID
and version, then you can easily cast any entity to that class to implement
getId and getVersion, and you probably can implement getIdType by returning
a fixed type.
You can clazz.newInstance() in the create() or use
PersistenceManager#newInstace with JDO.
And you can easily "find" using the Class and ID with JPA using
EntityManager#find(clazz,id), or with JDO using
PersistenceManager#getObjectById(clazz,id).
 
Basically, you could very well have only one Locator class per "id type".
 
Oh, and something to keep in mind: the Locator and *your services* instances
(not the ServiceLocator instances though) are cached aggressively and reused
for all subsequent requests, so make sure they are thread-safe !
(have a look at the ServiceLayerCache class to see all "memoized" methods) 


Original 
Post
 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RequestFactory & JPA: Does the table has to has a field called Version?

2011-01-12 Thread Jan Swaelens
You do not need to do that, the RequestFactory comes with a concept of 
'Locator's which help you to overcome this issue.
Have a look here for the Locator documentation: 
link
And have a search in the archives of this group, you can find some examples 
that should help you along.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Controlling the loaded object graph when using EntityProxy instances with latest RequestFactory feature

2011-01-11 Thread Jan Swaelens
I can sure do that, I will be generating the proxy classes anyway which 
means that I can add the list of properties at that time.
Very good suggestion, thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Controlling the loaded object graph when using EntityProxy instances with latest RequestFactory feature

2011-01-11 Thread Jan Swaelens
Hello David,

There are about 15 of these complex data types, new ones are only added once 
in a blue moon which means that adding a value proxy when that happens is no 
big deal. I am fine with writing a proxy for all of our data types, no 
problem there.

The 'issue' that I am trying to get around is the fact that my DTO object 
(MySessionDTO in the example above), which has a number of embedded objects 
(MyInteger, MyString - all of them have a value proxy: MyIntegerProxy, 
MyStringProxy) doesn't include its embedded objects automatically when the 
DTO is sent to the client. I need to explicitly state that they need to be 
sent to the client too by using this kind of statement: '
mySessReq.startSession(textToServer).with("userName").with('lastLogonDate').with('expirationDate')
 
...'.

What I want to achieve is that I can simply use these kind of statements 
'mySessReq.startSession(textToServer)' 
and have the embedded objects sent to the client (as if they were simple 
types like Integer, String ...). From my point of view, these 'complex data 
types' aren't really embedded objects, they are rather 'embedded properties' 
which make up the DTO object than an embedded object which represents a 
relation towards another domain object.

Now, I did manage to get this working by also making my *MySessionProxy *(the 
proxy for the DTO object) extend ValueProxy instead of EntityProxy. I 
now have value proxy objects for both my DTO's and the complex data types. 
Is this still a valid approach or am I going to run into troubles further 
down the road? This approach means that I no longer have a containing entity 
which manages versioning and identity.



Thanks a lot for your feedback on this!


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Controlling the loaded object graph when using EntityProxy instances with latest RequestFactory feature

2011-01-10 Thread Jan Swaelens
Further digging in the source code brought me to the *
com.google.gwt.requestfactory.server.Resolver* class where the decision is 
made to send or don't send a certain property. More specifically the '*
resolveClientProxy*' method where the '*AutoBeanVisitor*' is used to iterate 
over all the object properties/attributes.

This code extracts documents the conditions which will allow a property to 
be sent or not:

*/*
 * Send the property if the enclosing type is a ValueProxy, if the 
owner
 * requested the property, or if the property is a list of values.
 */
Class elementType = ctx instanceof CollectionPropertyContext
? ((CollectionPropertyContext) ctx).getElementType() : null;
boolean shouldSend = isOwnerValueProxy
|| matchesPropertyRef(propertyRefs, newPrefix)
|| elementType != null && ValueCodex.canDecode(elementType);

if (!shouldSend) {
  return false;
}*

This learns me that I can get this working by:

   1. Modify my DTO to extend ValueProxy instead of EntityProxy
   2. Add the property names in the 'using' clause of the invocation 
   statement
   3. Hack ValueCodex to also include my 'complex data type' objects
   4. Get lucky and get access to some override mechanism in a future 
   version which would allow me to hook some code up to influence the 
   'shouldSend' value based on the 'domainEntity' and 'newPrefix' values
   

The additional questions which pop up in my mind are as follows (same 
order):

   1. What are the consequences? Because value proxy lacks the version/id 
   features as employed by entity proxy there must be some magic which is lost. 
   Is it only increased bandwidth because the object needs to be sent back 
   instead of only changes? 
   2. Not an option
   3. This is probable frowned upon :-)
   4. Maybe as questionable as the previous point?
   

Thanks a lot for your thoughts on this!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Controlling the loaded object graph when using EntityProxy instances with latest RequestFactory feature

2011-01-10 Thread Jan Swaelens
Our application uses an object model with DTO's which contain objects (what 
we call complex data types) that make up the 'properties/fields/attributes' 
of a domain object. This means that we do not use Integer, String ... but 
have a customized MyInteger, MyString, MyDouble variants instead. These 
complex data types wrap the native object and add some additional properties 
too.

To illustrate, this is a simplified version of one of our DTO objects:

*public class MySessionDTO implements IMyDTO {

* * private MyInteger id = null;
private MyString userName = null;
...
}*

 
I created a proxy implementation for this DTO which looks like this:

*...@proxyfor(value = MySessionDTO.class, locator = MyEntityLocator.class)
public interface MySessionProxy extends EntityProxy {

public MyIntegerProxy getId();

public MyStringProxy getUserName();
}*


Using this set-up I can perfectly retrieve the values (in this sample the 
user name) which I require on the client side using the request factory 
feature as follows:

*MySessionRequest mySessReq = requestFactory.mySessionRequest();*
*Request startSessionReq = 
mySessReq.startSession(textToServer).with("userName");*
*startSessionReq.fire(new Receiver() {*
**
*}*


This approach (using the .with method to retrieve all properties of our DTO 
objects) is fine from a functional point of view. The problem is that our 
DTO's have many of these properties and from time to time new properties are 
added to the objects. It is not feasible to go trough the code each time to 
implement these changes nor is it feasible to list all properties for each 
call to fetch the contents of our objects.

I am wondering that there is some way which will allow me to indicate which 
(embedded) objects are retrieved when a certain DTO is being pulled to the 
client side. Having looked at other posts in this group I can only conclude 
that many other developers are facing this problem, which leads me to 
believe that our approach is not that exotic.

I do agree that this is a no-issue for the more traditional approach where 
objects are only used inside other objects to represent real domain objects.

*(I already posted a similar topic as my first post to this group but it 
never made it to the actual mail group, apologies if it was rejected for 
some reason which means that I am double posting this - if this is the case 
could you please notify me)*

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Implementing a ServiceLayerDecorator

2011-01-09 Thread Jan Swaelens
Indeed, I got the source bits from the unit test code :-)

Thanks for the pointer and code sample, I will experiment with your 
suggestions.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



EntityProxy with complex data types

2011-01-06 Thread Jan Swaelens
Our application uses a concept of 'complex data types' to represent 
values/properties of an object. Simply put, we have a 'MyInteger' variant 
for 'Integer' values, a 'MyDouble' variant for 'Double' values  (none of 
them actually extends these types, they are rather wrappers). Our data 
object thus contain a number of fields who are all typed as these 
'MyInteger', 'MyDouble' types.

I am trying to re-use our data model objects as entity proxies, which is 
working fine except that the values of these 'fields' are only returned when 
I use the '.with("propertyName")' method on my request context instance.
That approach is not really workable for me as we have many of these fields 
on all of our data objects.

I do understand that in many cases, the experienced behavior is actually 
what you want (=retrieve objects on demand).

I have done some digging around in this group as well as on the internet in 
general, but was not able to find a solution for my problem. I was hoping 
that anyone from the GWT team has some input on how I can get around this 
behavior.

Many thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Implementing a ServiceLayerDecorator

2011-01-06 Thread Jan Swaelens
I am experimenting with the RequestFactory and came to a point where I
want to create my own ServiceLayerDecorator.

I have read trough the available documentation and found that I need
to hook my custom service layer decorator up by calling this method
with an instance of my decorator: 'ServiceLayer.create()'.

The code which I have implemented looks like this:

ServiceLayer serviceLayer = ServiceLayer.create(new
MyServiceLayerDecorator());
SimpleRequestProcessor processor = new
SimpleRequestProcessor(serviceLayer);
final EventBus eventBus = new SimpleEventBus();
MyRequestFactory f =
RequestFactoryMagic.create(MyRequestFactory.class);
f.initialize(eventBus, new InProcessRequestTransport(processor));

Now, I tried to run with this code implemented in the 'onModuleLoad'
which is not working (it is referencing server classes and giving the
expected 'source not found for class ABC' errors). I came up with the
idea to implement the code there because my old request factory
initialisation code was also located there.

I am wondering where I need to invoke the 'ServiceLayer.create'
related code in order to get this working.

Thanks a lot for your help!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.