Re: GWT 2.4 editor framework ui for create weak one2many relation

2012-05-09 Thread Human izatara
thanks for your attention Brandon !
I didn't understand your first way completely. I don't use App engine.
our application use spring and jpa and I use eclipse and currently we
run application on jetty.
in our previous application, we used jsf and we could implement such
scenarios for entities with owned collection and after copying
collections from ui into entity, hibernate handle persisting entity
and it's owned collection and we didn't do anything. in that
application when we annotate a property with cascade="all-delete-
orphan" and ask hibernate to save(entity), it saves it's owned
collections too.

I want to know how to implement such scenarios, when we use gwt 2.4
with editor framework. and is there any sample or tutorial for doing
this on web ?

On May 8, 8:03 pm, Brandon Donnelson  wrote:
> Two ways I build relationships are. Just depends where else I need that
> entity.
>
> 1. I use owned collections, which means I can create the context all at
> once and persist it and App engine can build the relationship in the key.
> This is my favorite, but has some limitations if you want to have another
> entity use it too.
>
> 2. Another way I do it is, in the parent I use HashSet and set the
> children Ids to it I which is using Long Ids to link the relationships of
> the children, but the entity has to be created and the Id retrieved before
> you add it to the parent.
>
> Brandonhttp://c.gwt-examples.com

-- 
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-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: GWT: CheckBoxCell and Selection change event

2012-05-09 Thread Qrunk
Any help on this issue will be very helpful 

On Wednesday, 9 May 2012 16:00:25 UTC+5:30, Qrunk wrote:
>
> I am using the following constructor to create a checkboxcell in an 
> editable data grid.
>
> *CheckboxCell(false, true)*
>
> When I use this and click at any place in the row, selection change event 
> does not fire and I am using *Single selection model* .
>
> When I use,
>
> *CheckboxCell();*
>
> Selection change event fires on the row but,
> 1) We have click twice to check or uncheck the check box cell.
> 2) if we check or uncheck in the checkboxcell, the value will reverted as 
> soon as I click anywhere.
>
> I am trying to figure out the solution, but not successful yet. Any help 
> would be appreciated. 
>
> Am using  *GWT 2.4.0 *
>

-- 
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/-/GgGPbm5DusYJ.
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: GWT ValueProxy and RequestFactory Domain Type error

2012-05-09 Thread Brandon Donnelson
Have you tried it with out the locator annotation like I noted in my 
example?

-- 
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/-/tOBm_piddnkJ.
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: Can the GWT eclipse validator be threaded to more than one class at once?

2012-05-09 Thread Brandon Donnelson
Hypothetically then, do you think it could be done concurrently with out to 
much trouble? 

-- 
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/-/naYVdCduESkJ.
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: How to determine CellTable row height?

2012-05-09 Thread Mike Dee
Andrei,

That's a good response.  I think you convinced me to not do it.

Instead, I wonder if it is possible to do something like what other web 
apps do (Twitter and even the new GWT google group), which is to keep 
adding rows as one scrolls down.  I've experimented with range change event 
handler.  Maybe that would be a more modern way to provide tabular data?

Mike

On Wednesday, May 9, 2012 7:13:33 AM UTC-7, Andrei wrote:
>
> If your data never wraps within a cell, then the height of the row is 
> always the same - it is determined by the CSS. (As a sidenote, you can 
> change it in your CSS, or even apply different heights to different 
> tables). 
>
> Else, 
>
> 1. The height changes as data wraps within a cell. Thus, you can't 
> know the actual height of the row until the table is rendered. 
>
> 2. If the height changes with data (some rows have longer data and 
> wrap, other rows don't), what's the point of changing the number of 
> rows? Your first 10 rows may take 240 pixels, the next 10 rows can 
> take 330 pixels, and so on. 
>
> Also, remember that data can wrap more often when columns are 
> narrower. This means that if you want to predict the height of your 10 
> rows, you also need to take into consideration the width of each 
> column. 
>
> 3. Users can change the size of the font in their browsers, unless you 
> disable it, which is not a good practice. They can also resize their 
> windows, add or hide toolbars in their browsers, etc. You just can't 
> avoid having a scroll-bar.

-- 
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/-/sEq0Vi47ztQJ.
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: GWT, Spring when projects are split apart (client, services, persistence)

2012-05-09 Thread Christien Lomax
Eclipse, using m2e.  All our projects are maven based.  Source is specified 
as Thomas has outlined (source-jars added to POM).

/c

On Wednesday, 9 May 2012 10:46:37 UTC-3, Jens wrote:
>
> How do you compile your app? Maven? Ant? In Eclipse using GPE?
>
> You have to make sure that the GWT compiler's classpath contains all 
> needed source files (= add src/main/java of all projects that need to be 
> compiled by GWT to the compilers classpath).
>
> -- J.
>

-- 
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/-/qD057MLVFCAJ.
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: GWT, Spring when projects are split apart (client, services, persistence)

2012-05-09 Thread Christien Lomax
Hi Thomas,

First, I want to say that your examples and blogs have helped us a lot over 
the last year!  Thanks!

Secondly, thanks for the super quick reply!

I added the sources generation to the POMs for the Shared, Persistence and 
Services projects, and fixed the ".class" issues.  However, we are still 
getting issues with GWT not being able to find classes/sources...  they (at 
the moment) seem to be around classes specified via @ExtraTypes which we 
have specified in our IAppRequestFactory interface.

eg:

@ExtraTypes({
IAlertProxy.class, IAlertOptionsProxy.class, IAlertTypeProxy.class
})
public interface IOris4RequestFactory extends RequestFactory
{
IAlertRequest alertRequest();

...
}

The specific error is:
   Resolving com.mycompany.client.IAppRequestFactory
  Found type 'com.mycompany.client.IApp4RequestFactory'
 [ERROR] Annotation error: cannot resolve com.mycompany.
client.alerts.proxy.IAlertProxy
   java.lang.ClassNotFoundException: com.mycompany.
client.alerts.proxy.IAlertProxy
   ...
   [ERROR] Annotation error: expected class java.lang.Class, got null

It then eventually down the list starts complaining about the Adapters

Resolving com.mycompany.client.alerts.proxy.IAlertProxy
  Found type 'com.mycompany.client.alerts.proxy.IAlertProxy'
 [ERROR] Annotation error: cannot resolve com.mycompany
.adapter.alert.AlertGwtAdapter
  java.lang.ClassNotFoundException: com.mycompany
.adapter.alert.AlertGwtAdapter

The proxy classes are specified in the main client project, and the adapter 
classes are in the same project, but outside the client package (referenced 
via )

Sorry to bother you again about this, but its had us stuck for a while now.

/c
 

On Wednesday, 9 May 2012 11:02:08 UTC-3, Thomas Broyer wrote:
>
>
>
> On Wednesday, May 9, 2012 3:15:29 PM UTC+2, Christien Lomax wrote:
>>
>> Hi All,
>>
>> We could use a bit of insight and help if anyone has a moment.
>>
>> We currently have a project that is quite huge (thousands of classes) 
>> including the GWT client, a spring service layer and 
>> hibernate persistence layer.
>>
>> We are trying to split up the project into more manageable pieces 
>> including:
>>
>>- client project (contains our GWT widgets, RequestFactories, etc, 
>>Spring servlets)
>>- service project (contains the spring service layer, web services 
>>(REST, SOAP))
>>- persistence project (contains the domain beans - hibernate mapped 
>>objects, persistence code, etc)
>>- shared project (classes that can be used on both the client (gwt 
>>compiled) and server side.
>>
>> Everything compiles and works (unit tests, etc) until we hit GWT's 
>> compile.  At this point, we get complaints about GWT not being able to see 
>> items in the service layer (which makes sense, it is trying 
>> to compile references to the beans, services, etc).
>> We've tried a number of approaches, including using @ServiceName instead 
>> of @Service and using the  specifications on the modules. 
>>  Right now we a few errors we are unable to resolve:
>>
>> 1 - we get this one for every Adapte:)
>>   [ERROR] Errors in 'file:/C:/workspace/client/src/main/java/com/
>> mycompany/adapter/alert/AlertBeanGwtAdapter.java'
>>  [ERROR] Line 14: No source code is available for type 
>> com.mycompany.service.alerts.IAlertService; did you forget to inherit a 
>> required module?
>>
>
> You ahve to produce a source JAR for your artifacts, and then reference 
> them as dependencies in your GWT project.
> See 
> https://github.com/tbroyer/gwt-maven-archetypes/tree/master/modular-requestfactory/src/test/resources/projects/basic-rf/reference
>  for 
> an example (here, the GWT client-side, server-side, and shared code 
> –RequestFactory interfaces– are separated into 3 distinct modules; the 
> client module depends on the shared module's 
> sources to bring its sources in the GWT compiler 
> classpath.
>  
>
>> 2 - if we omit the "-strict" parameter when compiling GWT, we get this:
>>  [ERROR] An internal compiler exception occurred
>>  com.google.gwt.dev.jjs.InternalCompilerException: Failed to get 
>> JNode
>>  ...
>>  [ERROR] : public interface com.mycompany
>> .service.alerts.IAlertService
>>  ...
>>  org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding
>>  [ERROR] at AlertBeanGwtAdapter.java(14): private IAlertService 
>> getService() {
>>return (IAlertService) 
>> EcmLocator.getApplicationContext().getBean(IAlertService.TYPE);
>>  }
>>  org.eclipse.jdt.internal.compiler.ast.MethodDeclaration
>>
>> Can anyone shed any light on what we may be doing wrong?  When it is all 
>> in one project, everything works fine, but splitting it into multiple 
>> projects (that are references via maven) it fails.
>>
>> Example source (some code is omitted):
>>
>> *Client Layer:*
>>
>> *...client.alerts.request.**IAlertRequest.java*
>> @ServiceName(value = "com.mycompany.service.alerts.IAlertService.class", 

Re: GWT ValueProxy and RequestFactory Domain Type error

2012-05-09 Thread jmbz84
Yes I have already declared the ProxyFor

@ProxyFor(value = BrowserDetailItem.class, locator =
BrowserDetailItemLocator.class)

On 8 mayo, 15:18, Brandon Donnelson  wrote:
> Have you tried setting your @ProxyFor(BrowserDetailItem.class)? I haven't
> configured my proxies
>
> This is how I'd do it.
>
> *For the client side*
> @ProxyFor(BrowserDetailItem.class))
> public interface BrowserDetailItemProxy extends ValueProxy {
>    public String getName();
>    public Integer getId();
>
> }
>
> *For the server side, in any package on server side...*
> public class BrowserDetailItem {
>    public String getName() {
>      return name;
>    }
>    public Integer getId() {
>      return id;
>    }
>    //.. and some setters for server side use probabl...
>
> }
>
> Thats how I configure my ValueProxies.
>
> Hope that helps,
> Brandon Donnelsonhttp://c.gwt-examples.com

-- 
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-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: FilteredActivity

2012-05-09 Thread Jens
No problem, but keep in mind that you now have two browser history entries 
which are both the same. So you should not use this throughout your app if 
you need to reload things otherwise the browsers back/forward buttons would 
feel odd. For login its probably ok.

-- 
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/-/irHX0QJX_psJ.
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: FilteredActivity

2012-05-09 Thread Thomas Lefort
Brilliant, that does work indeed! Thanks.

On Wednesday, 9 May 2012 16:45:10 UTC+2, Jens wrote:
>
> Any idea if this normal (that the place doesn't change to 
>> "EIRegisterPlace")? 
>>
>
> Yes thats normal. A FilteredActivity allows you to change activities for a 
> given place by temporary converting the current place to a different one to 
> trick the underlying ActivityMapper. So its not meant to globally transform 
> one place into another. Thats why PlaceController always contains the place 
> you call goTo() with.
>  
>
>> and is there a workaround? another way of proceeding?
>>
>
> You could copy the PlaceController.goTo() method and omitting the 
> oldPlace.equals(newPlace) check. So you basically fire 
> PlaceChangeRequestEvent and PlaceChangeEvent yourself and not through 
> PlaceController.goTo(). That way you can "reload" the current place.
>
> -- J.
>

-- 
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/-/ZrpFJNk5LI0J.
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: 2 RequestFactory with 2 differents Proxy on the same domain class

2012-05-09 Thread Thomas Broyer
Yes, please file a bug for that.

If you can contribute the patch to gwt-code-reviews.appspot.com it'd be 
even better (see 
https://developers.google.com/web-toolkit/makinggwtbetter#contributingcode)
As far as the patch goes, your processing loses the "most-to-least-derived 
type" ordering of the domainToClientType values that 
Deobfuscator#getClientProxies mandates.
See 
http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/apt/TypeComparator.java
 for 
the ordering, to be ported to Class 
(see 
http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/place/rebind/MostToLeastDerivedPlaceTypeComparator.java
 
for an almost-equivalent)

On Wednesday, May 9, 2012 4:24:22 PM UTC+2, Alexandre Ardhuin wrote:
>
> Hi All,
>
> I have an application with 2 gwt modules. Each module uses its own 
> RequestFactory and its own Proxy for the same domain object (ie. 2 
> RequestFactory with 2 differents Proxy on the same domain class).
> The first RF call succeeds and following RF of the same type too but when 
> the other RF is used an exception occurs : 
> "The domain type Xxx cannot be sent to the client"
>
> After some tests, the problem occurs only for 2 RF. Having only one RF 
> with 2 Proxy on the same domain object works well.
>
> The problem seems to be in 
> com.google.web.bindery.requestfactory.vm.impl.Deobfuscator.Builder.merge(Deobfuscator).
>  
> Doing the following modification resolves it.
>
> public Builder merge(Deobfuscator existing) {
> +  Set domains = new HashSet();
> +  domains.addAll(d.domainToClientType.keySet());
> +  domains.addAll(existing.domainToClientType.keySet());
> +  for (String domain : domains) {
> +Set clientTypes = new HashSet();
> +clientTypes.addAll(d.domainToClientType.get(domain));
> +clientTypes.addAll(existing.domainToClientType.get(domain));
> +d.domainToClientType.put(domain, Collections.unmodifiableList(new 
> ArrayList(clientTypes)));
> +  }
> -  d.domainToClientType.putAll(existing.domainToClientType);
>   d.operationData.putAll(existing.operationData);
>   // referencedTypes recomputed in build()
>   d.typeTokens.putAll(existing.typeTokens);
>   return this;
> }
>
> Can someone confirms this is a bug ? (I haven't found any issue on that)
>
> Alexandre
>

-- 
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/-/64utrsjDpFgJ.
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: FilteredActivity

2012-05-09 Thread Jens

>
> Any idea if this normal (that the place doesn't change to 
> "EIRegisterPlace")? 
>

Yes thats normal. A FilteredActivity allows you to change activities for a 
given place by temporary converting the current place to a different one to 
trick the underlying ActivityMapper. So its not meant to globally transform 
one place into another. Thats why PlaceController always contains the place 
you call goTo() with.
 

> and is there a workaround? another way of proceeding?
>

You could copy the PlaceController.goTo() method and omitting the 
oldPlace.equals(newPlace) check. So you basically fire 
PlaceChangeRequestEvent and PlaceChangeEvent yourself and not through 
PlaceController.goTo(). That way you can "reload" the current place.

-- J.

-- 
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/-/E3H4BiSIeOQJ.
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.



2 RequestFactory with 2 differents Proxy on the same domain class

2012-05-09 Thread Alexandre Ardhuin
Hi All,

I have an application with 2 gwt modules. Each module uses its own
RequestFactory and its own Proxy for the same domain object (ie. 2
RequestFactory with 2 differents Proxy on the same domain class).
The first RF call succeeds and following RF of the same type too but when
the other RF is used an exception occurs :
"The domain type Xxx cannot be sent to the client"

After some tests, the problem occurs only for 2 RF. Having only one RF with
2 Proxy on the same domain object works well.

The problem seems to be in
com.google.web.bindery.requestfactory.vm.impl.Deobfuscator.Builder.merge(Deobfuscator).
Doing the following modification resolves it.

public Builder merge(Deobfuscator existing) {
+  Set domains = new HashSet();
+  domains.addAll(d.domainToClientType.keySet());
+  domains.addAll(existing.domainToClientType.keySet());
+  for (String domain : domains) {
+Set clientTypes = new HashSet();
+clientTypes.addAll(d.domainToClientType.get(domain));
+clientTypes.addAll(existing.domainToClientType.get(domain));
+d.domainToClientType.put(domain, Collections.unmodifiableList(new
ArrayList(clientTypes)));
+  }
-  d.domainToClientType.putAll(existing.domainToClientType);
  d.operationData.putAll(existing.operationData);
  // referencedTypes recomputed in build()
  d.typeTokens.putAll(existing.typeTokens);
  return this;
}

Can someone confirms this is a bug ? (I haven't found any issue on that)

Alexandre

-- 
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-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: How to determine CellTable row height?

2012-05-09 Thread Andrei
If your data never wraps within a cell, then the height of the row is
always the same - it is determined by the CSS. (As a sidenote, you can
change it in your CSS, or even apply different heights to different
tables).

Else,

1. The height changes as data wraps within a cell. Thus, you can't
know the actual height of the row until the table is rendered.

2. If the height changes with data (some rows have longer data and
wrap, other rows don't), what's the point of changing the number of
rows? Your first 10 rows may take 240 pixels, the next 10 rows can
take 330 pixels, and so on.

Also, remember that data can wrap more often when columns are
narrower. This means that if you want to predict the height of your 10
rows, you also need to take into consideration the width of each
column.

3. Users can change the size of the font in their browsers, unless you
disable it, which is not a good practice. They can also resize their
windows, add or hide toolbars in their browsers, etc. You just can't
avoid having a scroll-bar.

-- 
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-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.



FilteredActivity

2012-05-09 Thread Thomas Lefort
Hi,

I have the following issue: I use a FilteredActivityMapper with the 
following filtering:

@Override
public Place filter(Place place) {
if(// check user is logged in) {
return new EIRegisterPlace("", place);
}
 return place;
}

Filtering works well except that when the user logs in I call 
placeController.goTo(nextPlace) and the code gets stuck. The reason is that 
the "where" variable is still set to the old place (and not the 
EIRegsiterPlace), so where = nextPlace and the placeController gets blocked.

Any idea if this normal (that the place doesn't change to 
"EIRegisterPlace")? and is there a workaround? another way of proceeding?

Thanks,

Thomas

-- 
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/-/CHNVhAHGq0kJ.
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: GWT, Spring when projects are split apart (client, services, persistence)

2012-05-09 Thread Thomas Broyer


On Wednesday, May 9, 2012 3:15:29 PM UTC+2, Christien Lomax wrote:
>
> Hi All,
>
> We could use a bit of insight and help if anyone has a moment.
>
> We currently have a project that is quite huge (thousands of classes) 
> including the GWT client, a spring service layer and 
> hibernate persistence layer.
>
> We are trying to split up the project into more manageable pieces 
> including:
>
>- client project (contains our GWT widgets, RequestFactories, etc, 
>Spring servlets)
>- service project (contains the spring service layer, web services 
>(REST, SOAP))
>- persistence project (contains the domain beans - hibernate mapped 
>objects, persistence code, etc)
>- shared project (classes that can be used on both the client (gwt 
>compiled) and server side.
>
> Everything compiles and works (unit tests, etc) until we hit GWT's 
> compile.  At this point, we get complaints about GWT not being able to see 
> items in the service layer (which makes sense, it is trying 
> to compile references to the beans, services, etc).
> We've tried a number of approaches, including using @ServiceName instead 
> of @Service and using the  specifications on the modules. 
>  Right now we a few errors we are unable to resolve:
>
> 1 - we get this one for every Adapte:)
>   [ERROR] Errors in 'file:/C:/workspace/client/src/main/java/com/
> mycompany/adapter/alert/AlertBeanGwtAdapter.java'
>  [ERROR] Line 14: No source code is available for type 
> com.mycompany.service.alerts.IAlertService; did you forget to inherit a 
> required module?
>

You ahve to produce a source JAR for your artifacts, and then reference 
them as dependencies in your GWT project.
See 
https://github.com/tbroyer/gwt-maven-archetypes/tree/master/modular-requestfactory/src/test/resources/projects/basic-rf/reference
 for 
an example (here, the GWT client-side, server-side, and shared code 
–RequestFactory interfaces– are separated into 3 distinct modules; the 
client module depends on the shared module's 
sources to bring its sources in the GWT compiler 
classpath.
 

> 2 - if we omit the "-strict" parameter when compiling GWT, we get this:
>  [ERROR] An internal compiler exception occurred
>  com.google.gwt.dev.jjs.InternalCompilerException: Failed to get JNode
>  ...
>  [ERROR] : public interface com.mycompany
> .service.alerts.IAlertService
>  ...
>  org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding
>  [ERROR] at AlertBeanGwtAdapter.java(14): private IAlertService 
> getService() {
>return (IAlertService) 
> EcmLocator.getApplicationContext().getBean(IAlertService.TYPE);
>  }
>  org.eclipse.jdt.internal.compiler.ast.MethodDeclaration
>
> Can anyone shed any light on what we may be doing wrong?  When it is all 
> in one project, everything works fine, but splitting it into multiple 
> projects (that are references via maven) it fails.
>
> Example source (some code is omitted):
>
> *Client Layer:*
>
> *...client.alerts.request.**IAlertRequest.java*
> @ServiceName(value = "com.mycompany.service.alerts.IAlertService.class", 
> locator = "SpringServiceLocator.class")
>

Don't include the ".class", it's not part of the name of the class.
 

> public interface IAlertRequest extends RequestContext
> {
> Request countAlerts(String eventClass, Date dateLimit);
> Request> listAlertTypes();
> Request> listUnviewedAlerts();
> }
>
> *...web.**SpringServiceLocator.java**
> *
> public class SpringServiceLocator implements ServiceLocator
> {
>  public Object getInstance(Class clazz)
> {
> ApplicationContext context = 
> WebApplicationContextUtils.getWebApplicationContext(RequestFactoryServlet
> .getThreadLocalServletContext());
> return context.getBean(clazz);
> }
> }
>
> *OurProject.gwt.xml*
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
>
> 
>  
>
> 
>
>  value="true" />
>

This is the default in GWT 2.4 AFAIK (or will it only be starting with 2.5?)
 

>
> 
> 
> 
> 
>
> *Service Layer:*
>
> *...services.alerts.**IAlertService.java*
> public interface IAlertService
> {
> String TYPE = "AlertService";
> Long countAlerts(String eventClass, Date dateLimit);
> List listAlertTypes();
> List listUnviewedAlerts();
> }
>
> *...services.alerts.AlertService.java*
> @Service("AlertService")
> @Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
> public class AlertService extends EcmService implements IAlertService
> {
> public Long countAlerts(String eventClass, Date dateLimit) {...};
> public List listAlertTypes() {...};
> public List listUnviewedAlerts() {...}; 
> }
>
> *Persistence Layer:*
>
> *...domain.alerts.AlertBean.java*
> @Entity
> @Immutable
> @Table(name = "alertdisplayview")
> public class AlertBean implements Serializable
> {
>  ...
> }
>
> *...domain.alerts.* *AlertType.java*
> @Entity
> @Immutable
> @Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
> @Table(name = "alerttype")
> @NamedQueries({
> @NamedQuery(name = "alertType.findByName", query = "select alt from 
> Al

Re: GWT, Spring when projects are split apart (client, services, persistence)

2012-05-09 Thread Jens
How do you compile your app? Maven? Ant? In Eclipse using GPE?

You have to make sure that the GWT compiler's classpath contains all needed 
source files (= add src/main/java of all projects that need to be compiled 
by GWT to the compilers classpath).

-- J.

-- 
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/-/HOJw0hs2s1oJ.
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.



GWT, Spring when projects are split apart (client, services, persistence)

2012-05-09 Thread Christien Lomax
Hi All,

We could use a bit of insight and help if anyone has a moment.

We currently have a project that is quite huge (thousands of classes) 
including the GWT client, a spring service layer and 
hibernate persistence layer.

We are trying to split up the project into more manageable pieces including:

   - client project (contains our GWT widgets, RequestFactories, etc, 
   Spring servlets)
   - service project (contains the spring service layer, web services 
   (REST, SOAP))
   - persistence project (contains the domain beans - hibernate mapped 
   objects, persistence code, etc)
   - shared project (classes that can be used on both the client (gwt 
   compiled) and server side.

Everything compiles and works (unit tests, etc) until we hit GWT's compile. 
 At this point, we get complaints about GWT not being able to see items 
in the service layer (which makes sense, it is trying to compile references 
to the beans, services, etc).
We've tried a number of approaches, including using @ServiceName instead of 
@Service and using the  specifications on the modules.  Right 
now we a few errors we are unable to resolve:

1 - we get this one for every Adapte:)
  [ERROR] Errors in 'file:/C:/workspace/client/src/main/java/com/
mycompany/adapter/alert/AlertBeanGwtAdapter.java'
 [ERROR] Line 14: No source code is available for type 
com.mycompany.service.alerts.IAlertService; did you forget to inherit a 
required module?

2 - if we omit the "-strict" parameter when compiling GWT, we get this:
 [ERROR] An internal compiler exception occurred
 com.google.gwt.dev.jjs.InternalCompilerException: Failed to get JNode
 ...
 [ERROR] : public interface com.mycompany
.service.alerts.IAlertService
 ...
 org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding
 [ERROR] at AlertBeanGwtAdapter.java(14): private IAlertService 
getService() {
   return (IAlertService) 
EcmLocator.getApplicationContext().getBean(IAlertService.TYPE);
 }
 org.eclipse.jdt.internal.compiler.ast.MethodDeclaration

Can anyone shed any light on what we may be doing wrong?  When it is all in 
one project, everything works fine, but splitting it into multiple projects 
(that are references via maven) it fails.

Example source (some code is omitted):

*Client Layer:*

*...client.alerts.request.**IAlertRequest.java*
@ServiceName(value = "com.mycompany.service.alerts.IAlertService.class", 
locator = "SpringServiceLocator.class")
public interface IAlertRequest extends RequestContext
{
Request countAlerts(String eventClass, Date dateLimit);
Request> listAlertTypes();
Request> listUnviewedAlerts();
}

*...web.**SpringServiceLocator.java**
*
public class SpringServiceLocator implements ServiceLocator
{
 public Object getInstance(Class clazz)
{
ApplicationContext context = 
WebApplicationContextUtils.getWebApplicationContext(RequestFactoryServlet
.getThreadLocalServletContext());
return context.getBean(clazz);
}
}

*OurProject.gwt.xml*












 










*Service Layer:*

*...services.alerts.**IAlertService.java*
public interface IAlertService
{
String TYPE = "AlertService";
Long countAlerts(String eventClass, Date dateLimit);
List listAlertTypes();
List listUnviewedAlerts();
}

*...services.alerts.AlertService.java*
@Service("AlertService")
@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
public class AlertService extends EcmService implements IAlertService
{
public Long countAlerts(String eventClass, Date dateLimit) {...};
public List listAlertTypes() {...};
public List listUnviewedAlerts() {...}; 
}

*Persistence Layer:*

*...domain.alerts.AlertBean.java*
@Entity
@Immutable
@Table(name = "alertdisplayview")
public class AlertBean implements Serializable
{
 ...
}

*...domain.alerts.* *AlertType.java*
@Entity
@Immutable
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
@Table(name = "alerttype")
@NamedQueries({
@NamedQuery(name = "alertType.findByName", query = "select alt from 
AlertType alt where alt.name =:name or alt.internalName =:name")
})
public class AlertType implements Serializable
{
 ...
}

*Persistence.gwt.xml*





-- 
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/-/FemRek3N5IUJ.
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: Can the GWT eclipse validator be threaded to more than one class at once?

2012-05-09 Thread Patrick Julien
the current implementation

On Tuesday, May 8, 2012 11:51:20 PM UTC-4, Brandon Donnelson wrote:
>
> What would stop it doing its job concurrently? 

-- 
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/-/K_NkkUPAF5kJ.
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.



GWT: CheckBoxCell and Selection change event

2012-05-09 Thread Qrunk
I am using the following constructor to create a checkboxcell in an 
editable data grid.
   
*CheckboxCell(false, true)*

When I use this and click at any place in the row, selection change event 
does not fire and I am using *Single selection model* .

When I use,

*CheckboxCell();*

Selection change event fires on the row but,
1) We have click twice to check or uncheck the check box cell.
2) if we check or uncheck in the checkboxcell, the value will reverted as 
soon as I click anywhere.

I am trying to figure out the solution, but not successful yet. Any help 
would be appreciated. 

Am using  *GWT 2.4.0 *

-- 
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/-/aW1FMxHKrOwJ.
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: Help: GWT , RequestFactory with SQLServer ???

2012-05-09 Thread laxman lingampally
Hi

 Thanks for the quick reply!!

thnaks a lot

i am trying to working on using GWT/RF and SQLServer with Hibernate, my web
application runing is fine

but i am trying connect to sql server database at that time i got
exceptions that exception  i given below:

Exception:
*
*
* java.security.AccessControlException: access denied
(java.net.SocketPermission localhost:1433 connect,resolve)*


myHibernate code given below:

1) this in side  POJO class:Here Contact.java is a POJO class

//same setter and getter here
 this code is in side persiste method

   SessionFactory sf = new
Configuration().configure().buildSessionFactory();
session = sf.openSession();
Transaction trans =session.beginTransaction();
Contact contact = new Contact();
contact.setId(6);
contact.setName("dyna");
session.save(contact);
trans.commit();



2)Hibernate.cfg,xml file.



  com.microsoft.sqlserver.jdbc.SQLServerDriver
  jdbc:sqlserver://localhost;databaseName=gwtrf
  sa
  root
  10
  true
  org.hibernate.dialect.SQLServerDialect
  
  
  



3)mapping file:



  
   
   
  

  
   
  

 


Please tell me where i am done worng ,

i am using all related hibernate jars , gwt/rf jars.  but i am tring to
connect jdbc also giving same exception



On Wed, May 9, 2012 at 3:01 PM, Jens  wrote:

> Sure its possible. GWT/RF does not make any assumptions about the database
> you are using.
>
> -- J.
>
>
>
> Am Mittwoch, 9. Mai 2012 11:18:21 UTC+2 schrieb laxman lingampally:
>
>> Hi all,
>>
>> please help me out asap,
>>
>> i have a question
>>
>> it is passible GWT, RF(RequestFactory) with any database ( not Google
>> Datastore GAE & GQL ,google cloud)?
>>
>> i have doubt it is passible or not ?
>>
>>
>> Thanks & Regards
>> laxman.
>>
>  --
> 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/-/073TiZhedCsJ.
> 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.
>

-- 
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-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: Help: GWT , RequestFactory with SQLServer ???

2012-05-09 Thread Jens
Sure its possible. GWT/RF does not make any assumptions about the database 
you are using. 

-- J.



Am Mittwoch, 9. Mai 2012 11:18:21 UTC+2 schrieb laxman lingampally:
>
> Hi all,
>
> please help me out asap,
>
> i have a question
>
> it is passible GWT, RF(RequestFactory) with any database ( not Google 
> Datastore GAE & GQL ,google cloud)?
>
> i have doubt it is passible or not ?
>  
>
> Thanks & Regards
> laxman.
>

-- 
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/-/073TiZhedCsJ.
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.



Help: GWT , RequestFactory with SQLServer ???

2012-05-09 Thread laxman lingampally
Hi all,

please help me out asap,

i have a question

it is passible GWT, RF(RequestFactory) with any database ( not Google
Datastore GAE & GQL ,google cloud)?

i have doubt it is passible or not ?


Thanks & Regards
laxman.

-- 
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-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: help : app engine datasource

2012-05-09 Thread Akram Moncer
thanks, i try the Eager fetch and it generate a warning but it works great.

2012/5/9 Patrick Julien 

>  [image: Boxbe] 
> google-web-toolkit@googlegroups.com is not on your Guest 
> List| Approve
> sender  | Approve
> domain 
>
> Yes, it does.  You'll get a warning on startup but otherwise everything
> works as it should
>
> On Tuesday, May 8, 2012 6:06:32 PM UTC-4, Akram.Moncer wrote:
>>
>> the google app engine datastore don't accepte the fetchtype.Eager, so
>> this oblige me use the fetchtype.lazy
>>
>>
>>
>> 2012/5/8 Brandon Donnelson 
>>
>>>  [image: Boxbe]  google-web-toolkit@**
>>> googlegroups.com  is not on your
>>> Guest List  | Approve 
>>> sender| Approve
>>> domain 
>>>
>>> I'd recommend downloading the GWT SDK, unzip and goto samples>Expenses
>>> and check out the examples. I might suggest changing the FetchType.Lazy to
>>> .Eager if your having problems and back off later if you need.
>>>
>>> Have a good day,
>>> Brandon Donnelson
>>> +Follow Me 
>>>
>>>
>>>
>>> On Tue, May 8, 2012 at 2:15 PM, Akram Moncer wrote:
>>>
 i use RPC and i need the query

 thanks

 2012/5/8 Brandon Donnelson 

>  [image: Boxbe]  google-web-toolkit@**
> googlegroups.com  is not on your
> Guest List  | Approve 
> sender| Approve
> domain 
>
> Are you using RPC or RequestFactory? Do you need the query or are you
> wondering why the results for the collection aren't coming back?
>
>  --
> 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/-/**rPphmktafzAJ
> .
> 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
> **.
>
>


 --
 Akram MONCER
 Personne

  --
 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-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
 **.

>>>
>>>  --
>>> 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-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
>>> **.
>>>
>>>
>>
>>
>> --
>> Akram MONCER
>> Personne
>>
>>   --
> 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/-/B7DOZieuNxkJ.
> 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.
>
>


-- 
Akram MONCER
Personne

-- 
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-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.