Re: URGENT-Generating gwt web pages

2012-04-23 Thread vanessa vanessa
Ok i'll provide further information. i have to create a generator that uses
the velocity engine ,it will generate a GWT
code which will be in turn compiled .

The entry of my generator is an xml file which i'm supposed to transform
 to a model object . I'll generate therefore
the code from this model object .I wish i made my self clear.

Thanks for your help.


Le 23 avril 2012 06:11, Kanagaraj M kanagaraj@gmail.com a écrit :

 what you mean by entry. Are you trying to generate gwt models from what?

 Velocity would be the right choice.

 If you are gonna write complex template Freemarker would be a better one.


 On Saturday, 21 April 2012 22:03:19 UTC+5:30, vanessa vanessa wrote:

 Hello ,

 I have to create a generator that generates gwt code from a model as an
 entry.
 Can any one help me how to proceed ? And which template engine to choose ?
 Is velocity a good solution .

 Thanks a lot.
 Regards

  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/tbPLbnnSXdQJ.

 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


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



Re: URGENT-Generating gwt web pages

2012-04-23 Thread Thomas Broyer


On Monday, April 23, 2012 10:14:00 AM UTC+2, vanessa vanessa wrote:

 Ok i'll provide further information. i have to create a generator that 
 uses the velocity engine ,it will generate a GWT 
 code which will be in turn compiled .

 The entry of my generator is an xml file which i'm supposed to transform 
  to a model object . I'll generate therefore
 the code from this model object .I wish i made my self clear.


The fact that the generated code will be compiled by GWT doesn't change 
anything to your generating process.

So, write a Java program (with a main() et al.)  that reads XML and outputs 
Java code. What kind of help are you looking for?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/S4ndjgj-Q30J.
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: URGENT-Generating gwt web pages

2012-04-23 Thread vanessa vanessa
How it doesn't change anything ?
I!'m looking for some documentation and some recommendation .. I didn't
find through the net
someething that fits my needs .

Thanks a lot .

Le 23 avril 2012 09:26, Thomas Broyer t.bro...@gmail.com a écrit :



 On Monday, April 23, 2012 10:14:00 AM UTC+2, vanessa vanessa wrote:

 Ok i'll provide further information. i have to create a generator that
 uses the velocity engine ,it will generate a GWT
 code which will be in turn compiled .

 The entry of my generator is an xml file which i'm supposed to transform
  to a model object . I'll generate therefore
 the code from this model object .I wish i made my self clear.


 The fact that the generated code will be compiled by GWT doesn't change
 anything to your generating process.

 So, write a Java program (with a main() et al.)  that reads XML and
 outputs Java code. What kind of help are you looking for?

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/S4ndjgj-Q30J.

 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


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



Re: RequestFactory/Editor AutoBean has been frozen error

2012-04-23 Thread Thomas Broyer


On Monday, April 23, 2012 10:29:35 AM UTC+2, Tiago wrote:

 Hello Brandon,

 My problem isn't always autobean is frozen, it changes, but the summary 
 is that I cannot resubmit a proxy after a server error (like an unique 
 constraint violation, for example) that ends up calling 
 Receiver.onFailure().
 The error I tend to get is DeadEntityException.

 All I want is to be able to resubmit a proxy after a problem in the 
 server. Recreate it is not an option because the user has already modified 
 it, and I want to preserve the modifications. That's probably a common use 
 case, I can't be the only one struggling with it, can I?


In RequestFactory's design, onFailure is really an exception, and should 
never happen: errors should be conveyed as special return values. That 
doesn't quite change your issue here, as the proxy wouldn't be reusable 
either: that's because, again, RF has been designed with the idea that 
things shouldn't go wrong. For instance, unique constraint violations are 
not natural for (most / non-technical) users. Moreover, those kind of 
conditions should probably be detected as ConstraintVIolations so the user 
can fix the proxy and resubmit his request.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/5gujztakBUcJ.
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.



Runtime exception: com.google.web.bindery.requestfactory.server.UnexpectedException: Could not find static method with a single parameter of a key type

2012-04-23 Thread Ashu
Hi,
 
I am getting the above exception while running the GWT application.
 
I am using Entity and EntityProxies.
 
Below is the code:
 
@Entity
@Table(name = tlkpState)
public class State{
.
}
@ProxyFor(value = State.class)
public interface StateProxy extends EntityProxy {
  
 public String getFips();
 public String getName();
 EntityProxyIdStateProxy stableId();
}
@Service(value = StateServiceImpl.class)
 public interface StateRequest extends RequestContext {
  RequestListStateProxy getStates() throws Exception;
  //RequestVoid getStates() throws Exception;
 }
in widget.java
try {
   clientFactory.getRequestFactory().stateRequestContext().getStates().fire(new 
ReceiverListStateProxy(){
@Override
public void onSuccess(ListStateProxy response) {
 // TODO Auto-generated method stub
 System.out.println(on success);
}

 @Override
 public void onFailure(ServerFailure error) {
 System.out.println(on Failure);
 }
   });
  } catch (Exception e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
  }
 
when i call getstate() method with return type void it is working fine.
but the same method with return type ListStateProxy it is throwing the 
following exception:
 
 
* 

com.google.web.bindery.requestfactory.server.UnexpectedException*: Could 
not find static method with a single parameter of a key type

at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.die(*
ServiceLayerDecorator.java:216*)

at 
com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.getFind(
*ReflectiveServiceLayer.java:253*)

at 
com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.getFind(
*ReflectiveServiceLayer.java:271*)

at 
com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.getFind(
*ReflectiveServiceLayer.java:271*)

at 
com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.isLive(*
ReflectiveServiceLayer.java:200*)

at 
com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.isLive(*
ServiceLayerDecorator.java:116*)

at 
com.google.web.bindery.requestfactory.server.LocatorServiceLayer.doIsLive(*
LocatorServiceLayer.java:186*)

at com.google.web.bindery.requestfactory.server.LocatorServiceLayer.isLive(*
LocatorServiceLayer.java:85*)

at 
com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.isLive(*
ServiceLayerDecorator.java:116*)

at 
com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.createReturnOperations(
*SimpleRequestProcessor.java:274*)

at 
com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(
*SimpleRequestProcessor.java:232*)

at 
com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(
*SimpleRequestProcessor.java:127*)

at 
com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(*
RequestFactoryServlet.java:133*)

at javax.servlet.http.HttpServlet.service(*HttpServlet.java:637*)

at javax.servlet.http.HttpServlet.service(*HttpServlet.java:717*)

at org.mortbay.jetty.servlet.ServletHolder.handle(*ServletHolder.java:487*)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(*
ServletHandler.java:1097*)

at com.yieldstar.mpfui.server.MpfAuthFilter.doFilter(*MpfAuthFilter.java:41*
)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(*
ServletHandler.java:1088*)

at org.mortbay.jetty.servlet.ServletHandler.handle(*ServletHandler.java:360*
)

at org.mortbay.jetty.security.SecurityHandler.handle(*
SecurityHandler.java:216*)

at org.mortbay.jetty.servlet.SessionHandler.handle(*SessionHandler.java:181*
)

at org.mortbay.jetty.handler.ContextHandler.handle(*ContextHandler.java:729*
)

at org.mortbay.jetty.webapp.WebAppContext.handle(*WebAppContext.java:405*)

at org.mortbay.jetty.handler.HandlerWrapper.handle(*HandlerWrapper.java:152*
)

at org.mortbay.jetty.handler.RequestLogHandler.handle(*
RequestLogHandler.java:49*)

at org.mortbay.jetty.handler.HandlerWrapper.handle(*HandlerWrapper.java:152*
)

at org.mortbay.jetty.Server.handle(*Server.java:324*)

at org.mortbay.jetty.HttpConnection.handleRequest(*HttpConnection.java:505*)

at org.mortbay.jetty.HttpConnection$RequestHandler.content(*
HttpConnection.java:843*)

at org.mortbay.jetty.HttpParser.parseNext(*HttpParser.java:647*)

at org.mortbay.jetty.HttpParser.parseAvailable(*HttpParser.java:211*)

at org.mortbay.jetty.HttpConnection.handle(*HttpConnection.java:380*)

at org.mortbay.io.nio.SelectChannelEndPoint.run(*
SelectChannelEndPoint.java:395*)

at org.mortbay.thread.QueuedThreadPool$PoolThread.run(*
QueuedThreadPool.java:488*)

 

I am using gwt 2.4 version.

Not using locators.

could any one help on this.

 

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/F-eZF9EYAD8J.
To post to this group, send email to 

Re: Runtime exception: com.google.web.bindery.requestfactory.server.UnexpectedException: Could not find static method with a single parameter of a key type

2012-04-23 Thread Thomas Broyer
Your State class probably do not have a public static state findState(X 
id) method (where X is the return type of the getId instance method).
See 
https://developers.google.com/web-toolkit/doc/latest/DevGuideRequestFactory#impl
The alternative to the static method is to use a Locator.

On Monday, April 23, 2012 1:51:48 PM UTC+2, Ashu wrote:

 Hi,
  
 I am getting the above exception while running the GWT application.
  
 I am using Entity and EntityProxies.
  
 Below is the code:
  
 @Entity
 @Table(name = tlkpState)
 public class State{
 .
 }
 @ProxyFor(value = State.class)
 public interface StateProxy extends EntityProxy {
   
  public String getFips();
  public String getName();
  EntityProxyIdStateProxy stableId();
 }
 @Service(value = StateServiceImpl.class)
  public interface StateRequest extends RequestContext {
   RequestListStateProxy getStates() throws Exception;
   //RequestVoid getStates() throws Exception;
  }
 in widget.java
 try {

 clientFactory.getRequestFactory().stateRequestContext().getStates().fire(new 
 ReceiverListStateProxy(){
 @Override
 public void onSuccess(ListStateProxy response) {
  // TODO Auto-generated method stub
  System.out.println(on success);
 }
 
  @Override
  public void onFailure(ServerFailure error) {
  System.out.println(on Failure);
  }
});
   } catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
   }
  
 when i call getstate() method with return type void it is working fine.
 but the same method with return type ListStateProxy it is throwing the 
 following exception:
  
  
 * 

 com.google.web.bindery.requestfactory.server.UnexpectedException
 *: Could not find static method with a single parameter of a key type 

 at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.die(
 *ServiceLayerDecorator.java:216*) 

 at 
 com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.getFind(
 *ReflectiveServiceLayer.java:253*) 

 at 
 com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.getFind(
 *ReflectiveServiceLayer.java:271*) 

 at 
 com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.getFind(
 *ReflectiveServiceLayer.java:271*) 

 at 
 com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.isLive(
 *ReflectiveServiceLayer.java:200*) 

 at 
 com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.isLive(
 *ServiceLayerDecorator.java:116*) 

 at 
 com.google.web.bindery.requestfactory.server.LocatorServiceLayer.doIsLive(
 *LocatorServiceLayer.java:186*) 

 at com.google.web.bindery.requestfactory.server.LocatorServiceLayer.isLive(
 *LocatorServiceLayer.java:85*) 

 at 
 com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.isLive(
 *ServiceLayerDecorator.java:116*) 

 at 
 com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.createReturnOperations(
 *SimpleRequestProcessor.java:274*) 

 at 
 com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(
 *SimpleRequestProcessor.java:232*) 

 at 
 com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(
 *SimpleRequestProcessor.java:127*) 

 at 
 com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(
 *RequestFactoryServlet.java:133*) 

 at javax.servlet.http.HttpServlet.service(
 *HttpServlet.java:637*) 

 at javax.servlet.http.HttpServlet.service(
 *HttpServlet.java:717*) 

 at org.mortbay.jetty.servlet.ServletHolder.handle(
 *ServletHolder.java:487*) 

 at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
 *ServletHandler.java:1097*) 

 at com.yieldstar.mpfui.server.MpfAuthFilter.doFilter(
 *MpfAuthFilter.java:41*) 

 at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
 *ServletHandler.java:1088*) 

 at org.mortbay.jetty.servlet.ServletHandler.handle(
 *ServletHandler.java:360*) 

 at org.mortbay.jetty.security.SecurityHandler.handle(
 *SecurityHandler.java:216*) 

 at org.mortbay.jetty.servlet.SessionHandler.handle(
 *SessionHandler.java:181*) 

 at org.mortbay.jetty.handler.ContextHandler.handle(
 *ContextHandler.java:729*) 

 at org.mortbay.jetty.webapp.WebAppContext.handle(
 *WebAppContext.java:405*) 

 at org.mortbay.jetty.handler.HandlerWrapper.handle(
 *HandlerWrapper.java:152*) 

 at org.mortbay.jetty.handler.RequestLogHandler.handle(
 *RequestLogHandler.java:49*) 

 at org.mortbay.jetty.handler.HandlerWrapper.handle(
 *HandlerWrapper.java:152*) 

 at org.mortbay.jetty.Server.handle(
 *Server.java:324*) 

 at org.mortbay.jetty.HttpConnection.handleRequest(
 *HttpConnection.java:505*) 

 at org.mortbay.jetty.HttpConnection$RequestHandler.content(
 *HttpConnection.java:843*) 

 at org.mortbay.jetty.HttpParser.parseNext(
 *HttpParser.java:647*) 

 at org.mortbay.jetty.HttpParser.parseAvailable(
 *HttpParser.java:211*) 

 at org.mortbay.jetty.HttpConnection.handle(
 

Re: Runtime exception: com.google.web.bindery.requestfactory.server.UnexpectedException: Could not find static method with a single parameter of a key type

2012-04-23 Thread Ashu
Thanks for the quick reply!!
what is the use of this method and this class return type is my State 
class. how can i write that?
could you please give me more information about this?
 
 

On Monday, 23 April 2012 17:21:48 UTC+5:30, Ashu wrote:

 Hi,
  
 I am getting the above exception while running the GWT application.
  
 I am using Entity and EntityProxies.
  
 Below is the code:
  
 @Entity
 @Table(name = tlkpState)
 public class State{
 .
 }
 @ProxyFor(value = State.class)
 public interface StateProxy extends EntityProxy {
   
  public String getFips();
  public String getName();
  EntityProxyIdStateProxy stableId();
 }
 @Service(value = StateServiceImpl.class)
  public interface StateRequest extends RequestContext {
   RequestListStateProxy getStates() throws Exception;
   //RequestVoid getStates() throws Exception;
  }
 in widget.java
 try {

 clientFactory.getRequestFactory().stateRequestContext().getStates().fire(new 
 ReceiverListStateProxy(){
 @Override
 public void onSuccess(ListStateProxy response) {
  // TODO Auto-generated method stub
  System.out.println(on success);
 }
 
  @Override
  public void onFailure(ServerFailure error) {
  System.out.println(on Failure);
  }
});
   } catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
   }
  
 when i call getstate() method with return type void it is working fine.
 but the same method with return type ListStateProxy it is throwing the 
 following exception:
  
  
 * 

 com.google.web.bindery.requestfactory.server.UnexpectedException
 *: Could not find static method with a single parameter of a key type 

 at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.die(
 *ServiceLayerDecorator.java:216*) 

 at 
 com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.getFind(
 *ReflectiveServiceLayer.java:253*) 

 at 
 com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.getFind(
 *ReflectiveServiceLayer.java:271*) 

 at 
 com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.getFind(
 *ReflectiveServiceLayer.java:271*) 

 at 
 com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.isLive(
 *ReflectiveServiceLayer.java:200*) 

 at 
 com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.isLive(
 *ServiceLayerDecorator.java:116*) 

 at 
 com.google.web.bindery.requestfactory.server.LocatorServiceLayer.doIsLive(
 *LocatorServiceLayer.java:186*) 

 at com.google.web.bindery.requestfactory.server.LocatorServiceLayer.isLive(
 *LocatorServiceLayer.java:85*) 

 at 
 com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.isLive(
 *ServiceLayerDecorator.java:116*) 

 at 
 com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.createReturnOperations(
 *SimpleRequestProcessor.java:274*) 

 at 
 com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(
 *SimpleRequestProcessor.java:232*) 

 at 
 com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(
 *SimpleRequestProcessor.java:127*) 

 at 
 com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(
 *RequestFactoryServlet.java:133*) 

 at javax.servlet.http.HttpServlet.service(
 *HttpServlet.java:637*) 

 at javax.servlet.http.HttpServlet.service(
 *HttpServlet.java:717*) 

 at org.mortbay.jetty.servlet.ServletHolder.handle(
 *ServletHolder.java:487*) 

 at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
 *ServletHandler.java:1097*) 

 at com.yieldstar.mpfui.server.MpfAuthFilter.doFilter(
 *MpfAuthFilter.java:41*) 

 at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
 *ServletHandler.java:1088*) 

 at org.mortbay.jetty.servlet.ServletHandler.handle(
 *ServletHandler.java:360*) 

 at org.mortbay.jetty.security.SecurityHandler.handle(
 *SecurityHandler.java:216*) 

 at org.mortbay.jetty.servlet.SessionHandler.handle(
 *SessionHandler.java:181*) 

 at org.mortbay.jetty.handler.ContextHandler.handle(
 *ContextHandler.java:729*) 

 at org.mortbay.jetty.webapp.WebAppContext.handle(
 *WebAppContext.java:405*) 

 at org.mortbay.jetty.handler.HandlerWrapper.handle(
 *HandlerWrapper.java:152*) 

 at org.mortbay.jetty.handler.RequestLogHandler.handle(
 *RequestLogHandler.java:49*) 

 at org.mortbay.jetty.handler.HandlerWrapper.handle(
 *HandlerWrapper.java:152*) 

 at org.mortbay.jetty.Server.handle(
 *Server.java:324*) 

 at org.mortbay.jetty.HttpConnection.handleRequest(
 *HttpConnection.java:505*) 

 at org.mortbay.jetty.HttpConnection$RequestHandler.content(
 *HttpConnection.java:843*) 

 at org.mortbay.jetty.HttpParser.parseNext(
 *HttpParser.java:647*) 

 at org.mortbay.jetty.HttpParser.parseAvailable(
 *HttpParser.java:211*) 

 at org.mortbay.jetty.HttpConnection.handle(
 *HttpConnection.java:380*) 

 at org.mortbay.io.nio.SelectChannelEndPoint.run(
 *SelectChannelEndPoint.java:395*) 

 at 

Re: RequestFactory/Editor AutoBean has been frozen error

2012-04-23 Thread Tiago
Hello Thomas,

On Monday, April 23, 2012 11:49:54 AM UTC+2, Thomas Broyer wrote:

 In RequestFactory's design, onFailure is really an exception, and should 
 never happen: errors should be conveyed as special return values. That 
 doesn't quite change your issue here, as the proxy wouldn't be reusable 
 either: that's because, again, RF has been designed with the idea that 
 things shouldn't go wrong. For instance, unique constraint violations are 
 not natural for (most / non-technical) users. Moreover, those kind of 
 conditions should probably be detected as ConstraintVIolations so the user 
 can fix the proxy and resubmit his request.


Could you help me a bit more by pointing to an example of what do you mean 
by detected as ConstraintViolation?
I have a situation where the user must attribute a reference value to an 
entity, and this value must be unique. I can only know if it's unique after 
my service is called and either I attempt an insert and treat the 
exception, or if I make a previous select before the insert (very low risk 
of concurrence issues for my case, I think I could safely ignore such 
risk). In either case, the request is already gone and the service has 
already been called. From what I understood by reading the previous thread 
I linked to, it is already too late to reuse the proxy.


By the way, I was not using onFailure as you say it should be used. I was 
using it for general business failures. We've even implemented a generic 
Receiver to deal with that. Not challenging what you say, but it really 
doesn't look like RF was built with the idea that errors should be treated 
in the return value... the return value most of the time is a proxy (or 
Collection of proxies) to an entity used in the back-end. Entities are not 
supposed to have request-specific error data. Basically, to operate like 
that, I would need different DTOs for every request, and proxy these DTOs, 
which would contain the needed entities plus error information. Is that how 
RF is supposed to be used?

Thank you,
Tiago.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/tsM6lHU0uvQJ.
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.



TextColumn setCellStyleNames

2012-04-23 Thread Olivier Scherler
Hi,

I have a CellTree that uses a CompositeCell with several columns, and I
need to set a class on one of the columns. I tried this and it does
strictly nothing, my column is just an bare bones span:

TextColumnNode col2 = new TextColumnNode()
{
@Override
public String getValue( Node object ) { return object.getTitle(); }
};
col2.setCellStyleNames(pi-Node-locked);

Any ideas?

Olivier

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



Developers.google.com

2012-04-23 Thread Patrice De Saint Steban
Hello,

There a new developers website for all APIs for Google : 
http://developers.google.com, and the documentation website of GWT has 
migrated on the new website : http://developers.google.com/web-toolkit/

But there are no links for GWT on the first page of the news developers 
page, you must know the URL or click on the page Open Source : 
http://code.google.com/intl/fr/opensource/

It is an oversight?

Patrice

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/D6n3PwRBipMJ.
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: Runtime exception: com.google.web.bindery.requestfactory.server.UnexpectedException: Could not find static method with a single parameter of a key type

2012-04-23 Thread Thomas Broyer

On Monday, April 23, 2012 2:14:38 PM UTC+2, Ashu wrote:

 Thanks for the quick reply!!
 what is the use of this method and this class return type is my State 
 class. how can i write that?
 could you please give me more information about this?


The find method should load your entity from your datastore, given its ID. 

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



Re: RequestFactory/Editor AutoBean has been frozen error

2012-04-23 Thread Thomas Broyer


On Monday, April 23, 2012 2:57:09 PM UTC+2, Tiago wrote:

 Hello Thomas,

 On Monday, April 23, 2012 11:49:54 AM UTC+2, Thomas Broyer wrote:

 In RequestFactory's design, onFailure is really an exception, and should 
 never happen: errors should be conveyed as special return values. That 
 doesn't quite change your issue here, as the proxy wouldn't be reusable 
 either: that's because, again, RF has been designed with the idea that 
 things shouldn't go wrong. For instance, unique constraint violations are 
 not natural for (most / non-technical) users. Moreover, those kind of 
 conditions should probably be detected as ConstraintVIolations so the user 
 can fix the proxy and resubmit his request.


 Could you help me a bit more by pointing to an example of what do you mean 
 by detected as ConstraintViolation?
 I have a situation where the user must attribute a reference value to an 
 entity, and this value must be unique. I can only know if it's unique after 
 my service is called and either I attempt an insert and treat the 
 exception, or if I make a previous select before the insert (very low risk 
 of concurrence issues for my case, I think I could safely ignore such 
 risk). In either case, the request is already gone and the service has 
 already been called. From what I understood by reading the previous thread 
 I linked to, it is already too late to reuse the proxy.


You can use a custom JSR303 validator that does the select and the check; 
so that in case of a unique constraint violation, a ConstraintViolation 
would be sent back to the client (and in this case, the proxy is unfrozen 
so it can be fixed before firing the RequestContext again).
 

 By the way, I was not using onFailure as you say it should be used. I was 
 using it for general business failures. We've even implemented a generic 
 Receiver to deal with that. Not challenging what you say, but it really 
 doesn't look like RF was built with the idea that errors should be treated 
 in the return value... the return value most of the time is a proxy (or 
 Collection of proxies) to an entity used in the back-end. Entities are not 
 supposed to have request-specific error data. Basically, to operate like 
 that, I would need different DTOs for every request, and proxy these DTOs, 
 which would contain the needed entities plus error information. Is that how 
 RF is supposed to be used?


When your service method has error paths, yes; but the main idea is that 
there should as few as possible.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/CBDzv45Cy4AJ.
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: URGENT-Generating gwt web pages

2012-04-23 Thread Alan Chaney

On 4/23/2012 1:34 AM, vanessa vanessa wrote:

How it doesn't change anything ?
I!'m looking for some documentation and some recommendation .. I 
didn't find through the net

someething that fits my needs .

The input to GWT is Java code. As Thomas said, you are looking for 
something that takes XML and converts it to Java source.


Velocity (and Freemarker, for that matter) take Java models and convert 
them to a textual representation, such as HTML or XML or just plain text 
(for example, I generate the text of emails using Freemarker) so they 
are not really much use in your case.


I suggest that you look at JAXB which binds XML to java -- in other 
words, generates the java code required to represent an XML description.


There's also XStream and many others.

Your requirement means you will have to learn about XML binding and GWT. 
The GWT developer docs are at https://developers.google.com/web-toolkit/ 
and you can go to http://jaxb.java.net/ for stuff on JAXB - or just 
search Google using the search term ' xml binding java ' which will give 
you lots of information and alternatives.


Finally, problems with converting XML -- Java are not really relevant 
to this list, but if you have problems compiling the generated Java with 
the GWT compiler, then this would be the place to ask on specific 
debugging issues. There are limitations on the Java source that GWT will 
compile - see 
https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsCompatibility 
for more information.



Regards

Alan













Thanks a lot .

Le 23 avril 2012 09:26, Thomas Broyer t.bro...@gmail.com 
mailto:t.bro...@gmail.com a écrit :




On Monday, April 23, 2012 10:14:00 AM UTC+2, vanessa vanessa wrote:

Ok i'll provide further information. i have to create a
generator that uses the velocity engine ,it will generate a GWT
code which will be in turn compiled .

The entry of my generator is an xml file which i'm supposed to
transform  to a model object . I'll generate therefore
the code from this model object .I wish i made my self clear.


The fact that the generated code will be compiled by GWT doesn't
change anything to your generating process.

So, write a Java program (with a main() et al.)  that reads XML
and outputs Java code. What kind of help are you looking for?
-- 
You received this message because you are subscribed to the Google

Groups Google Web Toolkit group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/S4ndjgj-Q30J.

To post to this group, send email to
google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com
mailto:google-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.


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



RequestFactory DeobfuscatorBuilder

2012-04-23 Thread Aidan O'Kelly
Is there a flag somewhere to build the deobfuscator builder without
obfuscating the type names?

-- 
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: RequestFactory DeobfuscatorBuilder

2012-04-23 Thread Thomas Broyer

On Monday, April 23, 2012 4:41:28 PM UTC+2, Aidan OK wrote:

 Is there a flag somewhere to build the deobfuscator builder without 
 obfuscating the type names? 


Er… no.

And it's not only the DeobfuscatorBuilder: the generator for the GWT client 
code would have to honor that flag too.

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



Re: RequestFactory DeobfuscatorBuilder

2012-04-23 Thread Aidan O'Kelly
Thanks.

On Mon, Apr 23, 2012 at 3:57 PM, Thomas Broyer t.bro...@gmail.com wrote:


 On Monday, April 23, 2012 4:41:28 PM UTC+2, Aidan OK wrote:

 Is there a flag somewhere to build the deobfuscator builder without
 obfuscating the type names?


 Er… no.

 And it's not only the DeobfuscatorBuilder: the generator for the GWT
 client code would have to honor that flag too.

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


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



Re: URGENT-Generating gwt web pages

2012-04-23 Thread vanessa vanessa
Hi Alan ,
Thank you for your help and for your collaboration.
I think i didn't make my self clear enough.My problem isn't converting XML
to Java
i'm not needing marshalling and unmarshalling .I have a model which
contains data(an xmile file) which i've already
converted to a model object.
I 'll have to implement a generator that uses this data to create
automatically gwt classes.I'll have to generate
all the packages i mean by that the client package ,the shared package and
the server one automatically.

Since velocity is a good solution , i'll generate theses classes with
velocity from scratch.I was searching if anyone
implemented such a gnerator before and so can help me with some advice.
Thanks a lot again.And good luck every body.

Le 23 avril 2012 15:36, Alan Chaney a...@mechnicality.com a écrit :

  On 4/23/2012 1:34 AM, vanessa vanessa wrote:

  How it doesn't change anything ?
 I!'m looking for some documentation and some recommendation .. I didn't
 find through the net
  someething that fits my needs .

   The input to GWT is Java code. As Thomas said, you are looking for
 something that takes XML and converts it to Java source.

 Velocity (and Freemarker, for that matter) take Java models and convert
 them to a textual representation, such as HTML or XML or just plain text
 (for example, I generate the text of emails using Freemarker) so they are
 not really much use in your case.

 I suggest that you look at JAXB which binds XML to java -- in other
 words, generates the java code required to represent an XML description.

 There's also XStream and many others.

 Your requirement means you will have to learn about XML binding and GWT.
 The GWT developer docs are at https://developers.google.com/web-toolkit/and 
 you can go to
 http://jaxb.java.net/ for stuff on JAXB - or just search Google using the
 search term ' xml binding java ' which will give you lots of information
 and alternatives.

 Finally, problems with converting XML -- Java are not really relevant to
 this list, but if you have problems compiling the generated Java with the
 GWT compiler, then this would be the place to ask on specific debugging
 issues. There are limitations on the Java source that GWT will compile -
 see
 https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsCompatibilityfor
  more information.


 Regards

 Alan













  Thanks a lot .

 Le 23 avril 2012 09:26, Thomas Broyer t.bro...@gmail.com a écrit :



 On Monday, April 23, 2012 10:14:00 AM UTC+2, vanessa vanessa wrote:

  Ok i'll provide further information. i have to create a generator that
 uses the velocity engine ,it will generate a GWT
 code which will be in turn compiled .

  The entry of my generator is an xml file which i'm supposed to
 transform  to a model object . I'll generate therefore
 the code from this model object .I wish i made my self clear.


  The fact that the generated code will be compiled by GWT doesn't change
 anything to your generating process.

  So, write a Java program (with a main() et al.)  that reads XML and
 outputs Java code. What kind of help are you looking for?
  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
  To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/S4ndjgj-Q30J.

 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.


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



Re: Call for action: Time to rethink a road-map and more frequent updates for GWT.

2012-04-23 Thread Jmscavaleiro
We are investing our time, our job and our life on/with GWT so we need
to be more informed and we need to know with what we can count.

-- 
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: RequestFactory/Editor AutoBean has been frozen error

2012-04-23 Thread Tiago
On Monday, April 23, 2012 4:21:50 PM UTC+2, Thomas Broyer wrote:

 You can use a custom JSR303 validator that does the select and the check; 
 so that in case of a unique constraint violation, a ConstraintViolation 
 would be sent back to the client (and in this case, the proxy is unfrozen 
 so it can be fixed before firing the RequestContext again).


Interesting. I'll look into it.
Do you realize, though, that by doing this you will:
- Make at least one DB access more than what's strictly necessary. 
- Potentially run concurrence risks. If the risks are considerable, you may 
need pessimistic locks...

I feel uneasy with the potential overheads you add just due to the 
architecture. But, well, I guess until issue #5794 is not included, and if 
such overheads are not a big issue (and I bet they won't be for most 
people), that's probably the way to go.

 

 When your service method has error paths, yes; but the main idea is that 
 there should as few as possible.



If you manage to filter everything via validators, then yeah, probably you 
won't have much more error paths to deal with. I wasn't using validators 
for anything needing DB access though.


Thank you again for your answers Thomas. Your help is much appreciated.


Best regards,
Tiago.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/gBETWuHuMRAJ.
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.



SafeUri can not be used as SafeHtml??

2012-04-23 Thread Patrick Tucker
We have a template that we are converting to using SafeHtml and SafeUri, 
but ran into a problem.
 
The template looks something like this:
a href={0} ...{0}/a
 
Argument 0 is the URL, if we change the value from String to SafeUri we get 
the following error:
[ERROR] SafeUri can only be used as the entire value of a URL attribute. 
Did you mean to use java.lang.String or SafeHtml instead?
 
The only way around this is to keep the argument a String or add another 
argument that is a SafeHtml of the URL.  Neither of these options seems 
ideal to me.
 
Thoughts?  I don't see any reason why a valid URL can not be considered 
SafeHtml?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/eaQ-zDw0Yw4J.
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: SafeUri can not be used as SafeHtml??

2012-04-23 Thread Thomas Broyer


On Monday, April 23, 2012 7:25:59 PM UTC+2, Patrick Tucker wrote:

 We have a template that we are converting to using SafeHtml and SafeUri, 
 but ran into a problem.
  
 The template looks something like this:
 a href={0} ...{0}/a
  
 Argument 0 is the URL, if we change the value from String to SafeUri we 
 get the following error:
 [ERROR] SafeUri can only be used as the entire value of a URL attribute. 
 Did you mean to use java.lang.String or SafeHtml instead?
  
 The only way around this is to keep the argument a String or add another 
 argument that is a SafeHtml of the URL.  Neither of these options seems 
 ideal to me.
  
 Thoughts?  I don't see any reason why a valid URL can not be considered 
 SafeHtml?


See comments in http://gwt-code-reviews.appspot.com/1447812
John thought that using SafeUri outside a URL attribute would likely be a 
dev mistake; so the solution really is to add another argument to your 
SafeHtmlTemplates method. 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/3wLQ6FfqFe8J.
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.



SerializationException ... Help!

2012-04-23 Thread Leonardo Terrão
Hello everybody!

In another application I was using my Gilead (Hibernate4gwt) to work
with my data, but apparently the Gilead was inactive. Now I'm starting
another application and would like to use Hibernate simple.

Now I have a problem that I believe is the relationship of the data
that are not being deserialized, anyone know how could solve this
problem?

...Hibernate satus...
23-04-2012 17:04:46 SchemaUpdate [INFO] schema update complete
Tempo gasto na inicialização do banco: 1741
Tempo para login: 12
Starting Jetty on port 
   [WARN] Exception while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException: Type
'org.hibernate.collection.PersistentBag' was not included in the set
of types which can be serialized by this SerializationPolicy or its
Class object could not be loaded. For security purposes, this type
will not be serialized.: instance = []
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:
619)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
126)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
$ValueWriter$8.write(ServerSerializationStreamWriter.java:153)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:
539)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:
709)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:
748)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:
621)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
126)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
$ValueWriter$8.write(ServerSerializationStreamWriter.java:153)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:
539)
at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:616)
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess(RPC.java:
474)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
571)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
208)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
248)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
362)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at
org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:
49)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
505)
at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
395)
at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:488)
[ERROR] 500 - POST /insweb/INSWEBService (127.0.0.1) 57 bytes
   Request headers
  Host: 127.0.0.1:
  Connection: keep-alive
  Accept: */*
  User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/
535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19
  Accept-Encoding: gzip,deflate,sdch
  Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.6,en;q=0.4
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
  Cookie: JSESSIONID=1po82g0oc9ntg
  Content-Length: 168
  Origin: http://127.0.0.1:
  X-GWT-Module-Base: http://127.0.0.1:/insweb/
  

Re: SafeUri can not be used as SafeHtml??

2012-04-23 Thread Patrick Tucker
Well that stinks.  Seems like a warning would suffice, allowing those that 
did it on purpose to be able to do it and those who did it on accident to 
fix it.
Is there somethinng that can be done to allow us to do this?   Maybe 
another class that is both a SafeHtml and SafeUri that can be used in both 
places?

On Monday, April 23, 2012 3:22:04 PM UTC-4, Thomas Broyer wrote:



 On Monday, April 23, 2012 7:25:59 PM UTC+2, Patrick Tucker wrote:

 We have a template that we are converting to using SafeHtml and SafeUri, 
 but ran into a problem.
  
 The template looks something like this:
 a href={0} ...{0}/a
  
 Argument 0 is the URL, if we change the value from String to SafeUri we 
 get the following error:
 [ERROR] SafeUri can only be used as the entire value of a URL attribute. 
 Did you mean to use java.lang.String or SafeHtml instead?
  
 The only way around this is to keep the argument a String or add another 
 argument that is a SafeHtml of the URL.  Neither of these options seems 
 ideal to me.
  
 Thoughts?  I don't see any reason why a valid URL can not be considered 
 SafeHtml?


 See comments in http://gwt-code-reviews.appspot.com/1447812
 John thought that using SafeUri outside a URL attribute would likely be a 
 dev mistake; so the solution really is to add another argument to your 
 SafeHtmlTemplates method. 


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Uyijn6tCkPYJ.
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: SafeUri can not be used as SafeHtml??

2012-04-23 Thread Thomas Broyer


On Monday, April 23, 2012 10:43:50 PM UTC+2, Patrick Tucker wrote:

 Well that stinks.  Seems like a warning would suffice, allowing those that 
 did it on purpose to be able to do it and those who did it on accident to 
 fix it.
 Is there somethinng that can be done to allow us to do this?   Maybe 
 another class that is both a SafeHtml and SafeUri that can be used in both 
 places?


Well, I suppose we can bring the discussion to GWT-Contributors and see if 
John is OK to change it to a warning in retrospect. 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/1n13cn7r_jQJ.
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 set default textbox on form?

2012-04-23 Thread Blake McBride
Greetings,

Is there a way to set which widget (usually a certain textbox) that should
be the default widget with focus when a new form appears?  Basically when
the new form appears, if the user just starts typing, the input should
appear in the widget that was specified as the one with the default focus.

(I discovered that the order that the widgets are defined in the source
file determines the tab order.  This order can be changed in designer mode
by changing the order in the widget list for the form via dragging.)

Thanks.

Blake McBride

-- 
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 set default textbox on form?

2012-04-23 Thread Qian Qiao
On Tue, Apr 24, 2012 at 10:15, Blake McBride blake1...@gmail.com wrote:
 Greetings,

 Is there a way to set which widget (usually a certain textbox) that should
 be the default widget with focus when a new form appears?  Basically when
 the new form appears, if the user just starts typing, the input should
 appear in the widget that was specified as the one with the default focus.

 (I discovered that the order that the widgets are defined in the source file
 determines the tab order.  This order can be changed in designer mode by
 changing the order in the widget list for the form via dragging.)

 Thanks.

 Blake McBride

Widgets that can be focused on all have setTabIndex method. Don't know
if this is what you want.

Worst case, yon can override the onAttach method of your form
container, and do textbox.setFocus(true)

HTH.

-- Joe

-- 
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] SimplePager modificaitons (issue1692803)

2012-04-23 Thread tuckerpmt

Reviewers: ,

Description:
DEFAULT_FAST_FORWARD_ROWS should be final
Add constructor SimplePager(TextLocation, boolean, boolean)

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

Affected files:
  user/src/com/google/gwt/user/cellview/client/SimplePager.java


Index: user/src/com/google/gwt/user/cellview/client/SimplePager.java
===
--- user/src/com/google/gwt/user/cellview/client/SimplePager.java	(revision  
10956)
+++ user/src/com/google/gwt/user/cellview/client/SimplePager.java	(working  
copy)

@@ -1,12 +1,12 @@
 /*
  * Copyright 2010 Google Inc.
- *
+ *
  * Licensed under the Apache License, Version 2.0 (the License); you may  
not
  * use this file except in compliance with the License. You may obtain a  
copy of

  * the License at
- *
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an AS IS BASIS,  
WITHOUT

  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -38,7 +38,7 @@
 /**
  * A pager for controlling a {@link HasRows} that only supports simple page
  * navigation.
- *
+ *
  * p
  * h3Example/h3
  * {@example com.google.gwt.examples.cellview.SimplePagerExample}
@@ -46,7 +46,7 @@
  */
 public class SimplePager extends AbstractPager {
   /**
-   * Constant for labeling the simple pager navigational {@link  
ImageButton}s
+   * Constant for labeling the simple pager navigational {@link  
ImageButton}s

*/
   @DefaultLocale(en_US)
   public interface ImageButtonsConstants extends Constants {
@@ -212,7 +212,7 @@
 }
   }

-  private static int DEFAULT_FAST_FORWARD_ROWS = 1000;
+  private static final int DEFAULT_FAST_FORWARD_ROWS = 1000;
   private static Resources DEFAULT_RESOURCES;

   private static Resources getDefaultResources() {
@@ -256,7 +256,7 @@

   /**
* Construct a {@link SimplePager} with the specified text location.
-   *
+   *
* @param location the location of the text relative to the buttons
*/
   @UiConstructor
@@ -267,8 +267,20 @@
   }

   /**
+   * Construct a {@link SimplePager} with the specified text location.
+   *
+   * @param location the location of the text relative to the buttons
+   * @param showFastForwardButton if true, show a fast-forward button that
+   *  advances by a larger increment than a single page
+   * @param showLastPageButton if true, show a button to go the the last  
page

+   */
+  public SimplePager(TextLocation location, boolean showFastForwardButton,  
boolean showLastPageButton) {
+this(location, getDefaultResources(), showFastForwardButton,  
DEFAULT_FAST_FORWARD_ROWS, showLastPageButton);

+  }
+
+  /**
* Construct a {@link SimplePager} with the specified resources.
-   *
+   *
* @param location the location of the text relative to the buttons
* @param resources the {@link Resources} to use
* @param showFastForwardButton if true, show a fast-forward button that
@@ -284,7 +296,7 @@
 this.fastForwardRows = fastForwardRows;
 this.style = resources.simplePagerStyle();
 this.style.ensureInjected();
-
+
 // Create the buttons.
 String disabledStyle = style.disabledButton();
 firstPage = new ImageButton(resources.simplePagerFirstPage(),
@@ -304,7 +316,7 @@
   }
 });
 prevPage = new ImageButton(resources.simplePagerPreviousPage(),
-resources.simplePagerPreviousPageDisabled(), disabledStyle,
+resources.simplePagerPreviousPageDisabled(), disabledStyle,
 imageButtonConstants.prevPage());
 prevPage.addClickHandler(new ClickHandler() {
   @Override
@@ -326,7 +338,7 @@
 }
 if (showFastForwardButton) {
   fastForward = new ImageButton(resources.simplePagerFastForward(),
-  resources.simplePagerFastForwardDisabled(), disabledStyle,
+  resources.simplePagerFastForwardDisabled(), disabledStyle,
   imageButtonConstants.fastForward());
   fastForward.addClickHandler(new ClickHandler() {
 @Override
@@ -376,10 +388,10 @@
 // Disable the buttons by default.
 setDisplay(null);
   }
-
+
   /**
* Construct a {@link SimplePager} with the specified resources and  
default image button names.

-   *
+   *
* @param location the location of the text relative to the buttons
* @param resources the {@link Resources} to use
* @param showFastForwardButton if true, show a fast-forward button that
@@ -393,7 +405,7 @@
 this(location, resources, showFastForwardButton, fastForwardRows,  
showLastPageButton,

 GWT.ImageButtonsConstantscreate(ImageButtonsConstants.class));
   }
-
+
   @Override
   public void firstPage() {
 super.firstPage();
@@ -491,7 +503,7 @@

   /**
* Get the text to display in the pager that reflects the state of the  
pager.

-   *
+   *
* @return the text
*/
   protected String createText() {
@@ -540,7 +552,7 @@

[gwt-contrib] VerticalSplitPanel should use ScheduledCommand instead of Command (issue1693803)

2012-04-23 Thread tuckerpmt

Reviewers: ,



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

Affected files:
  user/src/com/google/gwt/user/client/ui/VerticalSplitPanel.java


Index: user/src/com/google/gwt/user/client/ui/VerticalSplitPanel.java
===
--- user/src/com/google/gwt/user/client/ui/VerticalSplitPanel.java	 
(revision 10954)
+++ user/src/com/google/gwt/user/client/ui/VerticalSplitPanel.java	(working  
copy)

@@ -16,12 +16,12 @@
 package com.google.gwt.user.client.ui;

 import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.resources.client.ClientBundle;
 import com.google.gwt.resources.client.ImageResource;
 import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
-import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.DeferredCommand;
 import com.google.gwt.user.client.Element;
 import com.google.gwt.user.client.Timer;

@@ -398,7 +398,7 @@
  * This first call is simply to try to avoid a jitter effect if  
possible.

  */
 setSplitPosition(lastSplitPosition);
-DeferredCommand.addCommand(new Command() {
+Scheduler.get().scheduleDeferred(new ScheduledCommand() {
   public void execute() {
 setSplitPosition(lastSplitPosition);
   }


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


[gwt-contrib] HorizontalSplitPanel should use ScheduledCommand instead of Command (issue1694803)

2012-04-23 Thread tuckerpmt

Reviewers: ,



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

Affected files:
  user/src/com/google/gwt/user/client/ui/HorizontalSplitPanel.java


Index: user/src/com/google/gwt/user/client/ui/HorizontalSplitPanel.java
===
--- user/src/com/google/gwt/user/client/ui/HorizontalSplitPanel.java	 
(revision 10954)
+++ user/src/com/google/gwt/user/client/ui/HorizontalSplitPanel.java	 
(working copy)

@@ -16,13 +16,13 @@
 package com.google.gwt.user.client.ui;

 import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.i18n.client.LocaleInfo;
 import com.google.gwt.resources.client.ClientBundle;
 import com.google.gwt.resources.client.ImageResource;
 import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
-import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.DeferredCommand;
 import com.google.gwt.user.client.Element;
 import com.google.gwt.user.client.Timer;

@@ -301,8 +301,7 @@
   // If one tries to set the width of the LEFT element to
   // before layout completes, the RIGHT element will
   // appear to be blanked out.
-
-  DeferredCommand.addCommand(new Command() {
+  Scheduler.get().scheduleDeferred(new ScheduledCommand() {
 public void execute() {
   setWidth(panel.getElement(LEFT), 0px);
 }
@@ -579,7 +578,7 @@
  * possible.
  */
 setSplitPosition(lastSplitPosition);
-DeferredCommand.addCommand(new Command() {
+Scheduler.get().scheduleDeferred(new ScheduledCommand() {
   public void execute() {
 setSplitPosition(lastSplitPosition);
   }


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


[gwt-contrib] SplitLayoutPanel should use ScheduledCommand instead of Command (issue1695803)

2012-04-23 Thread tuckerpmt

Reviewers: ,



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

Affected files:
  user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java


Index: user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java
===
--- user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java	(revision  
10954)
+++ user/src/com/google/gwt/user/client/ui/SplitLayoutPanel.java	(working  
copy)

@@ -22,7 +22,6 @@
 import com.google.gwt.dom.client.Element;
 import com.google.gwt.dom.client.Style.Position;
 import com.google.gwt.dom.client.Style.Unit;
-import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.Event;
 import com.google.gwt.user.client.Window;

@@ -252,7 +251,7 @@
   // Defer actually updating the layout, so that if we receive many
   // mouse events before layout/paint occurs, we'll only update once.
   if (layoutCommand == null) {
-layoutCommand = new Command() {
+layoutCommand = new ScheduledCommand() {
   @Override
   public void execute() {
 layoutCommand = null;


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


[gwt-contrib] DateBox should use ScheduledCommand instead of Command (issue1695804)

2012-04-23 Thread tuckerpmt

Reviewers: ,



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

Affected files:
  user/src/com/google/gwt/user/datepicker/client/DateBox.java


Index: user/src/com/google/gwt/user/datepicker/client/DateBox.java
===
--- user/src/com/google/gwt/user/datepicker/client/DateBox.java	(revision  
10958)
+++ user/src/com/google/gwt/user/datepicker/client/DateBox.java	(working  
copy)

@@ -17,6 +17,8 @@
 package com.google.gwt.user.datepicker.client;

 import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.editor.client.IsEditor;
 import com.google.gwt.editor.client.LeafValueEditor;
 import com.google.gwt.editor.client.adapters.TakesValueEditor;
@@ -35,8 +37,6 @@
 import com.google.gwt.event.logical.shared.ValueChangeHandler;
 import com.google.gwt.event.shared.HandlerRegistration;
 import com.google.gwt.i18n.client.DateTimeFormat;
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DeferredCommand;
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.HasValue;
 import com.google.gwt.user.client.ui.PopupPanel;
@@ -490,7 +490,7 @@

   private void preventDatePickerPopup() {
 allowDPShow = false;
-DeferredCommand.addCommand(new Command() {
+Scheduler.get().scheduleDeferred(new ScheduledCommand() {
   public void execute() {
 allowDPShow = true;
   }


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


[gwt-contrib] JsonpRequest should use ScheduledCommand instead of Command (issue1694804)

2012-04-23 Thread tuckerpmt

Reviewers: ,



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

Affected files:
  user/src/com/google/gwt/jsonp/client/JsonpRequest.java


Index: user/src/com/google/gwt/jsonp/client/JsonpRequest.java
===
--- user/src/com/google/gwt/jsonp/client/JsonpRequest.java  (revision 10958)
+++ user/src/com/google/gwt/jsonp/client/JsonpRequest.java  (working copy)
@@ -16,11 +16,11 @@
 package com.google.gwt.jsonp.client;

 import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.dom.client.Document;
 import com.google.gwt.dom.client.Node;
 import com.google.gwt.dom.client.ScriptElement;
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DeferredCommand;
 import com.google.gwt.user.client.Timer;
 import com.google.gwt.user.client.rpc.AsyncCallback;

@@ -319,7 +319,7 @@
  * scope of the script itself. Therefore, we need to defer the delete
  * statement after the callback execution.
  */
-DeferredCommand.addCommand(new Command() {
+Scheduler.get().scheduleDeferred(new ScheduledCommand() {
   public void execute() {
 if (!canHaveMultipleRequestsForSameId) {
   // If there can me multiple requests for a particular ID, then we


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


[gwt-contrib] PopupImplMozilla should use ScheduledCommand instead of Command (issue1696803)

2012-04-23 Thread tuckerpmt

Reviewers: ,



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

Affected files:
  user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java


Index: user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java
===
--- user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java	 
(revision 10954)
+++ user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java	 
(working copy)

@@ -15,12 +15,12 @@
  */
 package com.google.gwt.user.client.ui.impl;

+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.dom.client.Element;
 import com.google.gwt.dom.client.Style.Display;
 import com.google.gwt.dom.client.Style.Overflow;
-import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.DeferredCommand;

 /**
  * Implementation class used by {@link  
com.google.gwt.user.client.ui.PopupPanel}.

@@ -99,7 +99,7 @@
   // 'overflow:auto' after all of the elements on the page have been
   // rendered,
   // the PopupPanel becomes the highest element in the stacking order.
-  DeferredCommand.addCommand(new Command() {
+  Scheduler.get().scheduleDeferred(new ScheduledCommand() {
 public void execute() {
   outerElem.getStyle().setOverflow(Overflow.AUTO);
 }
@@ -125,4 +125,4 @@
 popup.getStyle().setDisplay(Display.NONE);
 popup.getStyle().clearDisplay();
   }
-}
+}
\ No newline at end of file


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


[gwt-contrib] RenderablePanel should use ScheduledCommand instead of Command (issue1693804)

2012-04-23 Thread tuckerpmt

Reviewers: ,



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

Affected files:
  user/src/com/google/gwt/user/client/ui/RenderablePanel.java


Index: user/src/com/google/gwt/user/client/ui/RenderablePanel.java
===
--- user/src/com/google/gwt/user/client/ui/RenderablePanel.java	(revision  
10954)
+++ user/src/com/google/gwt/user/client/ui/RenderablePanel.java	(working  
copy)

@@ -15,12 +15,12 @@
  */
 package com.google.gwt.user.client.ui;

+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.dom.builder.shared.HtmlElementBuilder;
 import com.google.gwt.dom.client.Document;
 import com.google.gwt.dom.client.Element;
 import com.google.gwt.safehtml.shared.SafeHtml;
 import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
-import com.google.gwt.user.client.Command;

 /**
  * EXPERIMENTAL and subject to change. Do not use this in production code.
@@ -50,8 +50,8 @@

   // TODO(rdcastro): Add setters for these, or maybe have a list instead  
of a

   // single callback.
-  public Command wrapInitializationCallback = null;
-  public Command detachedInitializationCallback = null;
+  public ScheduledCommand wrapInitializationCallback = null;
+  public ScheduledCommand detachedInitializationCallback = null;

   protected SafeHtml html = null;



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


[gwt-contrib] MeniItem should use ScheduledCommand instead of Command (issue1698803)

2012-04-23 Thread tuckerpmt

Reviewers: ,

Description:
Changes in MenuItem require changes in MenuBar and SuggestBox.

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

Affected files:
  user/src/com/google/gwt/user/client/ui/MenuBar.java
  user/src/com/google/gwt/user/client/ui/MenuItem.java
  user/src/com/google/gwt/user/client/ui/SuggestBox.java


Index: user/src/com/google/gwt/user/client/ui/MenuBar.java
===
--- user/src/com/google/gwt/user/client/ui/MenuBar.java (revision 10958)
+++ user/src/com/google/gwt/user/client/ui/MenuBar.java (working copy)
@@ -19,6 +19,7 @@
 import com.google.gwt.aria.client.Roles;
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.dom.client.EventTarget;
 import com.google.gwt.event.dom.client.BlurEvent;
 import com.google.gwt.event.dom.client.BlurHandler;
@@ -32,7 +33,6 @@
 import com.google.gwt.resources.client.ImageResource;
 import com.google.gwt.resources.client.ImageResource.ImageOptions;
 import com.google.gwt.safehtml.shared.SafeHtml;
-import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.DOM;
 import com.google.gwt.user.client.Element;
 import com.google.gwt.user.client.Event;
@@ -44,7 +44,7 @@

 /**
  * A standard menu bar widget. A menu bar can contain any number of menu  
items,
- * each of which can either fire a {@link  
com.google.gwt.user.client.Command} or
+ * each of which can either fire a {@link  
com.google.gwt.core.client.Scheduler.ScheduledCommand} or

  * open a cascaded menu bar.
  *
  * p
@@ -285,7 +285,7 @@
* @param cmd the command to be fired
* @return the {@link MenuItem} object created
*/
-  public MenuItem addItem(SafeHtml html, Command cmd) {
+  public MenuItem addItem(SafeHtml html, ScheduledCommand cmd) {
 return addItem(new MenuItem(html, cmd));
   }

@@ -298,7 +298,7 @@
* @param cmd the command to be fired
* @return the {@link MenuItem} object created
*/
-  public MenuItem addItem(String text, boolean asHTML, Command cmd) {
+  public MenuItem addItem(String text, boolean asHTML, ScheduledCommand  
cmd) {

 return addItem(new MenuItem(text, asHTML, cmd));
   }

@@ -335,7 +335,7 @@
* @param cmd the command to be fired
* @return the {@link MenuItem} object created
*/
-  public MenuItem addItem(String text, Command cmd) {
+  public MenuItem addItem(String text, ScheduledCommand cmd) {
 return addItem(new MenuItem(text, cmd));
   }

@@ -893,7 +893,7 @@

   // Fire the item's command. The command must be fired in the same  
event

   // loop or popup blockers will prevent popups from opening.
-  final Command cmd = item.getCommand();
+  final ScheduledCommand cmd = item.getCommand();
   Scheduler.get().scheduleFinally(new Scheduler.ScheduledCommand() {
 @Override
 public void execute() {
Index: user/src/com/google/gwt/user/client/ui/MenuItem.java
===
--- user/src/com/google/gwt/user/client/ui/MenuItem.java(revision 10958)
+++ user/src/com/google/gwt/user/client/ui/MenuItem.java(working copy)
@@ -16,15 +16,15 @@
 package com.google.gwt.user.client.ui;

 import com.google.gwt.aria.client.Roles;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.safehtml.client.HasSafeHtml;
 import com.google.gwt.safehtml.shared.SafeHtml;
-import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.DOM;

 /**
  * An entry in a
  * {@link com.google.gwt.user.client.ui.MenuBar}. Menu items can either  
fire a
- * {@link com.google.gwt.user.client.Command} when they are clicked, or  
open a
+ * {@link com.google.gwt.core.client.Scheduler.ScheduledCommand} when they  
are clicked, or open a

  * cascading sub-menu.
  *
  * Each menu item is assigned a unique DOM id in order to support ARIA. See
@@ -35,7 +35,7 @@
   private static final String DEPENDENT_STYLENAME_SELECTED_ITEM  
= selected;
   private static final String DEPENDENT_STYLENAME_DISABLED_ITEM  
= disabled;


-  private Command command;
+  private ScheduledCommand command;
   private MenuBar parentMenu, subMenu;
   private boolean enabled = true;

@@ -54,7 +54,7 @@
* @param html the item's text
* @param cmd the command to be fired when it is selected
*/
-  public MenuItem(SafeHtml html, Command cmd) {
+  public MenuItem(SafeHtml html, ScheduledCommand cmd) {
 this(html.asString(), true, cmd);
   }

@@ -75,7 +75,7 @@
* @param asHTML codetrue/code to treat the specified text as html
* @param cmd the command to be fired when it is selected
*/
-  public MenuItem(String text, boolean asHTML, Command cmd) {
+  public MenuItem(String text, boolean asHTML, ScheduledCommand cmd) {
 this(text, asHTML);
 setCommand(cmd);
   }
@@ -98,7 +98,7 @@
* @param text the item's