Re: Gin, SingleInstanceProvider?

2011-02-03 Thread Ryan Mehregan
yes, it is totally unnecessary.

1- you can annotate your Foo clas with @Singleton annotation.

2- alternatively you can use bind(Foo.class).in(Singleton.class)
in your GIN Module configure() method.

now you can use your Provider as you normally would,
and it gives you the same Foo instance all the time.

-- 
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: Calculate age

2011-02-03 Thread kkpirri
Isn't there a better solution? I don't like ignoring deprecations
because doing that in the future my application won't work. I want to
make it compatible with future JVM versions.

I am thinking in calculating it with a Javscript script. I would
prefer to do it in Java but I think it's a better solution than
ignoring deprecations.

Thank you for your response.


On 2 feb, 17:29, Jim Douglas jdou...@basis.com wrote:
 Ignore the deprecation warnings.

 On Feb 2, 8:25 am, kkpirri hkakashisharin...@gmail.com wrote:

  Hi,

  ¿How can I calculate the age of a person using a Date object with his
  birth date and the current date in GWT's client side?

  I need the age in years and moths (for example, 8 years and 3 moths),
  but it cannot be used a Calendar object and I don't know how to
  retrieve the year and moth from the Date objects since almost every
  methods are deprecated.

  Thank you.



-- 
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: Gin, SingleInstanceProvider?

2011-02-03 Thread Gal Dolber
Yes, I know about singletons. This is not the case.
What I am talking about is delayed instantiation.
In most of my current use cases the binded object aren't singletons.

On Thu, Feb 3, 2011 at 5:03 AM, Ryan Mehregan ryan...@gmail.com wrote:

 yes, it is totally unnecessary.

 1- you can annotate your Foo clas with @Singleton annotation.

 2- alternatively you can use bind(Foo.class).in(Singleton.class)
 in your GIN Module configure() method.

 now you can use your Provider as you normally would,
 and it gives you the same Foo instance all the time.

 --
 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
Guit: Elegant, beautiful, modular and *production ready* gwt applications.

http://code.google.com/p/guit/

-- 
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: Bind form values when sending to server

2011-02-03 Thread Thomas Broyer
Yes: the Editor framework!

See:
http://code.google.com/webtoolkit/doc/latest/DevGuideUiEditors.html
http://tbroyer.posterous.com/gwt-21-editors

Don't miss the before / after sample: https://gist.github.com/780560

-- 
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: Calculate age

2011-02-03 Thread Thomas Broyer
If you want JVM forwards compatibility, then use Calendar.
If you want GWT compatibility, then use java.util.Date and ignore the 
warnings: your code doesn't run in a JVM, what matters is what GWT 
understands. You can alternatively use 
JsDatehttp://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/core/client/JsDate.html
.
If you want both, then you can use JodaTime (there's a GWT-compatible port).

But honestly, do you really think java.util.Date will go away before you do 
some maintenance work on your app?

-- 
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 + GILEAD + AXIS2 POJO PROBLEM

2011-02-03 Thread bond
HI,
any news about this problem?

Thanks

Regards

Daniele

On 24 Gen, 18:00, bond daniele.re...@gmail.com wrote:
 Hi Stefan,
 thanks for your suggestion. I thought about using Request Factory
 without Gilead but I should rewrite many lines of code because the
 project is very large.

 I think you're right; maybe there is a circular reference inside
 LightEntity :-(

 Now I'm trying to creare a plain java class in witch I copy all fields
 fron LightEntity object. But I've this exception:

 org.apache.axis2.AxisFault: java.lang.RuntimeException:
 org.apache.axis2.AxisFault: Mapping qname not fond for the package:
 org.hibernate.collection
         at
 org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:
 517)
         at
 org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:
 371)
         at
 org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:
 417)
         at
 org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:
 229)
         at
 org.apache.axis2.client.OperationClient.execute(OperationClient.java:
 165)
         at
 it.pianetatecno.ztl.server.webservices.PassWsStub.autenticaCliente(PassWsStub.java:
 2780)
         at it.Main.main(Main.java:28)

 Strange: infact my object is detached from hibernate session!!

 Thanks

 On 24 Gen, 13:44, Stefan Ollinger stefan.ollin...@gmx.de wrote:

  Hi Daniele,

  You could give JPA (via Hibernate) and GWT 2.1.1 Request Factory a try.
  With those, you dont need to have serializable Java classes like with
  GWT-RPC before.
  Request Factory uses Interfaces instead, for a) Entity/Value Proxies and
  b) Service Facades (Request Context) and works seamlessly together with
  annotated JPA classes.
  That means your domain classes dont have to extend LightEntity.

  The other option would be to find a way to marshal the LightEntities via
  Axis2.

  23/01/2011 11:56:00 DEBUG StAXOMBuilder:333 - START_ELEMENT:
  23/01/2011 11:56:00 DEBUG StAXOMBuilder:334 -   QName: 
  {http://gwt.pojo.gilead.sf.net/xsd}debugString
  23/01/2011 11:56:15 DEBUG StAXOMBuilder:350 - END_ELEMENT:
  23/01/2011 11:56:15 DEBUG StAXOMBuilder:351 -   QName: 
  {http://gwt.pojo.gilead.sf.net/xsd}debugString
  23/01/2011 11:56:28 DEBUG StAXOMBuilder:333 - START_ELEMENT:
  23/01/2011 11:56:28 DEBUG StAXOMBuilder:334 -   QName: 
  {http://gwt.pojo.gilead.sf.net/xsd}underlyingValue

  ...

  Looks like LightEntities contain properties which you dont want to send
  to the client (debugString, underlyingValue). Maybe there is even a
  circular reference inside where the timeout comes from.

  Regards,
  Stefan

  Am 24.01.2011 13:00, schrieb bond:

   Hi Stefan,
   I need Gilead because my application is a GWT application and ALSO
   expose some webservice to another java standalone application.
   So my application internally uses GWT+Gilead+Hibernate, instead my
   application-external application communicate with webservices Axis2.

   So to avoid rewriting my domain I'd like to return a domain object but
   in this case every domain object extends LightEntity.

   Thanks!!

   Daniele

   On 24 Gen, 12:53, Stefan Ollingerstefan.ollin...@gmx.de  wrote:
   Why do you need Gilead?

   Regards,
   Stefan

   Am 24.01.2011 09:15, schrieb bond:

   Hi Y2i,
   I think so. This is a problem infact. The only solution I think is
   creare a pojo class with the same fields of the object I want return
   but that doesn't extends LightEntity.
   Any other idea?
   Thanks
   On 23 Gen, 18:57, Y2iyur...@gmail.com    wrote:
   May be the problem is related to the fact that 
   LightEntityhttp://noon.gilead.free.fr/javadoc/index.html    is
   not translatable?

-- 
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: Gin, SingleInstanceProvider?

2011-02-03 Thread Ryan Mehregan
using a Provider always result in delayed on-demand instantiation,
the object is not create unless you get() it.

however, if you don't bind it in Singleton scope,
this deferred on-demand instantiation will create a new instance every time 
you call get() on the Provider.
in cases where you only need one instance, you can bind your provider in 
Singleton scope.

please have a look at Guice documentation below: the comments section at the 
very end.
it is similar in GIN.

http://code.google.com/p/google-guice/wiki/InjectingProviders

Ryan

-- 
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: Range start can not be less than 0

2011-02-03 Thread bond
I've the same problem!

Thanks

Daniele

On 1 Feb, 14:56, Deepak Singh deepaksingh...@gmail.com wrote:
 Hi All,

 I have cell table working fine.
 But when i move through the results fast using arrow keys, i sometimes get
 this exception

 (Impl.java:216) 2011-02-01 19:23:53,859 [FATAL] Uncaught Exception:
 java.lang.IllegalArgumentException:
 *Range start cannot be less than 0*
     at 
 com.google.gwt.user.cellview.client.HasDataPresenter.setVisibleRange(HasDataPresenter.java:1414)
     at 
 com.google.gwt.user.cellview.client.HasDataPresenter.setKeyboardSelectedRow(HasDataPresenter.java:833)
     at 
 com.google.gwt.user.cellview.client.HasDataPresenter.keyboardPrev(HasDataPresenter.java:709)
     at 
 com.google.gwt.user.cellview.client.AbstractHasData.onBrowserEvent(AbstractHasData.java:469)
     at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1308)
     at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1264)

 Anything i need to set to table.

 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-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: Gin, SingleInstanceProvider?

2011-02-03 Thread Ryan Mehregan
if you do not want your objects to be in Singleton scope,
just use Provider in following fashion.
no configuration is necessary.

MyClass {

private final ProviderFoo fooProvider;

@Inject
public MyClass(ProviderFoo fooProvider){
this.fooProvider = fooProvider;
}

public void myMethod(){

Foo foo = fooProvider.get(); // this result in on-demand instantiatin of 
Foo.
 // when you inject ProviderFoo in 
the constructor,
 // it is not instantiated. when you 
call .get(), only at that point
// foo instance is created

}

}

-- 
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: Gin, SingleInstanceProvider?

2011-02-03 Thread Ryan Mehregan
if you do not want your objects to be in Singleton scope,
just use Provider in following fashion.
no configuration is necessary.

public class MyClass {

private final ProviderFoo fooProvider;

@Inject
public MyClass(ProviderFoo fooProvider){
this.fooProvider = fooProvider;
}

public void myMethod(){

Foo foo = fooProvider.get(); // this result in on-demand instantiatin of 
Foo.
  
   // when you inject ProviderFoo in the constructor,
 // it is not instantiated. when you 
call .get(), only at that point
// foo instance is created

}

}

-- 
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: Gin, SingleInstanceProvider?

2011-02-03 Thread Ryan Mehregan
if you do not want your objects to be in Singleton scope,
just use Provider in following fashion.
no configuration is necessary.

public class MyClass {

private final ProviderFoo fooProvider;

@Inject
public MyClass(ProviderFoo fooProvider){
this.fooProvider = fooProvider;
}

public void myMethod(){

Foo foo = fooProvider.get(); // this result in on-demand instantiatin of 
Foo.
  
  // injecting ProviderFoo in the 
constructor
 // does not result in instantiation 
of Foo.
  
 // later, when myMethod is invoked, 
only at that point
 /// with the call to .get() , foo 
instance is created

}

}

-- 
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: Gin, SingleInstanceProvider?

2011-02-03 Thread Ryan Mehregan
if you do not want your objects to be in Singleton scope,
just use Provider in following fashion.
no configuration is necessary.

public class MyClass {

private final ProviderFoo fooProvider;

@Inject
public MyClass(ProviderFoo fooProvider){
this.fooProvider = fooProvider;
}

public void myMethod(){

Foo foo = fooProvider.get();  // this result in on-demand instantiation of 
Foo.
  
  // injecting ProviderFoo in the 
constructor
 // does not result in instantiation 
of Foo.
  
 // later, when myMethod is invoked, 
only at that point
 // with the call to .get() , foo 
instance is created.

}

}
Post replyReply to 
authorLink../../../d/msg/google-web-toolkit/t31WrRikkzY/BOLw1VWJr0UJ

-- 
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 + GILEAD + AXIS2 POJO PROBLEM

2011-02-03 Thread Stefan Ollinger

Hi Daniele,

this seems to be a similar problem like before. Hibernate puts a proxy 
around your objects, so your domain objects have hibernate-specific 
properties. Axis2 has problems serializing them. You can configure Axis2 
appropriately.


See this link for a more detailled explanation: 
http://stackoverflow.com/questions/3069659/axis2-not-returning-own-objects


Regards,
Stefan

Am 03.02.2011 10:23, schrieb bond:

HI,
any news about this problem?

Thanks

Regards

Daniele

On 24 Gen, 18:00, bonddaniele.re...@gmail.com  wrote:

Hi Stefan,
thanks for your suggestion. I thought about using Request Factory
without Gilead but I should rewrite many lines of code because the
project is very large.

I think you're right; maybe there is a circular reference inside
LightEntity :-(

Now I'm trying to creare a plain java class in witch I copy all fields
fron LightEntity object. But I've this exception:

org.apache.axis2.AxisFault: java.lang.RuntimeException:
org.apache.axis2.AxisFault: Mapping qname not fond for the package:
org.hibernate.collection
 at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:
517)
 at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:
371)
 at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:
417)
 at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:
229)
 at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:
165)
 at
it.pianetatecno.ztl.server.webservices.PassWsStub.autenticaCliente(PassWsStub.java:
2780)
 at it.Main.main(Main.java:28)

Strange: infact my object is detached from hibernate session!!

Thanks

On 24 Gen, 13:44, Stefan Ollingerstefan.ollin...@gmx.de  wrote:


Hi Daniele,
You could give JPA (via Hibernate) and GWT 2.1.1 Request Factory a try.
With those, you dont need to have serializable Java classes like with
GWT-RPC before.
Request Factory uses Interfaces instead, for a) Entity/Value Proxies and
b) Service Facades (Request Context) and works seamlessly together with
annotated JPA classes.
That means your domain classes dont have to extend LightEntity.
The other option would be to find a way to marshal the LightEntities via
Axis2.
23/01/2011 11:56:00 DEBUG StAXOMBuilder:333 - START_ELEMENT:
23/01/2011 11:56:00 DEBUG StAXOMBuilder:334 -   QName: 
{http://gwt.pojo.gilead.sf.net/xsd}debugString
23/01/2011 11:56:15 DEBUG StAXOMBuilder:350 - END_ELEMENT:
23/01/2011 11:56:15 DEBUG StAXOMBuilder:351 -   QName: 
{http://gwt.pojo.gilead.sf.net/xsd}debugString
23/01/2011 11:56:28 DEBUG StAXOMBuilder:333 - START_ELEMENT:
23/01/2011 11:56:28 DEBUG StAXOMBuilder:334 -   QName: 
{http://gwt.pojo.gilead.sf.net/xsd}underlyingValue
...
Looks like LightEntities contain properties which you dont want to send
to the client (debugString, underlyingValue). Maybe there is even a
circular reference inside where the timeout comes from.
Regards,
Stefan
Am 24.01.2011 13:00, schrieb bond:

Hi Stefan,
I need Gilead because my application is a GWT application and ALSO
expose some webservice to another java standalone application.
So my application internally uses GWT+Gilead+Hibernate, instead my
application-external application communicate with webservices Axis2.
So to avoid rewriting my domain I'd like to return a domain object but
in this case every domain object extends LightEntity.
Thanks!!
Daniele
On 24 Gen, 12:53, Stefan Ollingerstefan.ollin...@gmx.dewrote:

Why do you need Gilead?
Regards,
Stefan
Am 24.01.2011 09:15, schrieb bond:

Hi Y2i,
I think so. This is a problem infact. The only solution I think is
creare a pojo class with the same fields of the object I want return
but that doesn't extends LightEntity.
Any other idea?
Thanks
On 23 Gen, 18:57, Y2iyur...@gmail.com  wrote:

May be the problem is related to the fact that 
LightEntityhttp://noon.gilead.free.fr/javadoc/index.html  is
not translatable?


--
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: Multi-Module Project and Servlet Mappings

2011-02-03 Thread newnoise
Got it. Reading your post several times got me to it. Thanks.

On 2 Feb., 22:26, newnoise tommmuel...@googlemail.com wrote:
 Hi,

 I'm having kind of the same problem, but dont understand what you
 actually did. Could you maybe post a sample web.xml?

 Thanks in advance!
 Tom

 On 14 Jan., 09:37, rsimon magickti...@gmail.com wrote:

  Ouch. Looks like I should have RTFM ;-) Thanks for the hint!

  This solved most of my problem. I was able to map the servlets to /
  endpointName, rather than being forced to create multiple /
  moduleName/endpointName mappings. The applications still made
  their RPC requests to moduleName/endpointName, though.

  However I could fix that by changing the RemoteServiceRelativePath
  configuration in my client side service interface, like so:

  RemoteServiceRelativePath(../endpointName) instead of
  (endpointName)

  Not sure if this is 100% clean. But it did the trick.

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



Collection of entities RequestFactory

2011-02-03 Thread Vasily
Hi All, here is my code:

@Entity
public class Contact {
...
   @OneToMany(mappedBy=contact, targetEntity=Tag.class,
fetch=FetchType.EAGER)
   private ListTag tags;
...
}

I'm using RequestFactory to fetch ContactProxy, but .getTags() on
value returns NULL I've tried to inspect the contactProxy entity
and found what tags field representing as HashMap, not as List:

{requestContext=null,
parentObject=com.test.Test.shared.ContactProxyAutoBean_com_google_gwt_requestfactory_shared_impl_EntityProxyCategory_com_google_gwt_requestfactory_shared_impl_ValueProxyCategory_com_google_gwt_requestfactory_shared_impl_BaseProxyCategory@1eb3560,
stableId=IjAi@0...@com.test.test.shared.ContactProxy, version=MQ==}

I've expected, that as soon as ContactProxy fetched, all tags will be
pre-fetched also... What I'm doing wrong? Thx!

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



Bug: Re: Range start can not be less than 0

2011-02-03 Thread Deepak Singh
So Should we assume that it is a bug?

On Thu, Feb 3, 2011 at 3:01 PM, bond daniele.re...@gmail.com wrote:

 I've the same problem!

 Thanks

 Daniele

 On 1 Feb, 14:56, Deepak Singh deepaksingh...@gmail.com wrote:
  Hi All,
 
  I have cell table working fine.
  But when i move through the results fast using arrow keys, i sometimes
 get
  this exception
 
  (Impl.java:216) 2011-02-01 19:23:53,859 [FATAL] Uncaught Exception:
  java.lang.IllegalArgumentException:
  *Range start cannot be less than 0*
  at
 com.google.gwt.user.cellview.client.HasDataPresenter.setVisibleRange(HasDataPresenter.java:1414)
  at
 com.google.gwt.user.cellview.client.HasDataPresenter.setKeyboardSelectedRow(HasDataPresenter.java:833)
  at
 com.google.gwt.user.cellview.client.HasDataPresenter.keyboardPrev(HasDataPresenter.java:709)
  at
 com.google.gwt.user.cellview.client.AbstractHasData.onBrowserEvent(AbstractHasData.java:469)
  at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1308)
  at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1264)
 
  Anything i need to set to table.
 
  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-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@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: Calculate age

2011-02-03 Thread kkpirri
Thank you! JsDate worked perfectly.

Maybe I am too picky but I don't like using deprecated methods and
neither suppress warning tags.

Thank you.


On 3 feb, 10:17, Thomas Broyer t.bro...@gmail.com wrote:
 If you want JVM forwards compatibility, then use Calendar.
 If you want GWT compatibility, then use java.util.Date and ignore the
 warnings: your code doesn't run in a JVM, what matters is what GWT
 understands. You can alternatively use 
 JsDatehttp://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g...
 .
 If you want both, then you can use JodaTime (there's a GWT-compatible port).

 But honestly, do you really think java.util.Date will go away before you do
 some maintenance work on your app?

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



How to add datetimepiker in GWT

2011-02-03 Thread sujit mishra
Hi ,

 I need help regards datetimepicke widget . I am using GWT but not
found any widget that able to capture date and time both at a
 time  from user.

 So , please help me how to add datetimepicke using GWT

Thanks
Sujit Mishra

-- 
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: Multimodule projects

2011-02-03 Thread Alex Solovyev
Hi, André.
My project need`s same features, and i` ve searched for that.
There is a code splitting feature in  GWT, it can be helpful for you.
(http://code.google.com/webtoolkit/doc/latest/DevGuideCodeSplitting.html)
But i think, it a past of full decision. if you find an multiple
entry-points example, you could share this.

Best regards,
Alex Solovyev.

On Wed, Feb 2, 2011 at 3:17 PM, André Salvati andre.f.salv...@gmail.comwrote:

 This post has good advices about GWT multimodule projects.


 http://ars-codia.raphaelbauer.com/2011/01/gwt-project-layout-part-2-large.html


 But I was thinking if there is some way to split code by functional
 modules like financial, customer, receivable, etc.

 This way the developer wouldn't even need to see/install code from
 other other functional modules. This is a requirement on my project.

 Do you think its possible? How can I do it? With many entry-points in
 development environment and just one in production environment?

 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-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@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: Calculate age

2011-02-03 Thread Jeff Schwartz
I think you will find that you are not alone in your opinion regarding using
deprecated methods and that you are in fact in good company.


On Thu, Feb 3, 2011 at 7:35 AM, kkpirri hkakashisharin...@gmail.com wrote:

 Thank you! JsDate worked perfectly.

 Maybe I am too picky but I don't like using deprecated methods and
 neither suppress warning tags.

 Thank you.


 On 3 feb, 10:17, Thomas Broyer t.bro...@gmail.com wrote:
  If you want JVM forwards compatibility, then use Calendar.
  If you want GWT compatibility, then use java.util.Date and ignore the
  warnings: your code doesn't run in a JVM, what matters is what GWT
  understands. You can alternatively use JsDate
 http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g...
  .
  If you want both, then you can use JodaTime (there's a GWT-compatible
 port).
 
  But honestly, do you really think java.util.Date will go away before you
 do
  some maintenance work on your app?

 --
 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
*Jeff Schwartz*

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



How to remove the check of the findxxx() static method in domain entity

2011-02-03 Thread Patrice De Saint Steban
Hello,

We use the request factory with spring and classic services, and for find a 
new entity, we use a method in the service and not in the domain entity.
We create a ServiceLayerDecorator to override the loadDomainObject to load 
the object without use the static method findxxx() in the entity.
It's works fine, put we must put a fake findxxx() static method for pass the 
validation. We try to override the RequestFactoryInterfaceValidator for 
remove the check findxxx() in the method checkIdAndVersion(), but it's not 
works.
Is there an another way to remove the check of the findxx() static method 
without define a fake method ?

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-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: local script variables in nocache.js

2011-02-03 Thread bconoly
If it helps any I need the following:

nocache.js:
this.resourceUrl = $resourceUrl;

GWT jsni:
/**
 * Returns the resource url set in nocache.js after it has been
replaced by the template.
 */
private native String getResourceUrl /*-{
return resourceUrl;
}-*/

Thanks

On Feb 2, 8:16 am, bconoly bcon...@gmail.com wrote:
 Hey All,
     I'm using GWT in portlets and I've run into a unique circumstance
 where I have an instanceable porltet being placed multiple times on
 the same page.  Currently the url that I use to make my RPC calls is
 set as a global variable in the page and with 2 or more instances on
 the same page they overwrite each other allowing only one to work.

     I had an idea of pulling the nocache.js file into my velocity
 template so I could place the url variable in it so it is scoped
 locally but I need it as part of the compile.  Is there any way I can
 place a variable into the nocache.js that will be local to each
 instance of the script running?  And if so, how do I get access it
 inside the GWT execution context?

 Thanks in advance,
 Brett

-- 
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 debuggin in Chrome - why is so slow?

2011-02-03 Thread Edson Richter
Thanks for the tip, but my IE problem is that scripts are 100 times
slower, and one process at time make RPC impossible to work with...
and my application deals with huge amounts of data (obejcts) received
through RPC.

Regards,

Edson.

On 2 fev, 15:56, Eric edimickeast...@gmail.com wrote:...

-- 
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 debuggin in Chrome - why is so slow?

2011-02-03 Thread Edson Richter
I'm working with the following environment:

a) Windows 7 Home Premium 64bit
b) Sun Java JDK 1.6.0_22 32bit and JRockit 4 (1.6.0_20) 32bit
c) NetBeans 6.9.2 on Sun JDK 1.6.0_22 32bit
d) Apache Tomcat 6.0.30 on Sun JDK 1.6.0_22 or JRockit 1.6.0.20 (both
32bit)
e) Front-end Google Chrome (8.0.552.237) with latest GWT plugin
(1.0.9646) or Mozilla FireFox (3.6.13) with latest plugin (1.0.9639)
f) NetBeans has the Nb4GWT plugin, so I can start the application in
debug mode so it starts Apache Tomcat in Debug Mode, opens the GWT
console and launch the application with url like
http://localhost:8080/SimuladorFrete/index.jsp?gwt.codesvr=127.0.0.1:9997

It works fine with FireFox, but Google Chrome never opens the page
when the data amount received from RPC service is really huge (4 or
5Mb of data through the network): it never hits the breakpoints marked
in the VM, it just never hit the onSuccess or onFailure, and keeps
giving the infamous The script in the page is too slow, continue
processing? (or similar message like this).

By today (using Apache+SunJDK), I got another error in the GWT Console
(may be thanks to the new plugin installed yesterday) - 4 stack traces
below:

00:02:53,692 [ERROR] Failed to create an instance of
'br.com.simfreteV1.ui.calculo.CalculoEntryPoint' via deferred binding
com.google.gwt.core.client.JavaScriptException: (String): invoke of
@com.google.gwt.dom.client.Element::setPropertyString(Ljava/lang/
String;Ljava/lang/String;) failed   at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
195)at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
120)at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
507)at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:
284)at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:
107)at com.google.gwt.dom.client.Element$.setPropertyString$
(Element.java)  at
com.google.gwt.user.client.DOM.setElementProperty(DOM.java:1094)at
com.google.gwt.user.client.ui.UIObject.setStyleName(UIObject.java:267)
at com.google.gwt.user.client.ui.UIObject.setStyleName(UIObject.java:
648)at com.google.gwt.user.datepicker.client.DefaultCalendarView
$CellGrid$DateCell.updateStyle(DefaultCalendarView.java:122)at
com.google.gwt.user.datepicker.client.DefaultCalendarView$CellGrid
$DateCell.update(DefaultCalendarView.java:105)  at
com.google.gwt.user.datepicker.client.DefaultCalendarView.refresh(DefaultCalendarView.java:
190)at
com.google.gwt.user.datepicker.client.DatePicker.refreshAll(DatePicker.java:
622)at
com.google.gwt.user.datepicker.client.DatePicker.setCurrentMonth(DatePicker.java:
513)at
com.google.gwt.user.datepicker.client.DatePicker.init(DatePicker.java:
282)at
com.google.gwt.user.datepicker.client.DatePicker.init(DatePicker.java:
258)at
br.com.simfreteV1.ui.comps.DateTextBoxCalendar.init(DateTextBoxCalendar.java:
30) at br.com.simfreteV1.ui.comps.DateTextBox.init(DateTextBox.java:
38) at
br.com.simfreteV1.ui.calculo.CalculoEntryPoint.init(CalculoEntryPoint.java:
62) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39) at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
27) at java.lang.reflect.Constructor.newInstance(Constructor.java:
513)at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
422)at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
361)at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
185)at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
380)at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
222)at java.lang.Thread.run(Thread.java:662)

and

00:02:53,697 [ERROR] Failed to create an instance of
'com.google.gwt.core.client.impl.SchedulerImpl' via deferred binding
com.google.gwt.core.client.JavaScriptException: (String): invoke of
@com.google.gwt.core.client.JavaScriptObject::createArray() failed  at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
195)at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
120)at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
507)at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
264)at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
91) at com.google.gwt.core.client.JavaScriptObject
$.createArray(JavaScriptObject.java)at
com.google.gwt.core.client.impl.SchedulerImpl.init(SchedulerImpl.java:
251)at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) at

Re: GWT debuggin in Chrome - why is so slow?

2011-02-03 Thread Edson Richter
Hi, Chris!

Thanks for your answer - even if I hit the Ignore or Continue
button (I don't remember the exact text appears in the button face,
because I do use Portuguese Brazilian here...), Chrome fronzen until
it dies with the Crash page.

The NPObject error did not happen since latest plugin. If I hit it
again, I'll open another thread.

Regards,

Edson.

On 2 fev, 19:33, Chris Conroy con...@google.com wrote:
 The Chrome plugin model slows down development mode a fair amount. Note that
 you can ignore those hang timeout warnings that the Chrome UI surfaces--the
 dialog will go away once the codeserver hands control back to JS (e.g. while
 waiting for a long refresh).

 What NPObject error specifically are you hitting?

 On Wed, Feb 2, 2011 at 10:12 AM, Edson Richter brvik...@gmail.com wrote:
  I've a development environment composed by NetBeans, Apache Tomcat
  6.0.30 and GWT 2.0.4.

  In the client side, I've Google Chrome and Mozilla Firefox. I gave up
  on testing Internet Explorer due the amount of bugs (in IE, to be
  clear).

  Google Chrome is the fastest and stable browser I've been using so
  far, but for debug I can only use FireFox.
  In Chrome, if I don't get NPObject... bug, then I get repeated
  timeouts.

  My application is a business application that uses several custom
  gadgets, but I don't believe this is the problem, since Firefox works
  well (either to run or debug the application). Also, as I stated
  before, Chrome is that fastest (but I cant debug the application).

  Can anyone help me? Is there any Chrome configuration or restriction?
  Is the plugin working in Chrome for debug mode?

  I'll appreciate your help.

  Regards,

  Edson Richter.

  --
  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.comgoogle-web-toolkit%2bunsubscr...@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: how can i add my voice in my gwt application as time of registration

2011-02-03 Thread Ben Imp
I don't believe a web browser will let you access anything like a
microphone.  A flash plugin can access such things, but thats about
it.

-Ben

On Feb 2, 11:08 pm, dhruti dhruti...@gmail.com wrote:
 hi
 i m gwt designer.
 i working with app in which i want to enroll users voice at the time
 of registration and than at the time of login i have to math that
 voice and new voice as an login authentication.
 so how the things can be done?

-- 
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: Calculate age

2011-02-03 Thread Ben Imp
Indeed.  The alternative of sending all date operations to the server
is ... incredibly inconvenient at best.

-Ben

On Feb 3, 7:20 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 I think you will find that you are not alone in your opinion regarding using
 deprecated methods and that you are in fact in good company.



 On Thu, Feb 3, 2011 at 7:35 AM, kkpirri hkakashisharin...@gmail.com wrote:
  Thank you! JsDate worked perfectly.

  Maybe I am too picky but I don't like using deprecated methods and
  neither suppress warning tags.

  Thank you.

  On 3 feb, 10:17, Thomas Broyer t.bro...@gmail.com wrote:
   If you want JVM forwards compatibility, then use Calendar.
   If you want GWT compatibility, then use java.util.Date and ignore the
   warnings: your code doesn't run in a JVM, what matters is what GWT
   understands. You can alternatively use JsDate
 http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g...
   .
   If you want both, then you can use JodaTime (there's a GWT-compatible
  port).

   But honestly, do you really think java.util.Date will go away before you
  do
   some maintenance work on your app?

  --
  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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

 --
 *Jeff Schwartz*

-- 
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 add datetimepiker in GWT

2011-02-03 Thread Ben Imp
As far as I am aware, there is no such widget.  You will have to make
one.

-Ben

On Feb 3, 3:24 am, sujit mishra sujit.u...@gmail.com wrote:
 Hi ,

      I need help regards datetimepicke widget . I am using GWT but not
 found any widget that able to capture date and time both at a
      time  from user.

      So , please help me how to add datetimepicke using GWT

 Thanks
 Sujit Mishra

-- 
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 add datetimepiker in GWT

2011-02-03 Thread Jeff Schwartz
Using UiBinder in some ui.xml file:

ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder
xmlns:g=urn:import:com.google.gwt.user.client.ui
xmlns:dp=urn:import:com.google.gwt.user.datepicker.client
...
table id=inputTable
tr
tdg:Label addStyleNames={style.detailLabel}
{style.required}Date of purchase/g:Label/td
tddp:DateBox ui:field=dopDateBox
styleName={style.detailValue}//td
/tr
/table
...

Then, in the .java file:
...
@UiField
DateBox dopDateBox;

...
dopDateBox.setFormat(new
DateBox.DefaultFormat(DateTimeFormat.getFormat( dd, )));
dopDateBox.getDatePicker().setWidth(200px);
dopDateBox.addValueChangeHandler(new ValueChangeHandlerDate(){

@Override
public void onValueChange(ValueChangeEventDate event) {
...
}

});
...

I hope this helps.

Jeff

On Thu, Feb 3, 2011 at 9:28 AM, Ben Imp benlee...@gmail.com wrote:

 As far as I am aware, there is no such widget.  You will have to make
 one.

 -Ben

 On Feb 3, 3:24 am, sujit mishra sujit.u...@gmail.com wrote:
  Hi ,
 
   I need help regards datetimepicke widget . I am using GWT but not
  found any widget that able to capture date and time both at a
   time  from user.
 
   So , please help me how to add datetimepicke using GWT
 
  Thanks
  Sujit Mishra

 --
 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
*Jeff Schwartz*

-- 
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: Collection of entities RequestFactory

2011-02-03 Thread Y2i
Are you using with(tags)?
http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html#relationships

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



how can i implement Focusable (and HasAllKeyHandlers) on a TabLayoutPanel?

2011-02-03 Thread chm124
how can i implement Focusable (and HasAllKeyHandlers) on a
TabLayoutPanel?

Hi
In my App, the outermost Panel is a TabLayoutPanel (which must be
attached to RootPanel via RootPanel.get().add(TabLayoutPanel)),
otherwise its tab-contents are invisible.
I would like to implement my outermost Panel Focusable and at least
HasAllKeyHandlers, too,
since it should be possible to trigger KeyDown-events without explicit
clicking on the panel before it can handle the KeyDown-events.

In a first prototype, we used a TabPanel wrapped by a FocusPanel
(which implements Focusable and many other HasHandler_interfaces).
Now, for several reasons we MUST use TabLayoutPanel as outermost
panel.
Has somebody already done that or could give me a good hint to do
that?

Thanks in advance,
greez,
Christoph

-- 
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: Collection of entities RequestFactory

2011-02-03 Thread Vasily
No,... probably that's the case... Thx

On Feb 3, 5:55 pm, Y2i yur...@gmail.com wrote:
 Are you using 
 with(tags)?http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.h...

-- 
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 add datetimepiker in GWT

2011-02-03 Thread Ben Imp
I think you missed the bit about capturing the time portion as well.

-Ben

On Feb 3, 8:47 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 Using UiBinder in some ui.xml file:

 ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder
     xmlns:g=urn:import:com.google.gwt.user.client.ui
     xmlns:dp=urn:import:com.google.gwt.user.datepicker.client
 ...
 table id=inputTable
                 tr
                     tdg:Label addStyleNames={style.detailLabel}
 {style.required}Date of purchase/g:Label/td
                     tddp:DateBox ui:field=dopDateBox
 styleName={style.detailValue}//td
                 /tr
 /table
 ...

 Then, in the .java file:
 ...
     @UiField
     DateBox dopDateBox;

 ...
         dopDateBox.setFormat(new
 DateBox.DefaultFormat(DateTimeFormat.getFormat( dd, )));
         dopDateBox.getDatePicker().setWidth(200px);
         dopDateBox.addValueChangeHandler(new ValueChangeHandlerDate(){

             @Override
             public void onValueChange(ValueChangeEventDate event) {
                 ...
             }

         });
 ...

 I hope this helps.

 Jeff



 On Thu, Feb 3, 2011 at 9:28 AM, Ben Imp benlee...@gmail.com wrote:
  As far as I am aware, there is no such widget.  You will have to make
  one.

  -Ben

  On Feb 3, 3:24 am, sujit mishra sujit.u...@gmail.com wrote:
   Hi ,

        I need help regards datetimepicke widget . I am using GWT but not
   found any widget that able to capture date and time both at a
        time  from user.

        So , please help me how to add datetimepicke using GWT

   Thanks
   Sujit Mishra

  --
  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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

 --
 *Jeff Schwartz*

-- 
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 can i implement Focusable (and HasAllKeyHandlers) on a TabLayoutPanel?

2011-02-03 Thread Jeff Larsen
public class MyTabLayoutPanel extends TabLayoutPanel implements Focusable, 
HasAllKeyboardHandlers{


-- In your constructor add --

sinkEvents(Event.FOCUS | EVENT.KEYEVENTS);

}

and that *Should work. 

also, you probably want to add the layout panel to RootLayoutPanel, not 
RootPanel. 

-- 
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 add datetimepiker in GWT

2011-02-03 Thread Jeff Schwartz
I haven't tested it but DatePicker's getValue method returns a Date object.
What I am not sure of is if the Date object reflects the current time when a
user selects a date from the calendar. The returned Date's getTime() method
needs to be tested to see if it does or doesn't.

Jeff


On Thu, Feb 3, 2011 at 10:43 AM, Ben Imp benlee...@gmail.com wrote:

 I think you missed the bit about capturing the time portion as well.

 -Ben

 On Feb 3, 8:47 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
  Using UiBinder in some ui.xml file:
 
  ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder
  xmlns:g=urn:import:com.google.gwt.user.client.ui
  xmlns:dp=urn:import:com.google.gwt.user.datepicker.client
  ...
  table id=inputTable
  tr
  tdg:Label addStyleNames={style.detailLabel}
  {style.required}Date of purchase/g:Label/td
  tddp:DateBox ui:field=dopDateBox
  styleName={style.detailValue}//td
  /tr
  /table
  ...
 
  Then, in the .java file:
  ...
  @UiField
  DateBox dopDateBox;
 
  ...
  dopDateBox.setFormat(new
  DateBox.DefaultFormat(DateTimeFormat.getFormat( dd, )));
  dopDateBox.getDatePicker().setWidth(200px);
  dopDateBox.addValueChangeHandler(new ValueChangeHandlerDate(){
 
  @Override
  public void onValueChange(ValueChangeEventDate event) {
  ...
  }
 
  });
  ...
 
  I hope this helps.
 
  Jeff
 
 
 
  On Thu, Feb 3, 2011 at 9:28 AM, Ben Imp benlee...@gmail.com wrote:
   As far as I am aware, there is no such widget.  You will have to make
   one.
 
   -Ben
 
   On Feb 3, 3:24 am, sujit mishra sujit.u...@gmail.com wrote:
Hi ,
 
 I need help regards datetimepicke widget . I am using GWT but
 not
found any widget that able to capture date and time both at a
 time  from user.
 
 So , please help me how to add datetimepicke using GWT
 
Thanks
Sujit Mishra
 
   --
   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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 google-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%252bunsubscr...@googlegroups.com
 
   .
   For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.
 
  --
  *Jeff Schwartz*

 --
 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
*Jeff Schwartz*

-- 
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 remove the check of the findxxx() static method in domain entity

2011-02-03 Thread Thomas Broyer


On Thursday, February 3, 2011 2:25:30 PM UTC+1, Patrice De Saint Steban 
wrote:

 Hello,

 We use the request factory with spring and classic services, and for find a 
 new entity, we use a method in the service and not in the domain entity.
 We create a ServiceLayerDecorator to override the loadDomainObject to load 
 the object without use the static method findxxx() in the entity.


You shouldn't do that (see below).
 

 It's works fine, put we must put a fake findxxx() static method for pass 
 the validation. We try to override the RequestFactoryInterfaceValidator for 
 remove the check findxxx() in the method checkIdAndVersion(), but it's not 
 works.
 Is there an another way to remove the check of the findxx() static method 
 without define a fake method ?


Use a Locator for your entities, and move your 
ServiceLayerDecorator#loadDomainObejct override within its find().

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



ActivityManager and TabLayoutPanel

2011-02-03 Thread Ernesto Reig
Hello everybody,
I don´t know if this problem can be solved easily or maybe I have to think
of another approach.
The thing is that I want a TabLayoutPanel, so that the ActivityManager keeps
track of all the activity´s of the different tabs, but the first problem I
find is setting the Display. The ActivityManager only accepts instances of
AcceptsOneWidget (activityManager.setDisplay(AcceptsOneWidget display);)
What can I do to implement this??

The second problem is that, providing that I finally have the
ActivityManager managing all the activities running within the context of
the TabLayoutPanel, what´s the best way to do this? I mean, is it better to
haver one View, one Place and one Activity per tab? How would you do it?

Thank you very much.

-- 
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: CellTable and GAE Datastore cursors

2011-02-03 Thread George Moschovitis
thanks for the pointer, will have a look...

-g.

-- 
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: the Honeycomb presentation, GWT and Android

2011-02-03 Thread George Moschovitis
Similar thoughts passed through my head while watching the honeycomb 
video...
But I don't see such support for Android materializing soon (if ever...)

-g. 

-- 
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: Setting first column width CSS in CellBrowser via DOM API

2011-02-03 Thread John LaBanca
We haven't had a change to fix this yet.  CellBrowser uses a
SplitLayoutPanel that has a fairly complicated structure, so DOM
manipulation isn't likely to work.

As a workaround, you can get access to the SplitLayoutPanel in CellBrowser
and set the widget width directly.  Subclass CellBrowser and override
getWidget() to return a SplitLayoutPanel, then do the following:

SplitLayoutPanel splitPanel = cellBrowser.getWidget();
splitPanel.setWidgetSize(splitPanel.getWidget(0), 400.0);

Thanks,
John LaBanca
jlaba...@google.com


On Wed, Feb 2, 2011 at 9:38 PM, sevendays fux...@gmail.com wrote:

 I raised query around a month ago about setting the width of the first
 column in a CellBrowser in GWT. There is a bug that stops this from
 occurring - it always displays with a default width of 200px because this is
 the generated HTML for the wrapper divs:

 div style=position: absolute; overflow: hidden; left: 0px; top: 0px;
 bottom: 0px; width: 200px;
 div style=position: absolute; overflow: hidden; left: 200px; top: 0px;
 bottom: 0px; width: 8px;

 My original post is here:
 https://groups.google.com/d/msg/google-web-toolkit/Zmz_1XDq4dI/R2LxcPQqNQ4J

 So as a work around I am trying to set the width style dynamically through
 the GWT DOM API. Here is some sample code showing my approach:

 Button test = new Button(Test);
 test.addClickHandler(new ClickHandler() {
 @Override
 public void onClick(ClickEvent event) {
 Element browserElement = browser.getElement();
  NodeList browserChildNodes = browserElement.getChildNodes();

 for (int i=0; ibrowserChildNodes.getLength(); i++) {
  Node n = browserChildNodes.getItem(i);
 int divCount = 0;
 if (n.getNodeType() == Node.ELEMENT_NODE) {
  Element e = Element.as(n);
 if (e.getTagName().equalsIgnoreCase(DIV)) {
 System.out.println(Before mod:  + e.getAttribute(style));
  if (divCount == 2) {
 Style s = e.getStyle();
 e.setId(col1);
  s.setWidth(400.00, Unit.PX);
 e.setAttribute(style, position: absolute; overflow: hidden; left: 0px;
 top: 0px; bottom: 0px; width: 400px;);
  } else if (divCount == 3) {
 e.setId(col1Dragger);
 e.setAttribute(style, position: absolute; overflow: hidden; left: 400px;
 top: 0px; bottom: 0px; width: 8px;);
  }
  System.out.println(After mod:  + e.getAttribute(style));
  divCount++;
 }
 }
 }
  }
 });

 However, when 'button Test is clicked, it makes no difference to the style
 attribute. The 'after mod' println shows the same results as 'before mod'.
 Checking the HTML, also shows no change.'  I have also tried the above code
 in the initialization code for the CellBrowser; nothing changes in the
 rendered HTML.

 I am sure I am looking at the right divs, as a println of the style
 attibute matches perfectly.

 setId(), also has no effect.

 I have also tried e.getStyle().setProperty(width, Unit.PX), and this had
 no effect.

 Why is the DOM manipulation having no effect?

 --
 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.comgoogle-web-toolkit%2bunsubscr...@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: RequestFactoryEditorDriver example?

2011-02-03 Thread George Moschovitis
OK, will give another try to identify the problem.

-g.

-- 
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: Gin, SingleInstanceProvider?

2011-02-03 Thread Gal Dolber
No idea why you answer 3 times the same, but please read again my question.
I am using providers. As I already imagined gin doesn't have what I need.
I was looking for other solutions people were using.

What I need is: A provider of a non-singleton class that return always the
same instance.

I am doing it by hand as I showed on my first post.
Anyone having the same problem? and a better way of solving it?

On Thu, Feb 3, 2011 at 6:40 AM, Ryan Mehregan ryan...@gmail.com wrote:

 if you do not want your objects to be in Singleton scope,
 just use Provider in following fashion.
 no configuration is necessary.

 public class MyClass {

 private final ProviderFoo fooProvider;

 @Inject
 public MyClass(ProviderFoo fooProvider){
 this.fooProvider = fooProvider;
 }

 public void myMethod(){

 Foo foo = fooProvider.get();  // this result in on-demand instantiation of
 Foo.

   // injecting ProviderFoo in the
 constructor
  // does not result in
 instantiation of Foo.

  // later, when myMethod is
 invoked, only at that point
  // with the call to .get() , foo
 instance is created.

 }

 }
 Post replyReply to 
 authorLinkhttp://../../../d/msg/google-web-toolkit/t31WrRikkzY/BOLw1VWJr0UJ

 --
 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
Guit: Elegant, beautiful, modular and *production ready* gwt applications.

http://code.google.com/p/guit/

-- 
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 2.1.1. + Deploy in Tomcat

2011-02-03 Thread Gabriel
Thanks for your time Thomas, I guess I understand concept and I can
deploy in Tomcat 6.

Greetings!

On Jan 28, 5:25 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On Friday, January 28, 2011 6:59:30 PM UTC+1, Gabriel wrote:

  Hi Florian, Thomas, thanks for reply.

  I have this on WEB-INF\lib:

  * db4o-7.12.156.14667-core-java5.jar
  * geronimo-jpa_3.0_spec-1.1.1.jar
  * gwt-servlet.jar
  * gwt-servlet-deps.jar
  * jsr107cache-1.1.jar

  I'm using GWT 2.1.1 without App Engine in Development Mode and run
  successfully. When I try to deploy in Tomcat 6, I have next error:

  GWT module 'appGwtRf' may need to be (re)compiled

  What's I'm doing wrong?

 AFAICT, this 
 errorhttp://www.google.com/codesearch/p?hl=fr#A1edwVHBClQ/dev/core/src/com...
  happens
 when your deployed *.nocache.js is the one produced by the DevMode rather
 than the one produced by the Compiler.

-- 
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: is there any release notes for GWT 2.2-M1 ?

2011-02-03 Thread David Chandler
Not yet. There will be release notes for the actual 2.2 release.

On Wed, Feb 2, 2011 at 4:25 PM, zixzigma zixzi...@gmail.com wrote:

 Hello Everyone,

 is there any release notes for GWT 2.2-M1 ?
 I would like to know about the features added or modification to API.

 Thank You

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




-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

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



GWT CellTable: very confused about T and C in ColumnT,C and HasCellT,C

2011-02-03 Thread zixzigma
I am very confused about HasCellT,C and ColumnT,C.

I am using Cell types available by GWT (TextCell, ActionCell etc), and I can 
get them to work.

However, when I try to create custom Cell for CellTable,
I realize I do not fully understand what I'm doing,
and the confusion is from not fully understanding difference between C and 
T.


could you please explain T and C, in context of having a CellTable,
displaying a Contact object ?
Contact is T or C ? and if its C then what is T and vice versa ?


Thank You 

in ColumnT,C
 * @param T the row type
 * @param C the column type

in HasCellT,C
 * @param T the underlying data type
 * @param C the cell data type

(do not fully understand difference between T and C, very confused,
what is T ? what is C ?)

-- 
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: ActivityManager and TabLayoutPanel

2011-02-03 Thread Jack
Well I am not very familiar with the GWT MVP Framework but from what
I've read I would use one Place and one Activity for the whole
TabLayoutPanel an put it into a display region ( =
AcceptsOneWidget). I guess that should be fine in most situations.
For example a GWT application may have a place where the user can
change his personal preferences. These preferences could be
categorized into a couple of categories. This should be typical use
case for a TabLayoutPanel. So I would create a SettingsPlaces and a
SettingsActivity. The SettingsActivity would then put its view (a
complete TabLayoutPanel) into the AcceptsOnWidget provided in the
activities start method.
To determine the tab that should be shown I would use the place token,
e.g. http://yourapp/#SettingsPlace:t=tabindex.

Maybe I missed something because I am not a GWT MVP expert but I
hope it helps. In my opinion, having a separate ActivityManager for a
TabLayoutPanel is a bit overkill. If I am wrong, someone please
correct me :) I am also interested in how TabLayoutPanels should be
used with the GWT MVP Framework.

Why do you want to use a TabLayoutPanel and why do you think you need
an activity/place per tab?


On 3 Feb., 18:32, Ernesto Reig erniru...@gmail.com wrote:
 Hello everybody,
 I don´t know if this problem can be solved easily or maybe I have to think
 of another approach.
 The thing is that I want a TabLayoutPanel, so that the ActivityManager keeps
 track of all the activity´s of the different tabs, but the first problem I
 find is setting the Display. The ActivityManager only accepts instances of
 AcceptsOneWidget (activityManager.setDisplay(AcceptsOneWidget display);)
 What can I do to implement this??

 The second problem is that, providing that I finally have the
 ActivityManager managing all the activities running within the context of
 the TabLayoutPanel, what´s the best way to do this? I mean, is it better to
 haver one View, one Place and one Activity per tab? How would you do it?

 Thank you very much.

-- 
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: Gin, SingleInstanceProvider?

2011-02-03 Thread zixzigma
I am using the same technique as Ryan suggested.

Your comment : non-singleton class that return always the same instance
isn't a non-singleton class that always return the same instance in fact 
the very definition of Singleton ? : )

I have read that there is a difference between Singleton Design Pattern and 
Singleton Scope.
Singleton Scope = always return the same instance, is this wrong ?

your code:
the foo==null check in redundant,
because provider.get() does that for you.

and if you want to always return the same instance,
then bind it in Singleton scope.

Foo assertFoo() {
if (foo == null) {
foo = provider.get();
}
return foo;
}

You have made me confused now,
I like to see some thoughts on this as well.

-- 
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: Gin, SingleInstanceProvider?

2011-02-03 Thread Gal Dolber
If I inject a provider on 2 different classes I expect them to return a
different instance, but each provider must return the same one.

class A {
@Inject
public ProviderC p; // p.get() returns always the same instance
}

class B {
@Inject
public ProviderC p; // p.get() returns always the same instance
}

But A.p.get() is not the same instance than B.p.get().

On Thu, Feb 3, 2011 at 5:54 PM, zixzigma zixzi...@gmail.com wrote:

 I am using the same technique as Ryan suggested.

 Your comment : non-singleton class that return always the same instance
 isn't a non-singleton class that always return the same instance in fact
 the very definition of Singleton ? : )

 I have read that there is a difference between Singleton Design Pattern and
 Singleton Scope.
 Singleton Scope = always return the same instance, is this wrong ?

 your code:
 the foo==null check in redundant,
 because provider.get() does that for you.

 and if you want to always return the same instance,
 then bind it in Singleton scope.

 Foo assertFoo() {
 if (foo == null) {
 foo = provider.get();
 }
 return foo;
 }

 You have made me confused now,
 I like to see some thoughts on this as well.

  --
 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
Guit: Elegant, beautiful, modular and *production ready* gwt applications.

http://code.google.com/p/guit/

-- 
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: Gin, SingleInstanceProvider?

2011-02-03 Thread Gal Dolber
Sorry, the example should be with SimpleInstanceProvider, not with
Provider

On Thu, Feb 3, 2011 at 6:05 PM, Gal Dolber gal.dol...@gmail.com wrote:

 If I inject a provider on 2 different classes I expect them to return a
 different instance, but each provider must return the same one.

 class A {
 @Inject
 public ProviderC p; // p.get() returns always the same instance
 }

 class B {
 @Inject
 public ProviderC p; // p.get() returns always the same instance
 }

 But A.p.get() is not the same instance than B.p.get().

 On Thu, Feb 3, 2011 at 5:54 PM, zixzigma zixzi...@gmail.com wrote:

 I am using the same technique as Ryan suggested.

 Your comment : non-singleton class that return always the same instance
 isn't a non-singleton class that always return the same instance in fact
 the very definition of Singleton ? : )

 I have read that there is a difference between Singleton Design Pattern
 and Singleton Scope.
 Singleton Scope = always return the same instance, is this wrong ?

 your code:
 the foo==null check in redundant,
 because provider.get() does that for you.

 and if you want to always return the same instance,
 then bind it in Singleton scope.

 Foo assertFoo() {
 if (foo == null) {
 foo = provider.get();
 }
 return foo;
 }

 You have made me confused now,
 I like to see some thoughts on this as well.

  --
 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




 --
 Guit: Elegant, beautiful, modular and *production ready* gwt applications.

 http://code.google.com/p/guit/







-- 
Guit: Elegant, beautiful, modular and *production ready* gwt applications.

http://code.google.com/p/guit/

-- 
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 CellTable: very confused about T and C in ColumnT,C and HasCellT,C

2011-02-03 Thread Jack
When using a CellTable that displays contacts you may have a column
that displays the name for each contact.
Thus this column would be defined as

ColumnContact, String implements HasCellContact, String

So T is the type of objects you want to display (the rows, e.g.
Contact, Car, ...) and C is the type of the property of T that will be
shown in a specific column (e.g. the contacts name (=String), the
contacts birthday (=Date))

So C and T have the same meaning in Column and HasCell.



On 3 Feb., 21:37, zixzigma zixzi...@gmail.com wrote:
 I am very confused about HasCellT,C and ColumnT,C.

 I am using Cell types available by GWT (TextCell, ActionCell etc), and I can
 get them to work.

 However, when I try to create custom Cell for CellTable,
 I realize I do not fully understand what I'm doing,
 and the confusion is from not fully understanding difference between C and
 T.

 could you please explain T and C, in context of having a CellTable,
 displaying a Contact object ?
 Contact is T or C ? and if its C then what is T and vice versa ?

 Thank You

 in ColumnT,C
  * @param T the row type
  * @param C the column type

 in HasCellT,C
  * @param T the underlying data type
  * @param C the cell data type

 (do not fully understand difference between T and C, very confused,
 what is T ? what is C ?)

-- 
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 CellTable: very confused about T and C in ColumnT,C and HasCellT,C

2011-02-03 Thread Thomas Broyer
Assuming you have a ListPerson you want to display in a CellTable:

ColumnPerson, String firstName = new TextColumPerson() {
  public String getValue(Person p) { return p.getFirstName(); }
};
ColumnPerson, Date birthDate = new ColumnPerson, Date(new DateCell()) {
  public Date getValue(Person p) { return p.getBirthDate(); }
};

Does that 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-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: Firefox ONPASTE: Get the text to be pasted?

2011-02-03 Thread mike b
On second thought...

Change this line - this.setValue(newValue, true);

To this --  ValueChangeEvent.fireIfNotEqual(this, this.getValue(), 
newValue);


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



celltable BeforeSelectionEvent?

2011-02-03 Thread Mike Wyszinski
i am implementing a screen with  a CellTable  detail form. I want to
be able to intercept selection change events AND CANCEL THEM, if the
user has made unsaved changes in the detail form.

Is there any way to do this with the cell table?

Thanks
Mike

-- 
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: DecoratedTabPanel setWidth and setHeight not working as expected

2011-02-03 Thread cvh
Using GWT2.1.1, I had some limited success setting the height of the
DecoratedTabPanel by including this in my CSS file:

.gwt-TabPanelBottom {
height: 10%;
}

see the Javadoc for DecoratedTabPanel which indicates that two CSS
style rules are used:

.gwt-DecoratedTabPanel { the tab panel itself }
.gwt-TabPanelBottom { the bottom section of the tab panel (the
deck containing the widget) }


On Jan 2, 12:38 pm, Leung leung1_2...@yahoo.com wrote:
 Hi,

 I am trying to put a VerticalPanel inside aDecoratedTabPanel. I would like 
 the width and height of theDecoratedTabPanelfixed, no matter the length of 
 the strings inside the VerticalPanel. Then, I use setWidth andsetHeightfor 
 bothDecoratedTabPaneland VerticalPanel. However, the dimensions of 
 theDecoratedTabPaneldo not change to the specified size.
 How to fix it?

 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-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 can i implement Focusable (and HasAllKeyHandlers) on a TabLayoutPanel?

2011-02-03 Thread k.balaji9940759583 k.bala
K

On Thu, Feb 3, 2011 at 9:39 PM, Jeff Larsen larse...@gmail.com wrote:

 public class MyTabLayoutPanel extends TabLayoutPanel implements Focusable,
 HasAllKeyboardHandlers{


 -- In your constructor add --

 sinkEvents(Event.FOCUS | EVENT.KEYEVENTS);

 }

 and that *Should work.

 also, you probably want to add the layout panel to RootLayoutPanel, not
 RootPanel.

 --
 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.comgoogle-web-toolkit%2bunsubscr...@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.



History.replaceItem?

2011-02-03 Thread Jason
Before I start, I'm working with GWT 2.1.1

In the example below the user goes to a list, pages through results,
views a record and then clicks Back.  Everything works as expected,
the user is viewing page 4, clicks a row and views the record, clicks
Back and they land on page 4.  But if they click Back again, it goes
to page 3, then page 2, etc.

1. User is on the home page - History.newItem( HOME, true )
2. User selects list of records page - History.newItem( LIST, true )
3. User pages through results page (using CellTable) -
History.newItem( LIST#page2, false )
4. User pages through results page - History.newItem( LIST#page3,
false )
5. User pages through results page - History.newItem( LIST#page4,
false )
6. User selects record to view - History.newItem( VIEW#record123,
true )
7. User clicks Back, token is replaced with LIST#page4
8. User clicks Back, token is replaced with LIST#page3
9. User clicks Back, token is replaced with LIST#page2
10. User clicks Back, token is replaced with LIST

What I'd prefer to see is that when the press back from the record
page, it goes to the list page they were viewing and if they click
back again, it moves back to the home page.  So far I've worked around
this by adding a 'Close' button to the list page that is moves them to
the home page directly.

This would be easy if I could call 'replaceItem( TOKEN, false )'
instead of 'newItem( TOKEN, false )' in steps 2 through 5 above.  This
call would replace the current URL in the browser, and rewrite the
last entry in the history stack with the new entry.

Anyone else have this issue?



-- 
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 get id of the new inserted row, issued by RequestFactory persist()

2011-02-03 Thread Dominik Mayer
Does anyone have answers to these questions? What I'm doing is
listening for an EntityProxyChange PERSIST. But that only has the
ProxyId so I have to do a

request.find(proxyId).fire()

in order to get the task. The problem is: This causes an
EntityProxyChange UPDATE which again only has the ProxyId. So I have
to do another

request.find(proxyId).fire()

This time with a Receiver that handles the task. I can't provide a
Receiver to the first request, because that would trigger the action
twice.


On Dec 9 2010, 9:32 am, haimke haim.schind...@gmail.com wrote:
 I am using RequestFactory.

 I create new instance of a proxy:

         EmployeeProxy newEmployee =
 request.create(EmployeeProxy.class);

 Then I do persist:

         request.persist().using(newEmployee).fire()

 * How do I get the DATABASE new created ID of newEmployee ?

 * How do I read newEmployee properties that the server set while
 persisting ?

        for example:    String createdDate =
 newEmployee.getCreatedDate();

 ?

-- 
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: Gin, SingleInstanceProvider?

2011-02-03 Thread zixzigma
I am not sure if this helps,
but there is a feature called Binding Annotations,
you can use BindingAnnotation to differentiate the Provider used in Class A,
from the one used in Class B.

http://code.google.com/p/google-guice/wiki/BindingAnnotations

-- 
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: History.replaceItem?

2011-02-03 Thread Ben Imp
I have a possible alternative suggestion - instead of messing with the
browser's history function, simply don't use the history tokens for
navigating through the results list.  Then your back button will work
as you will want it to.

I do this in my application, and it seems to work quite well.

-Ben

On Feb 3, 12:23 pm, Jason jason.siem...@namsys.com wrote:
 Before I start, I'm working with GWT 2.1.1

 In the example below the user goes to a list, pages through results,
 views a record and then clicks Back.  Everything works as expected,
 the user is viewing page 4, clicks a row and views the record, clicks
 Back and they land on page 4.  But if they click Back again, it goes
 to page 3, then page 2, etc.

 1. User is on the home page - History.newItem( HOME, true )
 2. User selects list of records page - History.newItem( LIST, true )
 3. User pages through results page (using CellTable) -
 History.newItem( LIST#page2, false )
 4. User pages through results page - History.newItem( LIST#page3,
 false )
 5. User pages through results page - History.newItem( LIST#page4,
 false )
 6. User selects record to view - History.newItem( VIEW#record123,
 true )
 7. User clicks Back, token is replaced with LIST#page4
 8. User clicks Back, token is replaced with LIST#page3
 9. User clicks Back, token is replaced with LIST#page2
 10. User clicks Back, token is replaced with LIST

 What I'd prefer to see is that when the press back from the record
 page, it goes to the list page they were viewing and if they click
 back again, it moves back to the home page.  So far I've worked around
 this by adding a 'Close' button to the list page that is moves them to
 the home page directly.

 This would be easy if I could call 'replaceItem( TOKEN, false )'
 instead of 'newItem( TOKEN, false )' in steps 2 through 5 above.  This
 call would replace the current URL in the browser, and rewrite the
 last entry in the history stack with the new entry.

 Anyone else have this issue?

-- 
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 CellTable: very confused about T and C in ColumnT,C and HasCellT,C

2011-02-03 Thread zixzigma
Thank You for very clear explanation,
I understand it now : )

-- 
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: Collection of entities RequestFactory

2011-02-03 Thread Vasily
Confirmed. Should use
requestFactory.contactRequest().findAllContacts().with(tags).fire(...);
SOLVED.

Thx!

On Feb 3, 6:33 pm, Vasily vasiliy.ru...@gmail.com wrote:
 No,... probably that's the case... Thx

 On Feb 3, 5:55 pm, Y2i yur...@gmail.com wrote:

  Are you using 
  with(tags)?http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.h...

-- 
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 on using JSNI from within a GWTTestCase

2011-02-03 Thread Christopher
My bad - my JSON was incorrectly formatted by the servlet. I hope that the 
code I provided might be useful in illustrating a method of making JSON 
requests and be useful to someone anyhow.

-- 
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: Gin, SingleInstanceProvider?

2011-02-03 Thread Gal Dolber
Thanks

On Thu, Feb 3, 2011 at 7:02 PM, zixzigma zixzi...@gmail.com wrote:

 I am not sure if this helps,
 but there is a feature called Binding Annotations,
 you can use BindingAnnotation to differentiate the Provider used in Class
 A,
 from the one used in Class B.

 http://code.google.com/p/google-guice/wiki/BindingAnnotations

  --
 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
Guit: Elegant, beautiful, modular and *production ready* gwt applications.

http://code.google.com/p/guit/

-- 
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: Setting first column width CSS in CellBrowser via DOM API

2011-02-03 Thread sevendays
This worked. Thank you John.

-- 
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: First column in CellBrowser - width not working

2011-02-03 Thread sevendays
See https://groups.google.com/d/topic/google-web-toolkit/T8ObWAWDPqI/discussion 
for a workaround.

-- 
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: Working with collection of entities in requestFactory

2011-02-03 Thread FrugoFrog
do you see the persistent elements in DB?  Can you see the elements if
you change  FetchType.LAZY to EAGER?


2011/2/2 JB jbthe...@gmail.com:
 Hi,

 I'm having troubles in using collection (list) of entities with
 requestFactory.

 The persistence of the whole graph is OK, but whenever I try to
 retrieve it, it shows no embedded element.

 There is obviously something wrong in my code, but I cannot figure
 out...
 I couldn't find any clear explanation nor a workaround.

 Here is my code:

 ---

 //class declaration
 public class Container{

        @OneToMany(fetch = FetchType.LAZY)
        private ListElement elements;
 }
 (getter/setters automatically generated with Roo)


 //creation
 ContainerRequest context = requestFactory.containerRequest();
 elementProxy element = context.create(ElementProxy.class);
 ContainerProxy container = context.create(ContainerProxy.class);

 ListElementProxy list = new ArrayListElementProxy();
 list.add(element);
 container.setId(foo);
 container.setElements(list);
 context.persist().using(container).fire();
 //so far, so good I got an Element created, and a container

 //retrieval
 ContainerRequest requestGetContainer =
 requestFactory.containerRequest();
 RequestContainerProxy getcontainer =
 requestGetContainer.findContainer(foo).with(elements);
 ReceiverContainerProxy callback = new ReceiverContainerProxy(){
        public void onSuccess(ContainerProxy result) {
                System.out.println(nb elements:  +
 result.getElements().size());
 }};
 callback.fire();

 ---
 as a result, the list of elements is empty

 Any help/tip welcomed on that.





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



@UiHandler and method scope

2011-02-03 Thread Christopher
Hi there,

I've noticed in the examples that @UiHandler annotated methods are declared 
with no scope - so I'm assuming that its regular practice to rely on 
protected scope. Is this correct?

Kind regards,
Christopher

-- 
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: @UiHandler and method scope

2011-02-03 Thread Hilco Wijbenga
On 3 February 2011 16:05, Christopher hunt...@gmail.com wrote:
 I've noticed in the examples that @UiHandler annotated methods are declared
 with no scope - so I'm assuming that its regular practice to rely on
 protected scope. Is this correct?

You mean package private scope? The UiHandler methods may not be
private. I usually just make them public as I consider them to be part
of the page's/widgets API.

-- 
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: @UiHandler and method scope

2011-02-03 Thread Christopher
Thanks. I'll declare them explicitly as protected (package private).

Kind regards,
Christopher

-- 
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: @UiHandler and method scope

2011-02-03 Thread Hilco Wijbenga
On 3 February 2011 18:12, Christopher hunt...@gmail.com wrote:
 Thanks. I'll declare them explicitly as protected (package private).

Just to be clear: protected != package private. Making your UiHandlers
protected will work fine, though.

-- 
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: @UiHandler and method scope

2011-02-03 Thread Christopher
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-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: Separate Widgets CSS+JS

2011-02-03 Thread Hilco Wijbenga
On 2 February 2011 16:17, Thomas Broyer t.bro...@gmail.com wrote:
 You can automate it by writing a linker that concatenates the CSS files into
 a single one (same for JS ?) and emit a new artifact for the all-in-one
 file.
 There's no built-in solution for that, because the script and stylesheet
 elements in gwt.xml files take URLs, not file paths; the URL can then just
 happen to match a file that's in a public path, but there's no relation
 between those apart from naming convention.

 ...but you could also use ClientBundle to have the CSS inlined in the
 compiled output (and make your widget take an instance of the bundle as
 constructor argument so you can easily override the default style; which in
 ClientBundle's world means the old, default CSS can be completely left out
 of the compiled output).

Excellent.

I've run into another issue, however. I'm now also including an image
in the widget JAR. The image is at org.example.public and I can access
it (in MyWidget's UiBinder) as src=MyWidget/my-image.png. However,
once I reuse the widget in another widget (say, OtherWidget) the image
is only found if I use OtherWidget/my-image.png.

I'm guessing there's a better way to do 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-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.



How to implement Expandable-Collapsible Rows in CellTable ?

2011-02-03 Thread zixzigma
Hello Everyone,
Could you please provide some tips on how to implement Collapsible Rows in 
CellTable ?

for example, clicking on a Row, result in Row to be expanded, and display 
some custom widget in it.

so far, I was able to put a custom widget (label, button, text box) within 
the cell,
this works fine. I then wanted to show/hide this widget, as user clicked on 
the cell.

my custom cell handles click event, and adds/removes css style 
(display:none), as a result I can show/hide my custom widget,
but the problem is, since I am handling click event, when the user wants to 
do
something meaningful with the widget inside the row, the row is closed,
(for example entering something inside the textbox, causes the row to close 
(hide/collapse))
I used event.preventDefault(), to stop the click event from firing once the 
row is expanded (preventing it from hiding, so that user can enter text into 
textbox),
but cannot reverse it (remove it so that it can be closed).

 anyways I tried many many unconventional solutions, including putting a 
basic Tree and StackPanel inside a Custom Cell !
none of them worked  : (

I know that I am not doing things the right way,
do you have any tips on how to implement this feature ? 
Expandable/Collapsible Rows inside a CellTable ?

do you think this feature will be added in later releases of GWT ?

Thank You

-- 
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 get id of the new inserted row, issued by RequestFactory persist()

2011-02-03 Thread Dominik Mayer
I found the answer here 
http://groups.google.com/group/google-web-toolkit/msg/fa25840137b26e72:

   InstanceRequestEmployeeProxy, EmployeeProxy persist();
 instead of
   InstanceRequestEmployeeProxy, Void persist();

But I'm still not sure I get the concept. If I use this way I can
access the persisted object in the onSuccess(...) method. But
EntityProxyChange UPDATE will fire *before* the Receiver gets the
result from the server.

I want to put the received task in a list and update a CellList. The
perfect way would be to put an add(Object) method in the Receiver and
some kind of setData() in EntityProxyChange UPDATE. But that won't
work because the data would be set *before* the persisted object has
been put in the list.

Its also not possible to move add(Object) to EntityProxyChange UPDATE
because you only have the ProxyId in there and would have to make
another request to the server in order to get the populated object.



On Feb 3, 10:32 pm, Dominik Mayer dominik.ma...@gmail.com wrote:
 Does anyone have answers to these questions? What I'm doing is
 listening for an EntityProxyChange PERSIST. But that only has the
 ProxyId so I have to do a

 request.find(proxyId).fire()

 in order to get the task. The problem is: This causes an
 EntityProxyChange UPDATE which again only has the ProxyId. So I have
 to do another

 request.find(proxyId).fire()

 This time with a Receiver that handles the task. I can't provide a
 Receiver to the first request, because that would trigger the action
 twice.

-- 
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: local script variables in nocache.js

2011-02-03 Thread Colin Alworth
In your *.nocache.js content, you say you will have 'this.resourceUrl = 
content-replaced-by-velocity;' – what is 'this' in this context? If it is 
the shared window that all the portlets use, they will each overwrite the 
resourceUrl property. If each portlet will use a different module, you could 
use modulename to set and access this data. This could look something like
window.MyModuleName.resourceUrl = $resourceUrl
and then access it in your native method with
return $wnd[@com.google.gwt.core.client.GWT::getModuleName()()].resourceUrl;


If I have misunderstood and each portlet is in its own iframe, then your 
native call just needs to say 'return $wnd.resourceUrl;' to correctly 
reference the window object that the resourceUrl was set in.

Hope this helps,
Colin

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



What is the correct way for CellTable cells to communicate ?

2011-02-03 Thread zixzigma
I have a CellTable.

when an event occurs in Cell A,
I would like to take action and modify Cell B.
(user clicks on Cell A, I would like to modify Cell B, in the same row to 
keep things simple)

could you please provide some pointers on how this can be correctly 
implemented ?

do you think we need to use DOM events or GWTEvents,
and do you think it has to be handled at Cell level, or Table level ?

any ideas are really appreciated.

Thank You

-- 
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: CellList with ListDataProvider does not get redrawn on data change

2011-02-03 Thread Peter Ondruska
Hi, I have exactly the same problem.. Either I misunderstood
documentation or something is broken, still trying to find the way..

On Feb 2, 6:51 pm, Daniel Francisco melkor...@gmail.com wrote:
 Hi.

 I'm working on a project with GWT 2.1 and mvp4g. In a view, I'm using
 a CellList backed with a ListDataProvider. If I pass a List with data
 when instantiating the ListDataProvider, the CellList shows this data.
 The problem is that afterthat, the CellList never gets redrawn
 whenever I change the list of ListDataProvider. I don't know what I am
 doing wrong or if I missing something. I have looked into the
 documentation and but I can't find anything.

 Here is the code:

 The UIBinder xml file:

 !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent;
 ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder
         xmlns:g=urn:import:com.google.gwt.user.client.ui
         xmlns:c=urn:import:com.google.gwt.user.cellview.client

 xmlns:v=urn:import:net.universia.ferias.feriavirtual.backend.client.exhibi 
 tors.view
         ui:style
                 .leftPanel {
                         padding: 15px 25px 15px 25px;
                 }
                 .rightPanel {
                         padding: 15px 25px 15px 25px;
                 }
                 .button {
                         margin-right: 8px;
                 }
                 .exhibitorList {
                         border: 1px solid black;
                         background-color: #EEE;
                         width: 250px;
                         height: 600px;
                 }
                 .moduleList {
                 }
         /ui:style

         g:DockLayoutPanel unit=PX
                 g:west size=300
                         g:VerticalPanel styleName='{style.leftPanel}' 
 spacing=8
                                 g:LabelExpositores/g:Label
                                         g:ScrollPanel 
 addStyleNames='{style.exhibitorList}'
 width=250px height=600px
                                                 c:CellList 
 ui:field=exhibitorList /
                                         /g:ScrollPanel
                                 g:Button ui:field=editExhibitorButton
 addStyleNames='{style.button}'Editar/g:Button
                         /g:VerticalPanel
                 /g:west
                 g:center
                         g:VerticalPanel styleName='{style.rightPanel}' 
 spacing=8
                                 g:LabelExpositor X/g:Label
                                 g:FlowPanel
                                         g:Button 
 addStyleNames='{style.button}'Nuevo módulo/g:Button
                                         g:Button 
 addStyleNames='{style.button}' enabled=falseEditar
 módulo/g:Button
                                         g:Button 
 addStyleNames='{style.button}' enabled=falseEliminar
 módulo/g:Button
                                 /g:FlowPanel
                         /g:VerticalPanel
                 /g:center
         /g:DockLayoutPanel

 /ui:UiBinder

 The View class:

 public class ExhibitorsAdminView extends Composite implements
                 ExhibitorsAdminPresenter.IExhibitorsAdminView {

         interface Binder extends UiBinderWidget, ExhibitorsAdminView {}

         private static final Binder binder = GWT.create( Binder.class );

         private static class ExhibitorCell extends AbstractCellExhibitor {
                 @Override
                 public void render(Cell.Context context, Exhibitor exhibitor,
                                 SafeHtmlBuilder sb) {
                         if (exhibitor != null) {
                                 sb.appendEscaped(exhibitor.getName());
                         }
                 }
         }

         private ListDataProviderExhibitor exhibitorsDataProvider;

         private SingleSelectionModelExhibitor exhibitorsSelectionModel;

         @UiField( provided = true )
         CellListExhibitor exhibitorList;

         @UiField
         Button editExhibitorButton;

 //      @UiField(provided = true)
 //      CellTableObject moduleList = new CellTableObject();

         public ExhibitorsAdminView() {
                 exhibitorsSelectionModel = new
 SingleSelectionModelExhibitor(Exhibitor.KEY_PROVIDER);
                 exhibitorList = new CellListExhibitor(new ExhibitorCell(),
 Exhibitor.KEY_PROVIDER);
                 exhibitorList.setSelectionModel(exhibitorsSelectionModel);

                 exhibitorsDataProvider = new
 ListDataProviderExhibitor(getExhibitors());
                 exhibitorsDataProvider.addDataDisplay(exhibitorList);
                 
 exhibitorList.setPageSize(exhibitorsDataProvider.getList().size());

                 initWidget( binder.createAndBindUi( this ) );
         }

         public SingleSelectionModelExhibitor getExhibitorsSelectionModel()
 {
                 return exhibitorsSelectionModel;
         }

         public ListDataProviderExhibitor getExhibitorsDataProvider() {
              

How to create DOM Element or Node from SafeHtml

2011-02-03 Thread zixzigma
GWT has Element and Node class which are wrappers for low level DOM 
elements/nodes.

do you know How I can convert SafeHtml to Element or Node ?

for example using the code below, I create a SafeHtml.

SafeHtml html = 
SafeHtmlUtils.fromSafeConstant(trtdXXX/tdtdYYY/td/tr);

but I could not find a way to create a Node or Element from this SafeHtml.
I could manipulate existing Node/Elements but not create one.

I want to add a new row to an existing table using Element/Node class.
therefore I need to create a new row, not manipulate an existing row.

do you have any idea how this can be possible ?

Thank You

-- 
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: Bind form values when sending to server

2011-02-03 Thread $ a r j i t h Pullithodi
Thanks buddy... donno this gonna work in my scenario, but had decided to
give it a try.

Thanks a lot.

please do share if anyone has a better idea or any alternative for this, so
that we don't miss anything.

Thanks once again...!!

--
Sarjith



On Thu, Feb 3, 2011 at 2:42 PM, Thomas Broyer t.bro...@gmail.com wrote:

 Yes: the Editor framework!

 See:
 http://code.google.com/webtoolkit/doc/latest/DevGuideUiEditors.html
 http://tbroyer.posterous.com/gwt-21-editors

 Don't miss the before / after sample: https://gist.github.com/780560

 --
 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.comgoogle-web-toolkit%2bunsubscr...@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: How to create DOM Element or Node from SafeHtml

2011-02-03 Thread Ryan Mehregan
One solution is to clone an already existing node and then manipulating it.

1- clone an already existing node
eg. Node node = parent.cloneNode(false)

2- cast this Node to Element
eg. Element element = Element.as(node)

3- manipulate this element
eg. element.setInnerHTML(html.asString) // using the SafeHtml you provided 
in your post

Ryan

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



[gwt-contrib] Re: Decouple JsProgram; this allows the JS AST to serialize in pieces. (issue1342801)

2011-02-03 Thread cromwellian


One thing I'll mention out of band, is that the changes that switch from
singletons created by JsProgram to instances seem to remove all of the
addCorrelator stuff. Honestly, I don't know what that stuff is used
for (SOYC?) but I wonder what the impact of removing it is.



http://gwt-code-reviews.appspot.com/1342801/diff/1/6
File dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
(left):

http://gwt-code-reviews.appspot.com/1342801/diff/1/6#oldcode1596
dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java:1596:
JsName entryName = topScope.findExistingName($entry);
this is a change in semantics. In JsRootName, it forces identifiers to
be not-obfuscatable (sensible, since most of them aren't, except for the
GWT derived ones), but the patch forces $entry to be treated the same as
alert or getElementById.

http://gwt-code-reviews.appspot.com/1342801/diff/1/8
File dev/core/src/com/google/gwt/dev/js/JsInliner.java (right):

http://gwt-code-reviews.appspot.com/1342801/diff/1/8#newcode610
dev/core/src/com/google/gwt/dev/js/JsInliner.java:610: */
If this is intentional, it seems like JsCatchScope should be renamed
then, as it seems somewhat bizarre when reading it.

http://gwt-code-reviews.appspot.com/1342801/diff/1/14
File dev/core/src/com/google/gwt/dev/js/JsSymbolResolver.java (right):

http://gwt-code-reviews.appspot.com/1342801/diff/1/14#newcode40
dev/core/src/com/google/gwt/dev/js/JsSymbolResolver.java:40: name =
program.getScope().declareName(ident);
I'm curious why the scope changed from root to top?

http://gwt-code-reviews.appspot.com/1342801/diff/1/26
File dev/core/src/com/google/gwt/dev/js/ast/JsRootName.java (right):

http://gwt-code-reviews.appspot.com/1342801/diff/1/26#newcode43
dev/core/src/com/google/gwt/dev/js/ast/JsRootName.java:43: public void
setObfuscatable(boolean isObfuscatable) {
Untrue, root names are not obfuscatable, but GWT derived ones (e.g.
$entry) may be. Stuff like addEventListener isn't.

http://gwt-code-reviews.appspot.com/1342801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Quick patch, in follow up to r9344, which replaces remaining uses of the legacy 'compiler.emulat... (issue1338804)

2011-02-03 Thread fredsa

Reviewers: robertvawter,

Description:
Quick patch, in follow up to r9344, which replaces remaining uses of the
legacy 'compiler.emulatedStack' property,
with the corresponding 'compiler.stackMode'.

Fixes issues: 5692


Please review this at http://gwt-code-reviews.appspot.com/1338804/show

Affected files:
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/DynaTableRf.gwt.xml

  M user/src/com/google/gwt/benchmarks/Benchmarks.gwt.xml
  M user/src/com/google/gwt/junit/JUnit.gwt.xml
  M user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java


Index:  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/DynaTableRf.gwt.xml

===
---  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/DynaTableRf.gwt.xml	 
(revision 9666)
+++  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/DynaTableRf.gwt.xml	 
(working copy)

@@ -32,7 +32,7 @@
   set-property name=gwt.logging.simpleRemoteHandler value=DISABLED /

   !-- Uncomment if you are enabling server side deobfuscation of  
StackTraces

-  set-property name=compiler.emulatedStack value=true /
+  set-property name=compiler.stackMode value=emulated /
   set-configuration-property  
name=compiler.emulatedStack.recordLineNumbers value=true /
   set-configuration-property  
name=compiler.emulatedStack.recordFileNames value=true /

   --
Index: user/src/com/google/gwt/benchmarks/Benchmarks.gwt.xml
===
--- user/src/com/google/gwt/benchmarks/Benchmarks.gwt.xml   (revision 9666)
+++ user/src/com/google/gwt/benchmarks/Benchmarks.gwt.xml   (working copy)
@@ -26,7 +26,7 @@

   !-- We do not want stack traces. --
   set-configuration-property  
name=compiler.emulatedStack.recordFileNames value=false /

-  set-property name=compiler.emulatedStack value=false /
+  set-property name=compiler.stackMode value=native /

   generate-with  
class=com.google.gwt.benchmarks.rebind.BenchmarkGenerator
 when-type-assignable  
class=com.google.gwt.benchmarks.client.Benchmark/

Index: user/src/com/google/gwt/junit/JUnit.gwt.xml
===
--- user/src/com/google/gwt/junit/JUnit.gwt.xml (revision 9666)
+++ user/src/com/google/gwt/junit/JUnit.gwt.xml (working copy)
@@ -33,7 +33,7 @@

   !-- We want to provide consistent stack traces across all browsers. --
   set-configuration-property  
name=compiler.emulatedStack.recordFileNames value=true /

-  set-property name=compiler.emulatedStack value=true /
+  set-property name=compiler.stackMode value=emulated /

   !-- Override the regular symbolMaps linker to put the data somewhere we  
can find it --
   define-linker name=symbolMaps  
class=com.google.gwt.junit.linker.JUnitSymbolMapsLinker /

Index: user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java
===
--- user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java	 
(revision 9666)
+++ user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java	 
(working copy)

@@ -31,7 +31,7 @@
 /**
  * Deobfuscates stack traces on the server side. This class requires that  
you

  * have turned on emulated stack traces, via
- * codelt;set-property name=compiler.emulatedStack value=true  
/gt;/code
+ * codelt;set-property name=compiler.stackMode value=emulated  
/gt;/code
  * in your code.gwt.xml/code module file, and moved your symbol map  
files to
  * a location accessible by your server sever side code. You can use the  
GWT
  * compiler code-deploy/code command line argument to specify the  
location



--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Only intern strings on non-IE browsers when they occur 2 or more times. (issue1336802)

2011-02-03 Thread jbrosenberg


http://gwt-code-reviews.appspot.com/1336802/diff/1/4
File dev/core/src/com/google/gwt/dev/js/JsStringInterner.java (right):

http://gwt-code-reviews.appspot.com/1336802/diff/1/4#newcode48
dev/core/src/com/google/gwt/dev/js/JsStringInterner.java:48: /**
Should this comment be changed, to indicate that it can conditionally
intern strings, based on occurrence count etc.?

http://gwt-code-reviews.appspot.com/1336802/diff/1/4#newcode93
dev/core/src/com/google/gwt/dev/js/JsStringInterner.java:93: /**
Keep comment within 80 chars?  Here and elsewhere...

http://gwt-code-reviews.appspot.com/1336802/diff/1/4#newcode102
dev/core/src/com/google/gwt/dev/js/JsStringInterner.java:102: /**
Is this the right comment here?

http://gwt-code-reviews.appspot.com/1336802/diff/1/4#newcode232
dev/core/src/com/google/gwt/dev/js/JsStringInterner.java:232: Integer
occurences = occurenceMap.get(x.getValue());
Should the number '2' be a configurable number, instead of hard-coded
here?  What's special about 2?

http://gwt-code-reviews.appspot.com/1336802/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9668 committed - Adds option to override JsInliner's max complexity ratio heuristic wit...

2011-02-03 Thread codesite-noreply

Revision: 9668
Author: cromwell...@google.com
Date: Wed Feb  2 13:53:09 2011
Log: Adds option to override JsInliner's max complexity ratio heuristic  
with JVM property 'gwt.jsinlinerratio'. The default is 5.0, smaller values  
tend to reduce code size. Empirically, 1.2 seems to be a good value.


Review at http://gwt-code-reviews.appspot.com/1341802

Review by: sco...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=9668

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/js/JsInliner.java

===
--- /trunk/dev/core/src/com/google/gwt/dev/js/JsInliner.java	Wed Feb  2  
13:13:58 2011
+++ /trunk/dev/core/src/com/google/gwt/dev/js/JsInliner.java	Wed Feb  2  
13:53:09 2011

@@ -1618,7 +1618,8 @@
* the generated output. Increasing this number will allow larger  
sections of

* code to be inlined, but at a cost of larger JS output.
*/
-  private static final int MAX_COMPLEXITY_INCREASE = 5;
+  private static final double MAX_COMPLEXITY_INCREASE =
+  Double.parseDouble(System.getProperty(gwt.jsinlinerRatio, 5.0));

   /**
* Static entry point used by JavaToJavaScriptCompiler.

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Decouple JsProgram; this allows the JS AST to serialize in pieces. (issue1342801)

2011-02-03 Thread scottb

@zundel: if we did want flyweight literals, we could always manage them
at class level for the whole process rather than at the JsProgram level,
like Integer.valueOf() works.

@cromwellian: I'm not sure to what degree the source info correlations
are useful and important.  I guess my plan was to chip away at this and
see if anyone pushes back.  It's easy enough to re-add if people scream.


http://gwt-code-reviews.appspot.com/1342801/diff/1/6
File dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
(left):

http://gwt-code-reviews.appspot.com/1342801/diff/1/6#oldcode1596
dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java:1596:
JsName entryName = topScope.findExistingName($entry);
Good point... ok, I think what I need to do here then is explicitly
declare $entry to be in the topScope, and remove it from the root
scope entirely.

Done.

http://gwt-code-reviews.appspot.com/1342801/diff/1/8
File dev/core/src/com/google/gwt/dev/js/JsInliner.java (right):

http://gwt-code-reviews.appspot.com/1342801/diff/1/8#newcode610
dev/core/src/com/google/gwt/dev/js/JsInliner.java:610: */
I'm just abusing JsCatchScope as a convenient, lightweight way to get a
dummy name I can use... the only other options were to create a new
scope type, or else make the JsName constructor public.  How offensive
is this?

http://gwt-code-reviews.appspot.com/1342801/diff/1/14
File dev/core/src/com/google/gwt/dev/js/JsSymbolResolver.java (right):

http://gwt-code-reviews.appspot.com/1342801/diff/1/14#newcode40
dev/core/src/com/google/gwt/dev/js/JsSymbolResolver.java:40: name =
program.getScope().declareName(ident);
Because the root scope is now immutable, and you're not allowed to write
into it.  It represents, essentially, browser built-ins.  The top
program scope represents your program.  It doesn't make a functional
difference where these unresolved names live, because they're... well..
unresolved and assumed to be external references.

http://gwt-code-reviews.appspot.com/1342801/diff/1/21
File dev/core/src/com/google/gwt/dev/js/ast/JsNestingScope.java (right):

http://gwt-code-reviews.appspot.com/1342801/diff/1/21#newcode2
dev/core/src/com/google/gwt/dev/js/ast/JsNestingScope.java:2: *
Copyright 2008 Google Inc.
On 2011/02/03 14:40:57, zundel wrote:

2011


Done.

http://gwt-code-reviews.appspot.com/1342801/diff/1/22
File dev/core/src/com/google/gwt/dev/js/ast/JsNormalScope.java (right):

http://gwt-code-reviews.appspot.com/1342801/diff/1/22#newcode2
dev/core/src/com/google/gwt/dev/js/ast/JsNormalScope.java:2: * Copyright
2008 Google Inc.
On 2011/02/03 14:40:57, zundel wrote:

2011


Done.

http://gwt-code-reviews.appspot.com/1342801/diff/1/26
File dev/core/src/com/google/gwt/dev/js/ast/JsRootName.java (right):

http://gwt-code-reviews.appspot.com/1342801/diff/1/26#newcode43
dev/core/src/com/google/gwt/dev/js/ast/JsRootName.java:43: public void
setObfuscatable(boolean isObfuscatable) {
I'm removing $entry from the root scope, so that all root names are
immutable and non-obfuscatable.

http://gwt-code-reviews.appspot.com/1342801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9669 committed - Consider the interactive state to be complete since it can happen af...

2011-02-03 Thread codesite-noreply

Revision: 9669
Author: unn...@google.com
Date: Thu Feb  3 09:45:03 2011
Log: Consider the interactive state to be complete since it can happen  
after the loaded state (which we already consider complete).


Review by: j...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=9669

Modified:
 /trunk/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js

===
---  
/trunk/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js	 
Tue Nov 16 10:12:46 2010
+++  
/trunk/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js	 
Thu Feb  3 09:45:03 2011

@@ -29,7 +29,7 @@
   // the body element exists.
   return (typeof $doc.body != undefined  $doc.body != null);
 }
-return (/loaded|complete/.test($doc.readyState));
+return (/loaded|interactive|complete/.test($doc.readyState));
   }

   function isHostedMode() {

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9670 committed - Fix CompilationStateBuilder's speed tracer logs....

2011-02-03 Thread codesite-noreply

Revision: 9670
Author: gwt.mirror...@gmail.com
Date: Thu Feb  3 12:54:42 2011
Log: Fix CompilationStateBuilder's speed tracer logs.

Currently, CompilationStateBuilder produces a tree like:

Process
- Process

Where the top node has almost no time in it at all, and serves no purpose.   
This

jiggles things so you get a trace more like:

Process
- JdtCompile
- Process (many, smaller ones)

http://gwt-code-reviews.appspot.com/1338803/show

Review by: zun...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=9670

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java

===
---  
/trunk/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java	 
Fri Jan 28 10:48:44 2011
+++  
/trunk/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java	 
Thu Feb  3 12:54:42 2011

@@ -62,67 +62,72 @@

   public void process(CompilationUnitBuilder builder,
   CompilationUnitDeclaration cud, ListCompiledClass  
compiledClasses) {
-MapMethodDeclaration, JsniMethod jsniMethods =  
JsniCollector.collectJsniMethods(

-cud, builder.getSource(), jsProgram);
-
-JSORestrictionsChecker.check(jsoState, cud);
-
-// JSNI check + collect dependencies.
-final SetString jsniDeps = new HashSetString();
-MapString, Binding jsniRefs = new HashMapString, Binding();
-JsniChecker.check(cud, jsoState, jsniMethods, jsniRefs,
-new JsniChecker.TypeResolver() {
-  public ReferenceBinding resolveType(String typeName) {
-ReferenceBinding resolveType =  
compiler.resolveType(typeName);

-if (resolveType != null) {
-   
jsniDeps.add(String.valueOf(resolveType.qualifiedSourceName()));

-}
-return resolveType;
-  }
-});
-
-ArtificialRescueChecker.check(cud, builder.isGenerated());
-BinaryTypeReferenceRestrictionsChecker.check(cud);
-
-MethodArgNamesLookup methodArgs =  
MethodParamCollector.collect(cud);

-
-StringInterner interner = StringInterner.get();
-String packageName =  
interner.intern(Shared.getPackageName(builder.getTypeName()));

-ListString unresolvedQualified = new ArrayListString();
-ListString unresolvedSimple = new ArrayListString();
-for (char[] simpleRef :  
cud.compilationResult().simpleNameReferences) {

-  unresolvedSimple.add(interner.intern(String.valueOf(simpleRef)));
-}
-for (char[][] qualifiedRef :  
cud.compilationResult().qualifiedReferences) {
-   
unresolvedQualified.add(interner.intern(CharOperation.toString(qualifiedRef)));

-}
-for (String jsniDep : jsniDeps) {
-  unresolvedQualified.add(interner.intern(jsniDep));
-}
-ArrayListString apiRefs = compiler.collectApiRefs(cud);
-for (int i = 0; i  apiRefs.size(); ++i) {
-  apiRefs.set(i, interner.intern(apiRefs.get(i)));
-}
-Dependencies dependencies = new Dependencies(packageName,
-unresolvedQualified, unresolvedSimple, apiRefs);
-
-CompilationUnit unit = builder.build(compiledClasses, dependencies,
-jsniMethods.values(), methodArgs,
-cud.compilationResult().getProblems());
-addValidUnit(unit);
-// Cache the valid unit for future compiles.
-ContentId contentId = builder.getContentId();
-unitCache.put(contentId, unit);
-if (builder instanceof ResourceCompilationUnitBuilder) {
-  ResourceCompilationUnitBuilder rcub =  
(ResourceCompilationUnitBuilder) builder;

-  ResourceTag resourceTag = new ResourceTag(rcub.getLastModifed(),
-  contentId);
-  resourceContentCache.put(builder.getLocation(), resourceTag);
-  keepAliveLatestVersion.put(resourceTag, unit);
-} else if (builder instanceof GeneratedCompilationUnitBuilder) {
-  keepAliveRecentlyGenerated.put(unit.getTypeName(), unit);
-}
-newlyBuiltUnits.add(unit);
+Event compilationStateBuilderProcess =  
SpeedTracerLogger.start(DevModeEventType.COMPILATION_STATE_BUILDER_PROCESS);

+try {
+  MapMethodDeclaration, JsniMethod jsniMethods =  
JsniCollector.collectJsniMethods(

+  cud, builder.getSource(), jsProgram);
+
+  JSORestrictionsChecker.check(jsoState, cud);
+
+  // JSNI check + collect dependencies.
+  final SetString jsniDeps = new HashSetString();
+  MapString, Binding jsniRefs = new HashMapString, Binding();
+  JsniChecker.check(cud, jsoState, jsniMethods, jsniRefs,
+  new JsniChecker.TypeResolver() {
+public ReferenceBinding resolveType(String typeName) {
+  ReferenceBinding resolveType =  
compiler.resolveType(typeName);

+  if (resolveType != null) {
+   

[gwt-contrib] Enhancements for SpeedTracerLogging within gwt (issue1336803)

2011-02-03 Thread jbrosenberg

Reviewers: zundel, conroy,

Description:
Enhancements for SpeedTracerLogging within gwt
Added support for logging/estimating garbage collection, process cpu
time, per thread cpu time, and for overhead time for logging itself.


Please review this at http://gwt-code-reviews.appspot.com/1336803/show

Affected files:
  A  
dev/core/src/com/google/gwt/dev/util/log/speedtracer/SpeedTracerEventType.java
  M  
dev/core/src/com/google/gwt/dev/util/log/speedtracer/SpeedTracerLogger.java



--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Decouple JsProgram; this allows the JS AST to serialize in pieces. (issue1342801)

2011-02-03 Thread scottb

Updated patch based on feedback.

http://gwt-code-reviews.appspot.com/1342801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Make SOYC produce consistent output (issue1338805)

2011-02-03 Thread scottb

Reviewers: ,



Please review this at http://gwt-code-reviews.appspot.com/1338805/show

Affected files:
  M dev/core/src/com/google/gwt/core/ext/soyc/impl/SizeMapRecorder.java
  M dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Make SOYC produce consistent output (issue1338805)

2011-02-03 Thread scottb

Sorry, forgot to include Bob.

http://gwt-code-reviews.appspot.com/1338805/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Enhancements for SpeedTracerLogging within gwt (issue1336803)

2011-02-03 Thread jbrosenberg


http://gwt-code-reviews.appspot.com/1336803/diff/1/3
File
dev/core/src/com/google/gwt/dev/util/log/speedtracer/SpeedTracerLogger.java
(right):

http://gwt-code-reviews.appspot.com/1336803/diff/1/3#newcode477
dev/core/src/com/google/gwt/dev/util/log/speedtracer/SpeedTracerLogger.java:477:
private final long zeroTimeMilliseconds;
will doalthough, it looks like it doesn't seem to really need the
baseTime afterall?  I tried commenting out the generation of the
baseTime data altogether, and it doesn't seem to affect things at all
(speedtracer seems to normalize the time just fine).   That and also for
the case of processCpuTime (which has no basis in wall time)...

http://gwt-code-reviews.appspot.com/1336803/diff/1/3#newcode592
dev/core/src/com/google/gwt/dev/util/log/speedtracer/SpeedTracerLogger.java:592:
Cummulative Collection Count,
Long.toString(gcMXBean.getCollectionCount()));
So, for visualization purposes here, it seems ok to leave as is, no?

http://gwt-code-reviews.appspot.com/1336803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Enhancements for SpeedTracerLogging within gwt (issue1336803)

2011-02-03 Thread jbrosenberg

http://gwt-code-reviews.appspot.com/1336803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors