Re: How to add new event to HandlerManager

2010-06-02 Thread Tristan
Looks like you're getting the wrong type from KeyPressEvent.  Javadoc
says:

getAssociatedType()
  Returns the type used to register this event.

getType()
  Gets the event type associated with key press events.

for registering, you should use getAssociatedType(), so try

eventBus.addHandler(KeyPressEvent.getAssociatedType(), 

On May 31, 1:54 pm, justint  wrote:
> Hi,  I'm fairly new to GWT and I'm trying to add events to my
> "eventBus"...
>
> final HandlerManager eventBus = new HandlerManager(null);
> ..
>
>                 eventBus.addHandler(RequestEvent.TYPE, new 
> RequestEvent.Handler() {
>                         public void onRequestEvent(RequestEvent requestEvent) 
> {
>                                 if (requestEvent.getState() == State.SENT) {
>                                         System.out.println("RPC sent!");
>                                 }
>                         }
>                 });
>
> This RequestEvent event works fine, but this doesn't work for
> instance...or at least I don't think it works:
>                 eventBus.addHandler(KeyPressEvent.getType(), new 
> KeyPressHandler()
> {
>                         public void onKeyPress(KeyPressEvent arg0) {
>                                 System.out.println("Key pressed event!");
>                         }
>                 });
>
> Any tips are greatly appreciated!

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



Re: GWT Custom Events

2010-06-02 Thread Tristan
this is a different problem, but it goes into how events are hooked up
together. pay attention to the handlers, check out the Place Providers
and how the events are registered with an EventBus (which is just an
extension of EventHandler). I hope it helps:

http://code.google.com/p/handlebars/wiki/PlaceServiceOverview

some of the wiki references classes from source, which are available
in that project.

On Jun 2, 10:23 am, Ciarán  wrote:
> Hey I have a problem getting my head around how custom GWT event
> Handlers work. I have read quite a bit about the topic and it still is
> some what foggy. I have read threads on Stackoverflow like this 
> onehttp://stackoverflow.com/questions/998621/gwt-custom-event-handlerbut
> still some what lost .Could someone explain it in an applied mannar
> such as the following.
>
> I have 2 classes a block and a man class. When the man collides with
> the block the man fires an event ( onCollision() ) and then the block
> class listens for that event.
>
> Thanks

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



Re: ClickHandler not called on second click

2010-06-02 Thread Danny Goovaerts
I have filed an issue 4993 for this in the issue tracker.

On Jun 2, 9:37 pm, Danny Goovaerts  wrote:
> I managed to isolate the code in a few classes which reproduce the
> problem.
>
> Can I upload a zipfile (15k) somewhere?
>
> On Jun 2, 5:27 pm, Olivier Monaco  wrote:
>
>
>
> > Danny,
>
> > What your click handler does? May be it puts some (transparent)
> > element in front of the button... How do you use the PushButton? What
> > is the exact structure of panels? You need to build a test case to us
> > help you.
>
> > Olivier
>
> > On 2 juin, 08:02, Danny Goovaerts  wrote:
>
> > > I have not yet been able to isolate the code while reproducing the
> > > problem. It's probably related to the actual structured of the page.
> > > But I managed to get some more information using the debugger.
>
> > > - The problem occurs when using a PushButton (constructed using the
> > > constructor PushButton(Image image)), not when using a simple Button
> > > - In the class CustomButton when the method onBrowserEvent is called
> > > for a MOUSUP event :
> > > ...
> > > case Event.ONMOUSEUP:
> > >         if (isCapturing)
> > >           isCapturing = false;
> > >           DOM.releaseCapture(getElement());
> > >           if (isHovering() && event.getButton() == Event.BUTTON_LEFT)
> > > {
> > >             onClick();
> > >           }
> > >         }
> > >         break;
> > > ...
>
> > > isHovering() returns true at the first click while it returns false at
> > > the subsequent clicks
>
> > > The method isHovering is implemented as follows
>
> > > final boolean isHovering() {
> > >     return (HOVERING_ATTRIBUTE & getCurrentFace().getFaceID()) > 0;
> > >   }
>
> > > At the first click getCurrentFace().getFaceID()) evaluates to 3, while
> > > at the subsequent clicks, it evaluates to 1.
> > > So there is probably something wrong in setting the correct face in
> > > the particular situation.
>
> > > I hope that this can provide enough information to find the real root
> > > cause.
>
> > > Danny
>
> > > On Jun 1, 6:21 pm, Danny Goovaerts  wrote:
>
> > > > My application is quite large. The button is several "levels" deep,
> > > > i.e. in a FlowPanel which itself is in a HorizontalPaneI in a hierachy
> > > > of divs. I will try to isolate while still reproducing the error.
> > > > I would also try to step through the code in a debugger, but
> > > > unfortunaly for this I need to move the mouse from the page to
> > > > Eclipse, which prevents from reproducing the error.
> > > > Danny
>
> > > > On Jun 1, 4:17 pm, Ranjan  wrote:
>
> > > > > Something like that should not have gone unnoticed for so long. Could
> > > > > you post your code snippet?
>
> > > > > On Jun 1, 12:07 pm, Olivier Monaco  wrote:
>
> > > > > > Danny,
>
> > > > > > I had no problem (in dev mode). Here is my test case:
>
> > > > > >     public void onModuleLoad()
> > > > > >     {
> > > > > >         Button b = new Button("click me");
> > > > > >         b.addClickHandler(new ClickHandler()
> > > > > >         {
> > > > > >             @Override
> > > > > >             public void onClick(ClickEvent event)
> > > > > >             {
> > > > > >                 RootPanel.get().add(new Label("clicked"));
> > > > > >             }
> > > > > >         });
> > > > > >         RootPanel.get().add(b);
> > > > > >     }
>
> > > > > > What's your test case?
>
> > > > > > Olivier
>
> > > > > > On 1 juin, 08:07, Danny Goovaerts  wrote:
>
> > > > > > > I have a button with a ClickHandler. When I move the mouse over 
> > > > > > > the
> > > > > > > button and click the button, the ClickHandler is called. When I 
> > > > > > > do no
> > > > > > > move the mouse away from the button, the ClickHandler is not 
> > > > > > > called on
> > > > > > > any subsequent clicks. I have to move the mouse away from the 
> > > > > > > button
> > > > > > > and back. Then the ClickHandler is called when I click again.
>
> > > > > > > To investigate, I have added a MouseDownHandler and a 
> > > > > > > MouseUpHandler.
> > > > > > > These are called on subsequent clicks, only the ClickHandler is 
> > > > > > > not
> > > > > > > called.
> > > > > > > As the focus stays on the button, I have tried hitting the enter 
> > > > > > > key.
> > > > > > > This triggers calling the ClickHandler.
>
> > > > > > > I 've tried adding a DeferredCommand to the ClickHandler with a
> > > > > > > variaty of actions(remove focus, remove focus and set focus 
> > > > > > > again),
> > > > > > > but this does not change anything.
>
> > > > > > > Environment
> > > > > > > - GWT 2.0.3
> > > > > > > - Vista
> > > > > > > - Chrome 6.0.408.1 dev / Firefox 3.5.9/ Internet Explorer 7.0
>
> > > > > > > There are several posts in this forum that describe a similar
> > > > > > > behaviour 
> > > > > > > (e.g.http://groups.google.com/group/google-web-toolkit/browse_thread/threa...)
> > > > > > > but none have a solution.
>
> > > > > > > Any idea how to solve this?
>
> > > > > > > Thanks in advance,
>
> > > > > > > Danny

-- 

Re: Hibernate problems after deploying to google appspot

2010-06-02 Thread Sripathi Krishnan
You CANNOT connect to databases when using google app engine. GAE has
several restrictions, you should go their documentation and post follow up
questions on the GAE user forum.


--Sri


On 1 June 2010 05:16, Emma Cole  wrote:

> Hi all,
>
> I have an application which uses hibernate that runs fine in hosted
> mode, but no longer when deployed.
> Here's the details:
>
> In hosted mode it connects to a database that resides on a remote
> server.
> Connection details set in hibernate.cfg.xml
>
> When run I it get a long stacktrace with errors similar to the
> following:
>
> SEVERE: Unable to instrument
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
> $ValueWriter$8. Security restrictions may not be entirely emulated.
>
> Which apparently has to do with the fact that it's being run in hosted
> mode, and I read that it can be ignored.
> The application saves and retrieves data without problems.
>
> After deploying it on appspot and when I try to save a new row in a
> table I get this:
>
> javax.servlet.ServletContext log: Exception while dispatching incoming
> RPC call
> com.google.gwt.user.server.rpc.UnexpectedException: Service method
> 'public abstract boolean
>
> com.appspot.positivevoice.client.panels.blog.BlogService.saveBlog(com.appspot.positivevoice.client.models.BlogModel)'
> threw an unexpected exception: java.lang.NoClassDefFoundError: Could
> not initialize class com.mysql.jdbc.ConnectionImpl
>at
> com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
> 378)
>at
> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
> 581)
>
>
> Since the app works fine in hosted mode ( apart from those
> exceptions ) I am not even sure which files I should add to the
> post...
>
> Any idea much appreciated!
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: RichTextToolbar in Uibinder

2010-06-02 Thread Tristan
you're going to have to be more specific. There are many ways of
hooking up MVP and UiBinder together, what way are you using?

Where are you putting your RichTextArea? What do your presenters and
views look like and how are they wired together?

On Jun 2, 3:19 pm, krz  wrote:
> Hello,
>
> For my programm i use MVP, and UIbinder for drawing the GUI. i wanted
> to create an RichTextArea with the toolbar ( richTextToolbar), i spend
> now 2 hours trying things out, im totaly frustrated, and dont know how
> to do it... can anyone help me?

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



Re: Prompt Message Box in View

2010-06-02 Thread Tristan
what about:

1. user clicks "add new item"
2. presenter does onAddNewItem() and calls getView().showNamePrompt()
3. user types in the name to name prompt and click "save"
4. presenter does onSave() and calls getView().getName()

this keeps it separate yes?

On Jun 2, 1:46 pm, Spring  wrote:
> Hello,
> When using the MVP pattern, how should I display alerts or message
> boxes prompting the user for information? For example, the user clicks
> a button to add a new item and I prompt for the name. Where should
> this prompt happen? In the View class? In the Presenter? The presenter
> is where I have added the listener and the prompt should happen when
> the user clicks the add button. I could do this in the presenter, when
> the listener is triggered, but I do not wish to have UI elements in
> the Presenter. The new name obtained from the prompt needs to be
> passed back to the presenter.

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



Re: How to read web.xml parameters from GWT

2010-06-02 Thread Manuel Carrasco Moñino
You must override the init method:

public class GreetingServiceImpl extends RemoteServiceServlet
implements GreetingService {
 private String strHost;
 public void init(ServletConfig config) throws ServletException {
super.init(config);
String strHost = config.getServletContext().getInitParameter("dbHost");
  }
}

-Manolo

On Mon, May 31, 2010 at 10:53 AM, MickeyMiner
 wrote:
> Hi,
>
> How do I read parameters stored in /WEB-INF/web.xml from my
> GreetingServiceImpl class?
>
> After I insert following snipplet int web.xml:
>
> 
>   dbHost
>   192.168.120.120
> 
> 
>   dbName
>   my_database
> 
>
> Is anything like this possible:
>
> public class GreetingServiceImpl extends RemoteServiceServlet
> implements GreetingService {
>   public String greetServer(String input) throws
> IllegalArgumentException {
>      Series parameters = getContext().getParameters();
>      String strHost = parameters.getFirstValue("dbHost");
>      String strName = parameters.getFirstValue("dbName");
>      return "The target database is " + strName + "@" + strHost;
>   }
> }
>
>
> Thanx for your help and cheers!
>
> mm
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



gwt compile issue

2010-06-02 Thread gerald
I have a project based on gwt-ext. This project import some third-
party jars. However it didn't compile successfully because the gwt
complier couldn't find the java source code of these third-party jars.
That means that we must have the java source code in the jar package
or in the classpath, otherwise, the project complie fail. However my
project is a util, and i dont want to expose my source as it serve as
3rd jar, how can i do?

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



Re: HttpSession Expiration Notice?

2010-06-02 Thread kozura
Probably much easier is to just do a client-side timeout using a
Timer, not likely worth it to set up server push just for this.  Of
course any calls to the server should also check whether the timeout
has been surpassed, and if so return a response that also times out
the page.

On Jun 2, 7:09 pm, rileyscott  wrote:
> Hi All,
>
> I need a session expired notice added to my application. This is
> similar to Internet banking websites where they expire your session if
> it remains idle for too long.
>
> When a user's session has expired on the server, then the server will
> send a message to the browser. When the browser receives this message
> it will display a pop-up message to the user that their session has
> expired.
>
> So effectively, I need a server-push mechanism when the session
> expires. I've been researching gwt-comet. It looks promising but not
> sure if I'm overthinking the problem.
>
> Any ideas on how to put together a solution?
>
> Thanks!

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



Re: IE7,IE8 clicking #fragmented links does not call the history listener

2010-06-02 Thread davidroe
I can remember a similar situation on a project where links like topic1 misbehaved in IE and were substituted for
something like topic1

HTH,
/dave

On May 24, 10:39 pm, Rares  wrote:
> Hello everyone,
> I have a burning problem and I am as always running out of time.
> We are using GWT 2.0.3 to generate a page (/site.htm) that has links
> inside like this /site.htm#/topic/1 or /site.htm/group/1 and so forth.
>
> In IE7 and 8 only clicking one of those links only changes the URL of
> the browser but does not actually do the navigation. (Again,
> everything works fine in all the other browsers. Damn you MS$ !).
>
> Has anyone encountered this problem? Could you please point me towards
> a fix? I've searched the web for similar reports but found nothing.
>
> Thank you in advance,
> Rares

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



Re: GWT 2.0

2010-06-02 Thread Sripathi Krishnan
>
> java.lang.Class.getCanonicalName()Ljava/lang/String;


Can you double check your JDK Version? Do you have multiple versions of JRE
libraries in your classpath?

--Sri


On 1 June 2010 15:24, Kapil Kulkarni  wrote:

> Hi,
> I am new to GWT and in learning mode.
> I working with GWT 2.0 / Eclipse 3.5 / JDK 1.5 / IE 8.0
>
> As per getting started guide if I paste the url which i get in
> deployment mode to IE 8.0, then I get following
> but browser is not displaying "text box"
>
> Web Application Starter Project
>
> Please enter your name:
>
>
> And in eclipse I am getting following error:
>
> 09:50:37.302 [ERROR] [test_gwt] Failed to create an instance of
> 'com.kapil.test.client.Test_GWT' via deferred binding
> java.lang.RuntimeException: Deferred binding failed for
> 'com.kapil.test.client.GreetingService' (did you forget to inherit a
> required module?)
>at
> com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:43)
>at com.google.gwt.core.client.GWT.create(GWT.java:98)
>at com.kapil.test.client.Test_GWT.(Test_GWT.java:36)
>at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> Source)
>at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source)
>at java.lang.reflect.Constructor.newInstance(Unknown Source)
>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(Unknown Source)
> Caused by: java.lang.NoSuchMethodError:
> java.lang.Class.getCanonicalName()Ljava/lang/String;
>at
>
> com.google.gwt.user.rebind.rpc.ProxyCreator.getSourceWriter(ProxyCreator.java:
> 759)
>at
> com.google.gwt.user.rebind.rpc.ProxyCreator.create(ProxyCreator.java:
> 225)
>at
>
> com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator.generate(ServiceInterfaceProxyGenerator.java:
> 57)
>at
>
> com.google.gwt.dev.javac.StandardGeneratorContext.runGenerator(StandardGeneratorContext.java:
> 418)
>at
> com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:
> 38)
>at com.google.gwt.dev.shell.StandardRebindOracle
> $Rebinder.tryRebind(StandardRebindOracle.java:108)
>at com.google.gwt.dev.shell.StandardRebindOracle
> $Rebinder.rebind(StandardRebindOracle.java:54)
>at
>
> com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:
> 154)
>at
>
> com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:
> 119)
>at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:
> 531)
>at
> com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
> 414)
>at
> com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39)
>at com.google.gwt.core.client.GWT.create(GWT.java:98)
>at com.kapil.test.client.Test_GWT.(Test_GWT.java:36)
>at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> Source)
>at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source)
>at java.lang.reflect.Constructor.newInstance(Unknown Source)
>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(Unknown Source)
>
> 09:50:37.369 [DEBUG] [test_gwt] Rebinding
> com.google.gwt.core.client.impl.SchedulerImpl
> 09:50:37.380 [WARN] [test_gwt] For the following type(s), generated
> source was never committed (did you forget to call commit()?)
> 09:50:37.427 [WARN] [test_gwt]
> com.kapil.test.client.GreetingService_Proxy
> 09:50:37.489 [ERROR] [test_gwt] Unable to load module entry point
> class com.kapil.test.client.Test_GWT (see associated exception for
> details)
> 09:50:37.531 [ERROR] [test_gwt] Failed to load module 'test_gwt' from
> user agent 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64;
> Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
> 3.0.30729; Media Center PC 6.0; MASN)' at 127.0.0.1:49935
>
> Any idea what's causing this issue?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to t

Re: How do you connect to External RPC Service? In other words, can you expose RPC services to outside world by sharing only client/shared pieces?

2010-06-02 Thread Sripathi Krishnan
Its not a GWT limitation, its a browser restriction - Same Origin Policy.

There are ways to workaround the limitation. In your case, you can setup a
proxy server to forward the requests from one domain to another. Apache
mod_proxy can help you with this.

For example, suppose you have http://rpc.example.com/MyRpcService and
http://UI.AnotherExample.com/. You can setup Apache to forward requests from
http://UI.AnotherExample.com/services/* to rpc.example.com. Then, you'd
configure your RPC client to send requests to "../services/MyRpcService".
Since the browser is sending the request to the same domain, everything
works fine.

It works well (we have our production systems working that way), but I don't
recommend using it unless you have run out of options.

--Sri


On 1 June 2010 11:35, Umesh Adtani  wrote:

> I have a RPC servlet that I would like to make available to other GWT
> application developers.  The problem that I currently see is that
> GWT.create() requires the service to be
> deployed on the same host where the GWT application is deployed.
> There is no way to do something like
> GWT.create(,) to
> create the handle to the service.
>
> From client's perspective, this means that if your GWT application
> talks to multiple RPC services hosted on various different hosts, then
> there is no way to talk to those services even if you have shared and
> client code-base (containing interfaces, asyncs etc) available to you
> in some form of jar files.  Is there a way to get this working in
> current GWT versions?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



HttpSession Expiration Notice?

2010-06-02 Thread rileyscott
Hi All,

I need a session expired notice added to my application. This is
similar to Internet banking websites where they expire your session if
it remains idle for too long.

When a user's session has expired on the server, then the server will
send a message to the browser. When the browser receives this message
it will display a pop-up message to the user that their session has
expired.

So effectively, I need a server-push mechanism when the session
expires. I've been researching gwt-comet. It looks promising but not
sure if I'm overthinking the problem.

Any ideas on how to put together a solution?

Thanks!

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



Re: Simple working example of the Data Presentation Widget CellTable

2010-06-02 Thread Andrew
The following code is what I'm woking on, hope it can help you:

protected void init() {
VerticalPanel container = new VerticalPanel();
initWidget(container);

int pageSize = 10;
CellTable cellTable = new CellTable(pageSize);
setColumns(cellTable);
setSelectionModel(cellTable);

setDataSize(cellTable);
int pageStart = 0;
loadData(pageStart, pageSize, cellTable);

SimplePager pager = createPager(cellTable);

container.add(cellTable);
container.add(pager);
}

private SimplePager createPager(final CellTable
cellTable) {
SimplePager pager = new SimplePager(cellTable,
SimplePager.TextLocation.CENTER) {
public void onRangeOrSizeChanged(PagingListView 
listView) {
loadData(listView.getPageStart(), 
listView.getPageSize(),
listView);
super.onRangeOrSizeChanged(listView);
}
};
return pager;
}

private void setColumns(CellTable cellTable) {
cellTable.addColumn(new TextColumn() {
@Override
public String getValue(User user) {
return user.getName();
}
}, new TextHeader("Name"));

cellTable.addColumn(new TextColumn() {
@Override
public String getValue(User user) {
return user.getLocation();
}
}, new TextHeader("Location"));
}

private void setSelectionModel(CellTable cellTable) {
final SingleSelectionModel selectionModel = new
SingleSelectionModel();
SelectionChangeHandler selectionHandler = new
SelectionChangeHandler() {
@Override
public void onSelectionChange(SelectionChangeEvent 
event) {
User user = selectionModel.getSelectedObject();
Window.alert(user.getId() + ": " + 
user.getName());
}
};
selectionModel.addSelectionChangeHandler(selectionHandler);
cellTable.setSelectionEnabled(true);
cellTable.setSelectionModel(selectionModel);
}

private void setDataSize(final PagingListView cellTable) {
employeeRequest.countUsers(new AsyncCallback() {
public void onFailure(Throwable caught) {
Window.alert("Request failure: " + 
caught.getMessage());
}

public void onSuccess(Integer result) {
cellTable.setDataSize(result, true);
}
});
}

private void loadData(int start, int size,
final PagingListView cellTable) {
employeeRequest.getUsers(start, size,
new AsyncCallback>() {
public void onFailure(Throwable caught) 
{
Window.alert("Request failure: 
" + caught.getMessage());
}

public void onSuccess(PagingData 
result) {

cellTable.setData(result.getStart(),

result.getLength(), result.getValues());
}
});
}

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



GWT hostmode in weblogic

2010-06-02 Thread GWT_novice
i am very new to GWT. I want deploy GWT app in weblogic app server
instead of using in-built jetty. Can someone let me know how to do
that? I googled it but not much info regarding set up in weblogic.
Thanks in advance.

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



error while invoking java method using jsni

2010-06-02 Thread gerald
When I invoke java method 'func2(JavaScriptObject str)' using jsni, an
error occurs when the type of argument 'str' is javascript string
type, such as var ss = 'aabbcc', However, the method 'func2' does work
while its argument is JavaScriptObject type. In addition, this error
only happen in the dev mode. When I compile the whole module, and run
it in IE6, it works fine. So, I want to know what happen to it. Is it
a potential bug that exists in GWT? The following is the code:

 public class JsniErrorTest implements EntryPoint {
protected static native void func1()/*-{
debugger;
var ss = 'aabbcc'; //error
var obj = new Object();//ok. because it is javascript object 
type
//can't run in dev mode

@com.sxf.errtest.client.JsniErrorTest::func2(Lcom/google/gwt/core/
client/JavaScriptObject;)(ss);
}-*/;

public static void func2(JavaScriptObject str){
System.out.println(str);
}

/**
 * This is the entry point method.
 */
public void onModuleLoad() {
final Button sendButton = new Button("interface impl");

ClickHandler handler = new ClickHandler() {

@Override
public void onClick(ClickEvent event) {

func1();

}
};
sendButton.addClickHandler(handler);
RootPanel.get().add(sendButton);
}
 }

the error:

11:18:31.000 [ERROR] [jsnierrortest] Uncaught exception escaped
java.lang.ClassCastException: null
at java.lang.Class.cast(Class.java:2990)
at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:166)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:65)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
157)
at
com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:
1713)
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
165)
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.sxf.errtest.client.JsniErrorTest.func1(JsniErrorTest.java)
at com.sxf.errtest.client.JsniErrorTest
$1.onClick(JsniErrorTest.java:34)
at
com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:
54)
at
com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:1)
at com.google.gwt.event.shared.HandlerManager
$HandlerRegistry.fireEvent(HandlerManager.java:65)
at com.google.gwt.event.shared.HandlerManager
$HandlerRegistry.access$1(HandlerManager.java:53)
at
com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:
178)
at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:52)
at
com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:
116)
at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:
100)
at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1307)
at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1263)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
157)
at
com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:
1713)
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
165)
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.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)

Re: Hibernate problems after deploying to google appspot

2010-06-02 Thread Paul Grenyer
Emma

It sounds like you haven't deployed the mysql driver.

Paul

-Original Message-
From: Emma Cole 
Date: Mon, 31 May 2010 16:46:59 
To: Google Web Toolkit
Cc: 
Subject: Hibernate problems after deploying to google appspot

Hi all,

I have an application which uses hibernate that runs fine in hosted
mode, but no longer when deployed.
Here's the details:

In hosted mode it connects to a database that resides on a remote
server.
Connection details set in hibernate.cfg.xml

When run I it get a long stacktrace with errors similar to the
following:

SEVERE: Unable to instrument
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
$ValueWriter$8. Security restrictions may not be entirely emulated.

Which apparently has to do with the fact that it's being run in hosted
mode, and I read that it can be ignored.
The application saves and retrieves data without problems.

After deploying it on appspot and when I try to save a new row in a
table I get this:

javax.servlet.ServletContext log: Exception while dispatching incoming
RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract boolean
com.appspot.positivevoice.client.panels.blog.BlogService.saveBlog(com.appspot.positivevoice.client.models.BlogModel)'
threw an unexpected exception: java.lang.NoClassDefFoundError: Could
not initialize class com.mysql.jdbc.ConnectionImpl
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
378)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
581)


Since the app works fine in hosted mode ( apart from those
exceptions ) I am not even sure which files I should add to the
post...

Any idea much appreciated!

Thanks

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

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



Re: Error during File IO in ServiceImpl class

2010-06-02 Thread Sripathi Krishnan
This isn't a GWT problem, its a GAE problem, and you are more likely to get
an answer on that forum. But from what I know ...

.. you can read files that are present in the war file, but you still cannot
read it as a File. Instead, you should read it from the classpath, like
this
this.getClass().getClassLoader().getResourceAsStream("filename.csv")

where filename.csv is in WEB-INF/classes folder

--Sri


On 2 June 2010 04:14, rahulmalviya  wrote:

> Hi I tried to read a csv file in ServiceImpl class but i am getting
> access denied error. Please tell me how I can handle File IO in Google
> web application. I read through other posts related to my error but
> they say it is related to Google app engine and if i place file under /
> war/WEB-INF directory I can read a file. But still I get the same
> error.
>
> Error trace:
>
> SEVERE: [127543223253] javax.servlet.ServletContext log: Exception
> while dispatching incoming RPC call
> com.google.gwt.user.server.rpc.UnexpectedException: Service method
> 'public abstract java.util.List
> testFMIP.client.GreetingService.getFileData()' threw an unexpected
> exception: java.security.AccessControlException: access denied
> (java.io.FilePermission /war/WEB-INF/web.xml read)
>at
> com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
> 378)
>at
> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
> 581)
>at
>
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
> 188)
>at
>
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
> 224)
>at
>
> com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
> 62)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> 511)
>at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1166)
>at
>
> com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
> 51)
>at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>at
>
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
> 43)
>at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>at
>
> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
> 122)
>at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
> 388)
>at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
> 216)
>at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
> 182)
>at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
> 765)
>at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> 418)
>at
>
> com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
> 70)
>at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 152)
>at com.google.appengine.tools.development.JettyContainerService
> $ApiProxyHandler.handle(JettyContainerService.java:349)
>at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 152)
>at org.mortbay.jetty.Server.handle(Server.java:326)
>at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 542)
>at org.mortbay.jetty.HttpConnection
> $RequestHandler.content(HttpConnection.java:938)
>at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
>at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
>at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
> 409)
>at org.mortbay.thread.QueuedThreadPool
> $PoolThread.run(QueuedThreadPool.java:582)
> Caused by: java.security.AccessControlException: access denied
> (java.io.FilePermission /war/WEB-INF/web.xml read)
>at
>
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:
> 323)
>at
> java.security.AccessController.checkPermission(AccessController.java:
> 546)
>at java.lang.SecurityManager.checkPermission(SecurityManager.java:
> 532)
>at com.google.appengine.tools.development.DevAppServerFactory
> $CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
>at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
>at java.io.FileInputStream.(FileInputStream.java:100)
>at java.io.FileInputSt

Re: SerializerBase.check(String,int) throws useless exception?

2010-06-02 Thread Sripathi Krishnan
Confirm that all classes participating in RPC -

   1. implement Serializable
   2. have a zero-argument constructor

Most of the times I forget zero-argument constructor, and that's when I get
errors similar to what you have pasted.

--Sri


On 31 May 2010 20:23, svincent  wrote:

> Greetings,
>
> I'm having a frustrating time debugging a bunch of code I'm trying to
> port to GWT.  There are various subtle serialization issues (not
> surprising, since GWT has its special rules).
>
> The real problem I'm running in to is that the exception I keep
> getting is this:
>
> com.google.gwt.user.client.rpc.SerializationException: null
>at
>
> com.google.gwt.user.client.rpc.impl.SerializerBase.check(SerializerBase.java:
> 161)
>at
>
> com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:
> 145)
>at
>
> com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:
> 199)
> ...
>
> This exception is terrible: it doesn't tell me what class is having
> the trouble.  It tries to print out the 'typeSignature', but the
> typeSignature is null for classes with certain types of serialization
> issues.
>
> A couple of thoughts:
>
> 1. it would be Really Nice if GWT could be changed to fix this
> exception to be more meaningful (at least include the class name
> that's having the trouble)
>
> 2. Does anybody have tips on what to do when you get this exception?
> I've encountered one case: don't have fields of type java.lang.Object
> in your GWT Serializable classes.  Is there more?
>
> Thanks!
>-Shawn.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



How do I detect Mouse Up, Mouse Out, Mouse Over, etc on Grid Cells?

2010-06-02 Thread spierce7
I need to be able to do this efficiently in a 50X8 Grid. I need it for
the individual cells within the grid. It seems that all I can get to
work on my grid is a simple click handler.

Grid.addClickHandler(this);
and then whenever a click event occurs (a click down and then a click
up in the same cell), it fires public void onClick(ClickEvent event).
I need much more usability than this for my individual cells.

I was playing around with the idea of possibly adding a blank html
object to each of the cells and having it fill the cells, but this
seems like it would be slow, and I would run into some problems down
the road with table borders. Is there a way that I could access the
Grids native HTML cell objects themselves? If I could somehow access
those I would be able to add click handlers and what not. Still not an
ideal method, but better than adding my own HTML panels and dealing
with border issues.

Do I have any other options?

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



Re: refresh page in GWT

2010-06-02 Thread kozura
Literally 2 seconds of search turns up:

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/429cbf743328c9a9/938fb8df06bf9cd5

On May 31, 1:30 pm, ahmed saleh  wrote:
> hello-
> i have a big GWT application have more than  50 composites ,i have
> big issue when customer, refresh the application , the browser reload
> all application again and back user to home page , i need solve this
> issue
>
> Ahmed Saleh
> Senior Software engineer
> +2 010 3580 355

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



Re: JSNI Methode call does not work...

2010-06-02 Thread kozura
Your method signature doesn't match your class (String x3).  Also, use
int and I for signature instead of the Integer class.

On May 31, 2:53 pm, Go2one  wrote:
> Hi,
>
> I've the following Class:
>
> public class Designer {
>  private final native JavaScriptObject addNode() /*-{
>    alert("Pre JSNI call");
>
> th...@de.go2one.sdui.client.processdesigner.processdesigner::sendNode(Ljava/
> lang/String;Ljava/lang/Integer;Ljava/lang/Integer;)("TEST", 100, 100);
>    alert("Post JSNI call");
>
> }
>
> void sendNode(String id, String x, String y) {
>    GWT.log("sendNode() called");
>
> }
> }
>
> When addNode  is called, "Pre JSNI Call"-Alert is shown. After the
> click on "OK", an JS-Error is thrown:
>
> Details zum Fehler auf der Webseite
>
> Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1;
> Trident/4.0)
> Zeitstempel: Mon, 31 May 2010 20:52:56 UTC
>
> Meldung: Annahme ausgelöst und nicht aufgefangen.
> Zeile: 36
> Zeichen: 7
> Code: 0
> URI:http://localhost:8080/desk/desk/hosted.html?desk
>
> Any ideas what I'm doing wrong?
> Thanks!

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



History.newItem() and History.getToken() and encoding url fragment (Does not happen in FF)

2010-06-02 Thread Sky
History.newItem() and History.getToken() are supposed to
encodeURIComponent and decodeURIComponent respectively. I looked into
the implemented native methods and they sure appear to do that.

However, in FF 3.5 the encoding does not happen. My browser URL shows
normal spaces instead of %20.

In IE8 the encoding does happen.

Is this a big deal or what?

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



Re: GWT 2.0.3 + Tree widget + get tree level of selected TreeItem - Problem

2010-06-02 Thread Jim Douglas
Follow the chain of getParentItem() until it returns null.

http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/client/ui/TreeItem.html#getParentItem()

On Jun 2, 3:25 am, junior  wrote:
> Hejsan
> I am building GWT Tree and need to get information about level of
> current opened TreeItem. Let me describe more detail.
> I build up first level(Sport List) of tree so it looks like:
> + Athletics
> + Ice Hockey
> + Footbal
>
> Second level(Countries List) must looks like:
> + Athletics
> + Ice Hockey
>    + Canada
>    + USA
>    + Russia
> + Footbal
>
> Third level(League List) must looks like:
> + Athletics
> + Ice Hockey
>    + Canada
>       + Tournament
>       + 1.League
>       + 2.League
>       + AAA League
>    + USA
>    + Russia
> + Footbal
>
> Why I need info abou opened TreeItem? By level of opened TreeItem fire
> up different SELECT of database so if I open up "+ Ice Hockey" - it's
> first level, then I fire up SELECT on database to get list of
> countries for sport "Ice Hockey". Next if I open up country "+ Canada"
> then fire up SELECT on databases to get list of all leagues at country
> "Canada" for sport "Ice Hockey".
>
> I call open handler for Tree for TreeItem like this:
>
> // Add a handler that automatically generates some children
>                 statTree.addOpenHandler(new OpenHandler() {
>
>                         public void onOpen(OpenEvent event) {
>                                 // tree item that was clicked
>                                 TreeItem itemSelected = event.getTarget();
>                                 if (itemSelected.getChildCount() == 1) {
>                                         // Close item immediately
>                                         itemSelected.setState(false, false);
>
>                                         // Add a random number of children to 
> the item
>                                         String itemText = 
> itemSelected.getText();
>
>                                         // different request to database, 
> according level of TreeItem
>                                         // ??
>
>                                         // just temporary dummy data
> of subtree items
>                                         int numChildren = Random.nextInt(5) + 
> 2;
>                                         for (int i = 0; i < numChildren; i++) 
> {
>                                                 // tree item to be added
>                                                 TreeItem childDescendant = 
> itemSelected
>                                                                 
> .addItem(itemText + "." + i);
>                                                 
> System.out.println("\ncildDescendant index: "
>                                                                 + 
> itemSelected.getChildIndex(childDescendant));
>                                                 childDescendant.addItem("");
>                                         }
>
>                                         // Remove the temporary item when we 
> finish loading
>                                         itemSelected.getChild(0).remove();
>
>                                         // Reopen the item
>                                         itemSelected.setState(true, false);
>                                 }
>                         }
>                 });
>
> Please help me with this problem, I'd appreciate it.
> junior

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



Re: Getting a 503 Error.

2010-06-02 Thread Prashant Hegde
Probably your server has exited following a exception during 
initialization Does the console show some exceptions ?


On 03-06-2010 04:12, ike wrote:

Hey...

I am using the plugin for Eclipse. There are no errors in my code
according to Eclipse, but when I run the code, it gives me a screen
like this:

HTTP ERROR: 503

SERVICE_UNAVAILABLE

RequestURI=/In2Solar.html

Powered by jetty://


Is there someplace I could look to find out what is happening???


Thanks.

   


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



Prompt Message Box in View

2010-06-02 Thread Spring
Hello,
When using the MVP pattern, how should I display alerts or message
boxes prompting the user for information? For example, the user clicks
a button to add a new item and I prompt for the name. Where should
this prompt happen? In the View class? In the Presenter? The presenter
is where I have added the listener and the prompt should happen when
the user clicks the add button. I could do this in the presenter, when
the listener is triggered, but I do not wish to have UI elements in
the Presenter. The new name obtained from the prompt needs to be
passed back to the presenter.

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



firefox gwt issues

2010-06-02 Thread Sam Phippen
When I attempt to load my gwt app in firefox (f13, x64) with the
plugin installed I still get the screen telling me to install the
plugin. I also get a drop down at the top saying "additional plugins
are required to display all media on this page"

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



Re: GWT Design Problem

2010-06-02 Thread Frederic Conrotte
Hello

You should check this book:
http://apress.com/book/view/9781590599853

And the associated website:
http://code.google.com/p/tocollege-net/

It mix both HTML/Freemarker templates with GWT modules.

Fred

On 1 juin, 18:02, ping2ravi  wrote:
> Hi All,
> I am trying to create a website and stuck with confusion over whether
> to use GWT for presentation or JSP based framework like Spring MVC. I
> want UI to be very user friendly,faster etc and this is possible with
> GWT. But following problem comes with GWT
>
> 1) Book marking of any page. As GWT is suppose to be one url
> application and everything should come under it. But how i will solve
> the problem if i have a site like Facebook, where url can be for User
> profile(/profile/1), My Home(/home), community(/cpmm),video(/video)
> etc. I can solve it by using one html and keeping everything as
> params(i.e. /myapp.htm?type=profile&id=1) but then i feel its not how
> GWT should be used or is this the only way i will be able to use it.
>
> 2) Not searchable by Search Engines. Search engine can not see what
> the content is as it always comes through RPC calls.
>
> 3) Implementing History is Overhead, if i fix the issue 1
>
> 4) Its not possibkle to mix jsps and GWT. I tried but GWT css start
> interfaring with my CSS, first starting with changing background
> color.
>
> But i still like GWT but not sure how i will solve these problems.
>
> Any suggestions/comments most welcome.
>
> Thanks,
> Ravi

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



GWT Custom Events

2010-06-02 Thread Ciarán
Hey I have a problem getting my head around how custom GWT event
Handlers work. I have read quite a bit about the topic and it still is
some what foggy. I have read threads on Stackoverflow like this one
http://stackoverflow.com/questions/998621/gwt-custom-event-handler but
still some what lost .Could someone explain it in an applied mannar
such as the following.

I have 2 classes a block and a man class. When the man collides with
the block the man fires an event ( onCollision() ) and then the block
class listens for that event.

Thanks

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



RichTextToolbar in Uibinder

2010-06-02 Thread krz
Hello,

For my programm i use MVP, and UIbinder for drawing the GUI. i wanted
to create an RichTextArea with the toolbar ( richTextToolbar), i spend
now 2 hours trying things out, im totaly frustrated, and dont know how
to do it... can anyone help me?

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



Eclipse Modeling Framework (EMF) port to GWT

2010-06-02 Thread Ed Merks
I'm busy refining EMF's support for GWT:

  
http://wiki.eclipse.org/EMF/New_and_Noteworthy/Helios#Support_for_Google_Web_Toolkit_.28GWT.29

One of the problems I have is that I need to support converting date
instances to and from a string representation, in particular, one that
conforms to XMLSchema's dataTime format. I have that working nicely in
regular Java with SimpleDateFormat, but that's not supported by GWT.
So I ported it to use DateTimeFormat.  That's working nicely too. But
now, after more testing, I realize that DateTimeFormat doesn't work on
the server, because it depends on locale stuff, which the server
doesn't support.  That's unfortunate because the format I'm producing
isn't actually locale specific.  In any case, what I really want is a
single library that works for both the client and the server. I get
the sense that I need two different implementations, a default one
that's good on the client, and a different one that works on the
server.

There are many tricks I could play if this were all pure Java.  I've
done similar things to make EMF work both within Eclipse and as stand
alone jars.  But I'm all out of ideas for how to make this work with
GWT and I was hoping someone would have a good suggestion.  As an
example of an approach I might use is:

if (GWT.isClient())
{
  // Use DateTimeFormat
}
else
{
  // Use SimpleDateFormat
}

That doesn't work of course because the GWT compiler will complain
about SimpleDateFormat even though that code path will never be taken
on the client.  I thought the GWT compiler might prune out the
unreachable branch.  If I could move the "else" part to a different
method and mark that whole method as to-be-ignored by the GWT
compiler, that would make me happy too, but I didn't find any
annotation that would direct the GWT compiler to ignore something.

Another approach I could take is to inject different implementations
depending on where I'm running, client or server.  That's certainly
feasible, but where to put the initialization code?  To make it
easier, I could have a default implementation that works on the client
and then in the case of running on the server, initialization code
would inject one that works for the server.  I could a call to such a
hook in every XyzServiceImpl, full Java is allowed there, but that's
easy to forget and kind of annoying.  How could I ensure that such
server-specific, won't-compile-with-GWT, initialization code is
invoked once for the server?

Any other ideas for how I could maintain a single source/library/
project that adaptively works for both the client and the server based
on different implementation classes?

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



GWT 2.0.3 + Tree widget + get tree level of selected TreeItem - Problem

2010-06-02 Thread junior
Hejsan
I am building GWT Tree and need to get information about level of
current opened TreeItem. Let me describe more detail.
I build up first level(Sport List) of tree so it looks like:
+ Athletics
+ Ice Hockey
+ Footbal

Second level(Countries List) must looks like:
+ Athletics
+ Ice Hockey
   + Canada
   + USA
   + Russia
+ Footbal

Third level(League List) must looks like:
+ Athletics
+ Ice Hockey
   + Canada
  + Tournament
  + 1.League
  + 2.League
  + AAA League
   + USA
   + Russia
+ Footbal

Why I need info abou opened TreeItem? By level of opened TreeItem fire
up different SELECT of database so if I open up "+ Ice Hockey" - it's
first level, then I fire up SELECT on database to get list of
countries for sport "Ice Hockey". Next if I open up country "+ Canada"
then fire up SELECT on databases to get list of all leagues at country
"Canada" for sport "Ice Hockey".

I call open handler for Tree for TreeItem like this:

// Add a handler that automatically generates some children
statTree.addOpenHandler(new OpenHandler() {

public void onOpen(OpenEvent event) {
// tree item that was clicked
TreeItem itemSelected = event.getTarget();
if (itemSelected.getChildCount() == 1) {
// Close item immediately
itemSelected.setState(false, false);

// Add a random number of children to 
the item
String itemText = 
itemSelected.getText();

// different request to database, 
according level of TreeItem
// ??

// just temporary dummy data
of subtree items
int numChildren = Random.nextInt(5) + 2;
for (int i = 0; i < numChildren; i++) {
// tree item to be added
TreeItem childDescendant = 
itemSelected

.addItem(itemText + "." + i);

System.out.println("\ncildDescendant index: "
+ 
itemSelected.getChildIndex(childDescendant));
childDescendant.addItem("");
}

// Remove the temporary item when we 
finish loading
itemSelected.getChild(0).remove();

// Reopen the item
itemSelected.setState(true, false);
}
}
});


Please help me with this problem, I'd appreciate it.
junior

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



Problem deploying RPC application to jetty

2010-06-02 Thread shirin
Hi
I posted this error before. I did lots of thing but still without
success
let me give some more details:
say my project name is gwtexample
and my servlet class name is myServlet
in web.xml I defined

 
 /gwtexample/myServlet


then I deploy every things in jetty server in a remote server
the path of deployed project in jetty is something like this:
/webapps/root/gwtexample
and inside the "gwtexample" I have every things: my Gwtexample.html
file, resources and also another gwtexample folder which contains js
files (that one which is produced by GWT at compile time).

when I try to run the application, I see this line in jetty's log file
"POST /gwtexample/gwtexample/myServlet HTTP/1.1" 404 1239

I can not put everything just simply in root folder in order to get
rid of extra "gwtexample". So, how can I fix the problem. any solution?

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



Hibernate problems after deploying to google appspot

2010-06-02 Thread Emma Cole
Hi all,

I have an application which uses hibernate that runs fine in hosted
mode, but no longer when deployed.
Here's the details:

In hosted mode it connects to a database that resides on a remote
server.
Connection details set in hibernate.cfg.xml

When run I it get a long stacktrace with errors similar to the
following:

SEVERE: Unable to instrument
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
$ValueWriter$8. Security restrictions may not be entirely emulated.

Which apparently has to do with the fact that it's being run in hosted
mode, and I read that it can be ignored.
The application saves and retrieves data without problems.

After deploying it on appspot and when I try to save a new row in a
table I get this:

javax.servlet.ServletContext log: Exception while dispatching incoming
RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract boolean
com.appspot.positivevoice.client.panels.blog.BlogService.saveBlog(com.appspot.positivevoice.client.models.BlogModel)'
threw an unexpected exception: java.lang.NoClassDefFoundError: Could
not initialize class com.mysql.jdbc.ConnectionImpl
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
378)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
581)


Since the app works fine in hosted mode ( apart from those
exceptions ) I am not even sure which files I should add to the
post...

Any idea much appreciated!

Thanks

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



Re: HOWTO Implement A Drop Down Check Box List

2010-06-02 Thread Garin Yan
Hi All,

I have found this on
http://www.smartclient.com/smartgwt/showcase/#multi_select_new_category .

Thanks you all the same.

Garin

On Tue, Jun 1, 2010 at 3:20 PM, Guoyu Yan  wrote:

> Hi All,
>
> I got some problem on HOWTO implement a drop down check box list.
> Could you give me some ideas to do this. I have done some research on
> Creating Custom Widgets but I still don't have any idea about it.
>
> Thanks,
>
> Garin




-- 
Garin Yan

Software Engineer, International Service
Founder International Co.,Ltd.
Address: Suzhou International Science Park (Phase V)
 328 Xinghu Rd., Suzhou, Jiangsu, P.R.China, 215123
Tel:+86 512 86665500-7063  Fax:+86 512 87183808  Cell:151 0621 9276
yangu...@gmail.com  ||  www.founderinternational.com

Enjoying 20 years of success satisfying global leaders with every IT need --
Founder’s 30,000 employees are committed to helping you succeed.

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



Problem deploying RPC application to jetty

2010-06-02 Thread shirin
Hi
I have a RPC application , very simple with just one servlet class in
server package. it runs good locally but when I deploy it in jetty in
a remote server it said that it can not find my servlet class
this jetty server has been configured before and has a specific
deploying strategy. For example every servlet class should be call so:

/servlet/OneServlet

and I can not change the jetty settings. I should make my project so
that it can work with this server.
I did whatever I could to handle this problem but so far no success.
Could you please help me for the matter?

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



looking for a proxyservlet for the jetty instance

2010-06-02 Thread alexl
hi, I tried a couple of proxy servlets but each time the engine says
such and such is a restricted class. I recompiled some of the
dependencies but after getting rid of ssl's for example then it
complained about inet address being a restricted class.

the reason I want a proxy is so it is easier to test in development
mode.

thx

java.net.InetAddress is a restricted class. Please see the Google
App Engine developer's guide for more details.

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



GWT 2.0

2010-06-02 Thread Kapil Kulkarni
Hi,
I am new to GWT and in learning mode.
I working with GWT 2.0 / Eclipse 3.5 / JDK 1.5 / IE 8.0

As per getting started guide if I paste the url which i get in
deployment mode to IE 8.0, then I get following
but browser is not displaying "text box"

Web Application Starter Project

Please enter your name:


And in eclipse I am getting following error:

09:50:37.302 [ERROR] [test_gwt] Failed to create an instance of
'com.kapil.test.client.Test_GWT' via deferred binding
java.lang.RuntimeException: Deferred binding failed for
'com.kapil.test.client.GreetingService' (did you forget to inherit a
required module?)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:43)
at com.google.gwt.core.client.GWT.create(GWT.java:98)
at com.kapil.test.client.Test_GWT.(Test_GWT.java:36)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
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(Unknown Source)
Caused by: java.lang.NoSuchMethodError:
java.lang.Class.getCanonicalName()Ljava/lang/String;
at
com.google.gwt.user.rebind.rpc.ProxyCreator.getSourceWriter(ProxyCreator.java:
759)
at
com.google.gwt.user.rebind.rpc.ProxyCreator.create(ProxyCreator.java:
225)
at
com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator.generate(ServiceInterfaceProxyGenerator.java:
57)
at
com.google.gwt.dev.javac.StandardGeneratorContext.runGenerator(StandardGeneratorContext.java:
418)
at
com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:
38)
at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.tryRebind(StandardRebindOracle.java:108)
at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.rebind(StandardRebindOracle.java:54)
at
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:
154)
at
com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:
119)
at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:
531)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
414)
at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39)
at com.google.gwt.core.client.GWT.create(GWT.java:98)
at com.kapil.test.client.Test_GWT.(Test_GWT.java:36)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
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(Unknown Source)

09:50:37.369 [DEBUG] [test_gwt] Rebinding
com.google.gwt.core.client.impl.SchedulerImpl
09:50:37.380 [WARN] [test_gwt] For the following type(s), generated
source was never committed (did you forget to call commit()?)
09:50:37.427 [WARN] [test_gwt]
com.kapil.test.client.GreetingService_Proxy
09:50:37.489 [ERROR] [test_gwt] Unable to load module entry point
class com.kapil.test.client.Test_GWT (see associated exception for
details)
09:50:37.531 [ERROR] [test_gwt] Failed to load module 'test_gwt' from
user agent 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64;
Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
3.0.30729; Media Center PC 6.0; MASN)' at 127.0.0.1:49935

Any idea what's causing 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Question About Constants(.properties) file of GWT

2010-06-02 Thread veeravelli kiran kumar
Hi All,
I am new to GWT and finding it difficult to understand this. I am
creating a GWT project,putting a constants file and retrieving them
via the constants interface. I am compiling this project and adding
the resources (just the .html ,.css and /project resources) generated
to a war file deployed in JBOSS AS . I am able to view the GWT page
without any problem. Does GWT write the constants into the javascript.
I am using the exact project structure as the GWT project in JBoss
project and placing the constants file in the appropriate location.
Now I am trying to change the constants from this constants file. But
the changes does not get reflected in the view page. What is the
reason behind this? I am finding it really difficult to understand
this can anyone help me in this regard.

Thanks
V Kiran Kumar

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



Simple working example of the Data Presentation Widget CellTable

2010-06-02 Thread saklig
Hi,

I want to create a working example of the CellTable widget that was
recently released in GWT 2.1 M1.
I'm having a hard time finding documentation for this widget, as
apparently it has not been written yet :-/

What I've tried so far:


List dataList = new ArrayList();
dataList.add("Pizza", 15);
dataList.add("Car", 4);


ListViewAdapter adapter = new
ListViewAdapter();
CellTable view = new CellTable(5);
adapter.addView(view);

RootPanel.get("cellTableDiv").add(view);

view.setData(0, stringList.size(), dataList);

adapter.refresh();

private class MyCellData{
private String name;
private int numberOfSomething;

public MyCellData(String name, int numberOfSomething){
  this.name = name;
  this.numberOfSomething = numberOfSomething;
}

public String getName(){
 return name;
}

public int getNumberOfSomething(){
 return numberOfSomething;
}
}



I'm not sure what to insert as parameter in the view.setData .

Could someone pleas give me a pointer or a map :-)

Thanks!

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



HOWTO Implement A Drop Down Check Box List

2010-06-02 Thread Guoyu Yan
Hi All,

I got some problem on HOWTO implement a drop down check box list.
Could you give me some ideas to do this. I have done some research on
Creating Custom Widgets but I still don't have any idea about it.

Thanks,

Garin

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



How do you connect to External RPC Service? In other words, can you expose RPC services to outside world by sharing only client/shared pieces?

2010-06-02 Thread Umesh Adtani
I have a RPC servlet that I would like to make available to other GWT
application developers.  The problem that I currently see is that
GWT.create() requires the service to be
deployed on the same host where the GWT application is deployed.
There is no way to do something like
GWT.create(,) to
create the handle to the service.

>From client's perspective, this means that if your GWT application
talks to multiple RPC services hosted on various different hosts, then
there is no way to talk to those services even if you have shared and
client code-base (containing interfaces, asyncs etc) available to you
in some form of jar files.  Is there a way to get this working in
current GWT versions?

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



About a multi page web application

2010-06-02 Thread MaveriK
Hi everyone.

I'm new in GWT, i've just begun to use GWT a couple of week ago.
My goal is to create a web app that shows a login page, and after the
log-in shows an interface where the user can interact with the system

So i was wondering if i need need a multi-page web app, or instead a
single-page switching the visibility of widgets on/off.
I though the first was the best solution as i don't have lots widgets
to manage in one page, but i can't fine a way to make multi-page web
app in GWT...
I read some posts from GWT discussion but i couldn't find out how to
do it.
Could someone help me out?

Tnx in adv

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



JSORestrictionsChecker Bug

2010-06-02 Thread Patrick Twohig
I'm getting this error while trying to compile code with subclasses of
JavaScriptObject.  I'm aware of this issue here:
http://groups.google.com/group/google-web-toolkit-contributors/browse_thread/thread/eaca6b6dbecd2c77/3b76790edc488222?show_docid=3b76790edc488222,
however in my case none of my classes are abstract.  Does anybody know
of a possible workaround until this is patched.  I'm having a really
hard time coming up with a testcase that reproduces the error.

com.google.gwt.dev.jjs.InternalCompilerException: Already seen an
implementing JSO subtype (CompositeImageOverlay) for interface (HasId)
while examining newly-added type (CharacterClassOverlay). This is a
bug in JSORestrictionsChecker.
at
com.google.gwt.core.ext.typeinfo.TypeOracle.computeSingleJsoImplData(TypeOracle.java:
702)
at com.google.gwt.core.ext.typeinfo.TypeOracle.finish(TypeOracle.java:
362)
at
com.google.gwt.dev.javac.TypeOracleMediator.addNewUnits(TypeOracleMediator.java:
359)
at
com.google.gwt.dev.javac.CompilationState.assimilateUnits(CompilationState.java:
135)
at
com.google.gwt.dev.javac.CompilationState.(CompilationState.java:
79)
at
com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:
286)
at
com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:
182)
at
com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:
280)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:502)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:414)
at com.google.gwt.dev.Compiler.run(Compiler.java:201)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
87)
at
com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:
81)
at com.google.gwt.dev.Compiler.main(Compiler.java:159)

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



refresh page in GWT

2010-06-02 Thread ahmed saleh
hello-
i have a big GWT application have more than  50 composites ,i have
big issue when customer, refresh the application , the browser reload
all application again and back user to home page , i need solve this
issue

Ahmed Saleh
Senior Software engineer
+2 010 3580 355

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



How to add new event to HandlerManager

2010-06-02 Thread justint
Hi,  I'm fairly new to GWT and I'm trying to add events to my
"eventBus"...

final HandlerManager eventBus = new HandlerManager(null);
..

eventBus.addHandler(RequestEvent.TYPE, new 
RequestEvent.Handler() {
public void onRequestEvent(RequestEvent requestEvent) {
if (requestEvent.getState() == State.SENT) {
System.out.println("RPC sent!");
}
}
});

This RequestEvent event works fine, but this doesn't work for
instance...or at least I don't think it works:
eventBus.addHandler(KeyPressEvent.getType(), new 
KeyPressHandler()
{
public void onKeyPress(KeyPressEvent arg0) {
System.out.println("Key pressed event!");
}
});

Any tips are greatly appreciated!

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



Using JavaScript Overlay Types for Nested JavaScriptObjects

2010-06-02 Thread powwow
I have this in my html and I can use JavaScriptOverlay types no
problem and it works:

 
var properties = {"width":640, "height":480};
 

public class Properties extends JavaScriptObject
{
protected Properties() { }

public final native String getWidthString() /*-{ return this.width; }-
*/;
public final native String getHeightString()  /*-{ return
this.height;  }-*/;
}



However, when I start nesting objects like below I do not know how to
extract the "property" object from "properties".



 
var properties = {"property":{"canvasWidth":1920, "canvasHeight":
1200, "width":640, "height":480, "fps":15, "bgcolor":"#FF"}};
 


What do I need to do to get the "properties" object, and then get to
the "property" object?

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



Re: GWT Design Problem

2010-06-02 Thread Frederic Conrotte
I advise you to take a look at this book:
http://apress.com/book/view/9781590599853

and the related website:
http://code.google.com/p/tocollege-net/

The books explains how you can nicely split your web application
between HTML/JSP pages and GWT modules

Fred

On Jun 1, 6:02 pm, ping2ravi  wrote:
> Hi All,
> I am trying to create a website and stuck with confusion over whether
> to use GWT for presentation or JSP based framework like Spring MVC. I
> want UI to be very user friendly,faster etc and this is possible with
> GWT. But following problem comes with GWT
>
> 1) Book marking of any page. As GWT is suppose to be one url
> application and everything should come under it. But how i will solve
> the problem if i have a site like Facebook, where url can be for User
> profile(/profile/1), My Home(/home), community(/cpmm),video(/video)
> etc. I can solve it by using one html and keeping everything as
> params(i.e. /myapp.htm?type=profile&id=1) but then i feel its not how
> GWT should be used or is this the only way i will be able to use it.
>
> 2) Not searchable by Search Engines. Search engine can not see what
> the content is as it always comes through RPC calls.
>
> 3) Implementing History is Overhead, if i fix the issue 1
>
> 4) Its not possibkle to mix jsps and GWT. I tried but GWT css start
> interfaring with my CSS, first starting with changing background
> color.
>
> But i still like GWT but not sure how i will solve these problems.
>
> Any suggestions/comments most welcome.
>
> Thanks,
> Ravi

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



GWT 2.0.3 + Tree widget + get tree level of selected TreeItem - Problem

2010-06-02 Thread junior
Hejsan,
I am building dynamic Tree Widget. First Level I done with no problem
so it look like:

+ Atletics
+ Ice Hockey
+ Chess
+ Footbal
+ Golf

Functionality must be like when you click on sport must roll up/show
off list of countries like:

+ Atletics
+ Ice Hockey
+ Canada
+ USA
+ Russia
+ Chess
+ Footbal
+ Golf

and when click to some country then show off League like

+ Atletics
+ Ice Hockey
+ Canada
   + Tournaments
   + Extra league
   + 1.league
   + 2.league
+ USA
+ Russia
+ Chess
+ Footbal
+ Golf


PROBLEM is that I need get level of selected TreeItem to for each
different level will fire up different query so for example for
selected  Ice Hockey need get information that it's 1 level of tree so
use databases select to find out all countries for "Ice hockey".
When click to "Canada" TreeItem, it's level 2 I call select to find
out all leagues level for "Canada".

I create handler for Tree like:
// Add a handler that automatically generates some children
statTree.addOpenHandler(new OpenHandler() {

public void onOpen(OpenEvent event) {
// tree item that was clicked
TreeItem itemSelected = event.getTarget();

if (itemSelected.getChildCount() == 1) {
// Close item immediately
itemSelected.setState(false, false);

// Add a random number of children to 
the item
String itemText = 
itemSelected.getText();

// request to database according 
selected tree item level

// dummy data
for (int i = 0; i < numChildren; i++) {
// tree item to be added
TreeItem childDescendant = 
itemSelected

.addItem(itemText + "." + i);

System.out.println("\ncildDescendant index: "
+ 
itemSelected.getChildIndex(childDescendant));
childDescendant.addItem("");
}

// Remove the temporary item when we 
finish loading
itemSelected.getChild(0).remove();

// Reopen the item
itemSelected.setState(true, false);
}
}
});

Please help me some one I'll do appreciate it.
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



GWT Development Mode Plug-in for QTWebKit-based browser?

2010-06-02 Thread nMacD
We're using a custom-built application based on an embedded QTWebKit
browser and would like to be able to debug our GWT-based applications
in it, but there isn't, of course, a development-mode plug-in for
QtWebKit.

Looking through the GWT source, there is source code for an NPAPI-
based plug-in. QTWebKit supports NPAPI. The readme in the GWT codebase
indicates that the NPAPI plug-in is obselete and out-of-date and makes
reference to a show-stopper issue encountered on Firefox. I am able to
install this plug-in into ourQTWebKit browser and begin the debugging
process from Eclipse, but it quickly fails with:

com.google.gwt.dev.shell.HostedModeException: Something other than an
int was returned from JSNI method
'@com.google.gwt.core.client.JsArray::length()': JS value of type
JavaScript object(7), expected int
at
com.google.gwt.dev.shell.JsValueGlue.getIntRange(JsValueGlue.java:266)
at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:144)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeInt(ModuleSpace.java:
242)

So: Is it at all feasable to get the NPAPI plug-in working with
QtWebKit?

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



Extending / adapting Java to Javascript compiler

2010-06-02 Thread Sangam
I am working on a project to integrate GWT based UI components in a
Federated portal environment ( using WSRP protocol).
In WSRP the URLs to the application are different.
For example, in a standard web application an Ajax link would be
something like:
http://web_app_hostname:port/contextroot/ABC.ajax

The same URL in WSRP mode has to be rewritten as:

http://portalserver_hostname:port/resource?_portletId=xxy&wsrp-urlType=resource&wsrp-url=http://web_app_localhost:port/contextroot/ABC.ajax


As you can see, the WSRP URLs are different from the standard URLs.

In case of a web application developed based on Struts / JSF, we can
easily change the generated links by providing our Custom "link" tags.

However in case of GWT, the URLs are created at Client side by the
generated javascripts.

My Question:
How can I extend GWT so that the generated javascripts form URLs /
links as per my WSRP requirement?

Note: For testing purposes, I modified the generated javascripts and
hardcoded the URLs which I wanted and it works. However it is not
practical to modify every time the generated javascript code as
applications will have hunderd's of such URLs.
So, I am looking for a solution, where the URLs are properly rendered
by the GWT javascripts. It would be possible  if the javascripts read
URL formats from a configuration or template file.

Thanks in advance for the help.

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



JSNI Methode call does not work...

2010-06-02 Thread Go2one
Hi,

I've the following Class:

public class Designer {
 private final native JavaScriptObject addNode() /*-{
   alert("Pre JSNI call");
 
th...@de.go2one.sdui.client.processdesigner.processdesigner::sendNode(Ljava/
lang/String;Ljava/lang/Integer;Ljava/lang/Integer;)("TEST", 100, 100);
   alert("Post JSNI call");
}

void sendNode(String id, String x, String y) {
   GWT.log("sendNode() called");
}

}

When addNode  is called, "Pre JSNI Call"-Alert is shown. After the
click on "OK", an JS-Error is thrown:

Details zum Fehler auf der Webseite

Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1;
Trident/4.0)
Zeitstempel: Mon, 31 May 2010 20:52:56 UTC


Meldung: Annahme ausgelöst und nicht aufgefangen.
Zeile: 36
Zeichen: 7
Code: 0
URI: http://localhost:8080/desk/desk/hosted.html?desk

Any ideas what I'm doing wrong?
Thanks!

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



Authentication and login

2010-06-02 Thread KasperDK
Hi,

Im wondering what's the best way to do a login functionality. I'm
using GWT and GAE, and I can't use openID or Google Accounts (my app
relies on phonenumber + pincode).

I've built a Composite with the two boxes and a button for logging in,
and on the server I would normally store a flag in the session that
the user is logged in. However, when someone kicks the server, the
user has to log in again, which is a pain, so session-only coding is a
no-go.

What's the best way to do this ? I can of course code everything
myself, like

1) verify that the user exists
2) hash the pin + the time
3) store the time and the hash in the db and set the flag in session
4) encapsulate all server commands, so that the hash is being re-sent
(by db lookup), if (for some reason) the server has been kicked and
the session lost, or navigate to the login composite, if the hash has
expired

It just seems like a lot of work, for something that should be
standard. What have I missed in the docs ??

Cheers

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



Authentication and login

2010-06-02 Thread Kasper Hansen
Hi,

Im wondering what's the best way to do a login functionality. I'm
using GWT and GAE, and I can't use openID or Google Accounts (my app
relies on phonenumber + pincode).

I've built a Composite with the two boxes and a button for logging in,
and on the server I would normally store a flag in the session that
the user is logged in. However, when someone kicks the server, the
user has to log in again, which is a pain, so session-only coding is a
no-go.

What's the best way to do this ? I can of course code everything myself, like

1) verify that the user exists
2) hash the pin + the time
3) store the time and the hash in the db and set the flag in session
4) encapsulate all server commands, so that the hash is being re-sent
(by db lookup), if (for some reason) the server has been kicked and
the session lost, or navigate to the login composite, if the hash has
expired

It just seems like a lot of work, for something that should be
standard. What have I missed in the docs ??

Cheers

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



Re: GWT 2.0.3: Cross-browser problems still?

2010-06-02 Thread Frederic Conrotte
>I've had all kinds of cross-browser problems, in particular with events and 
>graphics, and sometimes widgets.

Can you be more specific and give the list of specific issues you had?

It would then be useful to fill new bug reports.

On May 31, 1:28 am, Navigateur  wrote:
> When I came into GWT I thought it was going to be write-once for all
> browsers. Since I've been using it, I've had all kinds of cross-
> browser problems, in particular with events and graphics, and
> sometimes widgets. And I've had to do workarounds (which I still
> haven't fully resolved) to make it work the same in different
> browsers.
>
> I just wondered if everybody else has had smooth-sailing with browsers
> or if there are others with similar issues?
>
> I know this is a vent, but sometimes I wish I had used Flash instead!
>
> Maybe Google can write clear guidelines for third-party library
> developers, since some of their libraries with respect to events and
> graphics seem to contribute to (but are not the only) problem. And
> treat cross-browser differences as a priority e.g. the fact that the
> core widget focusPanel doesn't seem to register mouseMove events in
> Internet Explorer except on the widgets contained on it, but does so
> fine in Firefox/Chrome.
>
> I hope everything written in GWT works the same in all browsers one
> day.

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



Re: eclipse: using external jar library -> "No source code is available for type ; did you forget to inherit a required module?"

2010-06-02 Thread Piyush Garg

*"No source code is available for type mylib.Method; did you forget to inherit a 
required module?"

*means gwt compilation not able to locate the source code for mylib.Method you 
need to have source code in your jar plus an xml file in package which you are 
accessing and inherit line in you gwt app xml.
This entry helped me 
http://markmail.org/message/h52xvo4j52msambe#query:+page:1+mid:lg4mlgiof4giuiaq+state:results

Thanks and Regards
Piyush Garg


On Sunday 30 May 2010 08:58 PM, Magnus wrote:

Hi,

I am trying to get started with my first GWT application "myApp", and
I would like to use my java library (mylib.jar, in this case for a
subclass of java.lang.Method: mylib.Method).

I am using eclipse and a separate project "mylib", which uses an ant
script via "external tools" that builds the mylib.jar file.

Within the myApp directory, I added a symbolic link to mylib.jar in
/war/WEB-INF/lib. And I added/war/WEB-INF/lib/mylib.jar to
my project via Properties/Java Build Path/Libraries.

Well, whenever I use something related to mylib.Method, I get the
following error:
"No source code is available for type mylib.Method; did you forget to
inherit a required module?"

What does this mean and how can I resolve it?

Thanks
Magnus

   


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



Could launch dev mode

2010-06-02 Thread ShadyK
hey guys,

i am totally new to gwt and i read the docs many  times.

i am setting up eclipse ..i followed the previous steps
successfully ...but when i reached debugging im not able to launch the
local web server and GWT development mode server.  knowing that i am
having "Development Mode" tab opened and i have new error and console
and i am running the url on an external browser and it's working..

versions :
Your SDK:
Release: 1.3.0

GWT 2.0

Thank you
Shady

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



How to use CallBack-Methode in JS

2010-06-02 Thread Go2one
Hi @all,

I have a JavaScript-Methode called
>> void addSelectionListener(  w) <<

where 'w' is an object which implements a 'onSelectionChanged' method.

I'm using a native JSON-Methode to consutruct my JS-Object and I'll
call addSelectionListener(...), but what should I submit as a
parameter if I want the object to call a Java-Methode called
onSelectionChanged()?

regards!

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



SerializerBase.check(String,int) throws useless exception?

2010-06-02 Thread svincent
Greetings,

I'm having a frustrating time debugging a bunch of code I'm trying to
port to GWT.  There are various subtle serialization issues (not
surprising, since GWT has its special rules).

The real problem I'm running in to is that the exception I keep
getting is this:

com.google.gwt.user.client.rpc.SerializationException: null
at
com.google.gwt.user.client.rpc.impl.SerializerBase.check(SerializerBase.java:
161)
at
com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:
145)
at
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:
199)
...

This exception is terrible: it doesn't tell me what class is having
the trouble.  It tries to print out the 'typeSignature', but the
typeSignature is null for classes with certain types of serialization
issues.

A couple of thoughts:

1. it would be Really Nice if GWT could be changed to fix this
exception to be more meaningful (at least include the class name
that's having the trouble)

2. Does anybody have tips on what to do when you get this exception?
I've encountered one case: don't have fields of type java.lang.Object
in your GWT Serializable classes.  Is there more?

Thanks!
-Shawn.

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



Dialog box in GWT

2010-06-02 Thread anto
Could any one help me out in this following isssue.

1.Can a dialog box inturn call another dialogbox on a button click.

i tried it out but the second dialog is coming under the parent dialog
box.



regards,
GWT developer

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



How to change the CSS Caption part of gwt-DialobBox

2010-06-02 Thread koolootoomba
Hello

How can I override the css class '.gwt-DialobBox .Caption' to use
'cursor: move' instead of 'cursor: default'?

I want to do this to make it more obvious to the user that they can
drag the DialogBox. To do this, I want to change the appearance of the
cursor.

Notice that one must grab the caption part of the DialogBox in order
to drag it. That's why I need to modify '.gwt-DialobBox .Caption' and
not '.gwt-DialobBox'.

Now normally I know I can define my own css class in MyProject.css and
then write code like myDialogBox.setStyleName("myCustomCssClass"). But
here the problem is that I need to reach the .Caption part of '.gwt-
DialobBox .Caption'. So how does the setStyleName method work in a
case like this? Apparently, I cannot do things like
myDialogBox.setStyleName("myCustomCssClass .Caption").

So how can I modify the .Caption part of '.gwt-DialobBox .Caption'?


Thanks

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



Re: Changing CSS on the fly

2010-06-02 Thread Paul Smith
It is possible in straight javascript, but I don't think there's
anything in GWT to help out. See 
http://developer.apple.com/internet/webcontent/styles.html
for an example.

I used it a few years back for something really similar - changing the
style of a bunch of elements by modifying a css rule. Definitely much
faster than changing the styles on all those dom elements. If I
recall, finding the right stylesheet and css rule is kind of a pain
because there's no efficient lookup. I think I put the style that I
wanted to modify right on the html page to make finding it easier. I
bet GWT could do something to make referencing css rules in a
CssResource efficient.

On May 28, 11:39 am, fmod  wrote:
> Hi, is there a way to change a CSS Property inside a Rule definition
> on the fly.
>
> I have defined a rule
>
> .myRule {
>   height: 22px;
>   width: 100px;
>   overflow: hidden
>
> }
>
> I have hundreds of DIV elements with that rule.
> I will like to change the width property directly on the rule. Without
> iterating all the elements and
> inlining the new width.
>
> Is that 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Analogous of ListCellRenderer

2010-06-02 Thread Flando
Hello everybody.

I look for the analogous of ListCellRenderer(Java) for GWT.

What I need is the following (example):

I have:
- the class Person:
public class Person{
private String name;
private String surname;
 }

- ArrayList
- 2 ListBox

I want to add all the item of the arraylist in the two ListBox, but in
the first one I want to display the name and in the second one the
surname. I don't want to give explicity the field name/surname to the
ListBox.

In this way I could then see directly which person the user select
from the List.

In java I've solved with the ListCellRenderer for the JList.

Any help?
Thanks

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



Re: Menubar - retrieving the selected menu item within the Command object?

2010-06-02 Thread anto
Hi Koz,

is it possible to invoke a child dialog box from parent dialog box. i
tried it but i am getting the child dialog below parent dialog.

is there any way to bring the child dialog on top of parent dialog.




regards,
Anto

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



Problem with Tree open/close since GWT 2.0.1

2010-06-02 Thread Dmitry Malinin
I have selected TreeItem, next I scroll Tree up to selected item out
of view. When I open or close another(not selected) item Tree is
scrolling back to make selected item visible.
In GWT 2.0.0 this working properly.

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



Re: Status of Joda/Goda time, future of Date handling

2010-06-02 Thread Scott Fines
Hey, guys

I'm the main contributor(for what it's worth) of gwt-time, and it's
nice to know that it works for you guys. I've had to put it off the
burner for a while, but I'm starting to pick it back up again.

However, there are a few issues with it that we still need to address,
most notably the large download and Serialization issues.

Any information you could give me would be of the utmost help with
improving it. I haven't run an SOYC on it yet, so I don't quite know
why it would be so big--perhaps Timezone tables are the reason, but
I'm guessing it just has more to do with the structure of the project
as a whole. There may be a much more GWT-friendly way to organize the
API which will help with this (Thus the reason that gwt-time is still
listed as in alpha stage--I don't want too many people getting angry
if I change the API around)

Please let me know what troubles you are having so that we can get to
fixing them.

Thanks,

Scott

On May 30, 8:57 pm, Chris Lercher  wrote:
> On May 31, 2:26 am, Paul Stockley  wrote:
>
> > I am using gwt-time. I haven't had any issues as yet. However, the
> > biggest
> > problem is that it adds 250 - 300 kb to the project js download.
>
> That's massive, and it would be way too much for my project. I wonder,
> why it's that large - What does the SOYC compile report say? If it's
> mainly the timezone tables, maybe there's a way to reduce them.

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



Re: Status of Joda/Goda time, future of Date handling

2010-06-02 Thread Scott Fines
That's not particularly suprising to me. One of the reasons that gwt-
time is still listed as being in alpha status is that there is a
possibility of needed further API changes to deal with issues like
that. Unfortunately, I have been distracted for the past little while
and am only just now able to get back to working on it. However, I'll
post an issue-report on the large download size so that we won't
forget it. If any of you are willing, we are looking for contributors
to help get this thing off the ground.

Thanks,

Scott Fines

On May 31, 8:43 am, Paul Stockley  wrote:
> I did that already. There isn't really anything that can easily be
> removed. There is just a lot of code. The jar is 839kb including
> source. In java your don't really notice it. I am looking for
> something more lightweight.
>
> On May 30, 9:57 pm, Chris Lercher  wrote:
>
>
>
> > On May 31, 2:26 am, Paul Stockley  wrote:
>
> > > I am using gwt-time. I haven't had any issues as yet. However, the
> > > biggest
> > > problem is that it adds 250 - 300 kb to the project js download.
>
> > That's massive, and it would be way too much for my project. I wonder,
> > why it's that large - What does the SOYC compile report say? If it's
> > mainly the timezone tables, maybe there's a way to reduce them.

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



How to read web.xml parameters from GWT

2010-06-02 Thread MickeyMiner
Hi,

How do I read parameters stored in /WEB-INF/web.xml from my
GreetingServiceImpl class?

After I insert following snipplet int web.xml:


   dbHost
   192.168.120.120


   dbName
   my_database


Is anything like this possible:

public class GreetingServiceImpl extends RemoteServiceServlet
implements GreetingService {
   public String greetServer(String input) throws
IllegalArgumentException {
  Series parameters = getContext().getParameters();
  String strHost = parameters.getFirstValue("dbHost");
  String strName = parameters.getFirstValue("dbName");
  return "The target database is " + strName + "@" + strHost;
   }
}


Thanx for your help and cheers!

mm

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



Getting a 503 Error.

2010-06-02 Thread ike
Hey...

I am using the plugin for Eclipse. There are no errors in my code
according to Eclipse, but when I run the code, it gives me a screen
like this:

HTTP ERROR: 503

SERVICE_UNAVAILABLE

RequestURI=/In2Solar.html

Powered by jetty://


Is there someplace I could look to find out what is happening???


Thanks.

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



Re: Download Popup Panel in PDF format

2010-06-02 Thread Manuel Carrasco Moñino
If you mean convert the content of the screen to PDF, basically you
can not, but perhaps you can use this  workaround
1.- Convert the content of the document to text: String content =
Document.getBody.toString();
2.- Send the content to the server
3.- Convert Html to Pdf in the server
4.- Return the file setting the adequate content-type to the response

There is another problem to receive the file and ask the user to
save/open it, so you need a html anchor with a src set to a hidden
iframe.


-Manolo



On Wed, Jun 2, 2010 at 10:10 PM, Anky  wrote:
> Hi All,
>
> Is there any way to download a GWT widget in PDF format?
>
> Thanks,
> Anky
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Calling JSNI function or Java function to handle onClick event

2010-06-02 Thread Manuel Carrasco Moñino
Although GWT obfuscates the produced javascript code renaming methods,
classes, etc, it is possible to use a GWT method from javascript if
you export it storing a reference in the window object:
private native void exportMyMethod() /*-{
  $wnd.showAlert = function(name) {
 return @com.example.myclass::showAlert(Ljava/lang/String;) 
(message);
  };
}-*/;

Take a look to this article I wrote time ago:
http://code.google.com/p/gwtchismes/wiki/Tutorial_ExportingGwtLibrariesToJavascript_en

-Manolo




On Wed, Jun 2, 2010 at 10:44 PM, kozura  wrote:
> Java functions are translated into obfuscated (ie renamed) javascript,
> so will not be available to call from an element.  You can create a
> javascript function, perhaps attached to wnd, which could then call a
> java function.
>
> On Jun 2, 1:46 pm, DK  wrote:
>> I have an anchor element with an onClick="showAlert();"
>>
>> in my java file, I have a JSNI function
>>
>>     public static native void showAlert() /*-{
>>         alert('Hello');
>>         }-*/;
>>
>> I never see this alert. In fact, when I look at the browser console, I
>> see that showAlert could not be found. What am I missing here ?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Calling JSNI function or Java function to handle onClick event

2010-06-02 Thread kozura
Java functions are translated into obfuscated (ie renamed) javascript,
so will not be available to call from an element.  You can create a
javascript function, perhaps attached to wnd, which could then call a
java function.

On Jun 2, 1:46 pm, DK  wrote:
> I have an anchor element with an onClick="showAlert();"
>
> in my java file, I have a JSNI function
>
>     public static native void showAlert() /*-{
>         alert('Hello');
>         }-*/;
>
> I never see this alert. In fact, when I look at the browser console, I
> see that showAlert could not be found. What am I missing here ?

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



Download Popup Panel in PDF format

2010-06-02 Thread Anky
Hi All,

Is there any way to download a GWT widget in PDF format?

Thanks,
Anky

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



Re: File download from a GWT Service: "java.lang.RuntimeException: Unable to report failure"

2010-06-02 Thread Sripathi Krishnan
>
> public class MyServiceImpl extends RemoteServiceServlet implements
> MyService

The above line is wrong. It should NOT extend RemoteServiceServlet.
Just extend the regular HttpServlet and it should work.

--Sri



On 3 June 2010 00:59, J-Pro  wrote:

> Hello, dear GWT gurus!
>
> I'm trying to send a String to the client as a file after user presses
> a button. After searching I've found and doing it this way:
> http://codepad.org/kbZ8Cp2V
>
> But when I run it in GWT DEV mode, I'm getting this exception:
> "java.lang.RuntimeException: Unable to report failure" (details see
> here: http://codepad.org/TIGk861g)
> And also, below it there is another one:
> "com.google.gwt.user.client.rpc.InvocationException: File contents
> " (details see here: http://codepad.org/JGIXaPCg)
>
> I'm using smartwgt 2.2, GWT SDK 2.0.3 with Eclipse 3.5 SR1 and jdk
> 1.6.0 u18 from Windows 7 Enterprise x64 and Mozilla Firefox 3.5.9 as
> browser.
>
> Please, advise me something, maybe I'm just doing something wrong... I
> work with file download in GWT for the first time.
>
> Thank you in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Calling JSNI function or Java function to handle onClick event

2010-06-02 Thread DK
I have an anchor element with an onClick="showAlert();"

in my java file, I have a JSNI function

public static native void showAlert() /*-{
alert('Hello');
}-*/;

I never see this alert. In fact, when I look at the browser console, I
see that showAlert could not be found. What am I missing here ?

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



Re: Getting the default DateBox() picker to advance year at a time

2010-06-02 Thread Danny Goovaerts
It's not necessary to write a custom DatePicker. It suffices to create
a DatePicker with a custom MonthSelector.
Here is my implementation
//
package eu.oobikwe.gwt.ui;

import com.google.gwt.user.datepicker.client.CalendarModel;
import com.google.gwt.user.datepicker.client.DatePicker;
import com.google.gwt.user.datepicker.client.DefaultCalendarView;

public class DatePickerWithYearSelector extends DatePicker {

public DatePickerWithYearSelector() {
super(new MonthAndYearSelector(),new DefaultCalendarView(),new
CalendarModel()) ;
MonthAndYearSelector monthSelector = (MonthAndYearSelector)
this.getMonthSelector() ;
monthSelector.setPicker(this) ;
monthSelector.setModel(this.getModel()) ;
}

public void refreshComponents() {
super.refreshAll() ;
}

}

//
package eu.oobikwe.gwt.ui;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.PushButton;
import com.google.gwt.user.client.ui.HTMLTable.CellFormatter;
import com.google.gwt.user.datepicker.client.CalendarModel;
import com.google.gwt.user.datepicker.client.MonthSelector;

/**
 * A simple {...@link MonthSelector} used for the default date picker.
Not
 * extensible as we wish to evolve it freely over time.
 */

public  class MonthAndYearSelector extends MonthSelector {

  private static String BASE_NAME = "datePicker" ;

  private PushButton backwards;
  private PushButton forwards;
  private PushButton backwardsYear;
  private PushButton forwardsYear;
  private Grid grid;
  private int previousYearColumn = 0;
  private int previousMonthColumn = 1 ;
  private int monthColumn = 2 ;
  private int nextMonthColumn = 3;
  private int nextYearColumn = 4 ;
  private CalendarModel model ;
  private DatePickerWithYearSelector picker ;


public void setModel(CalendarModel model) {
this.model = model;
}



public void setPicker(DatePickerWithYearSelector picker) {
this.picker = picker;
}



@Override
  protected void refresh() {
String formattedMonth = getModel().formatCurrentMonth();
grid.setText(0, monthColumn, formattedMonth);
  }

  @Override
  protected void setup() {
// Set up backwards.
backwards = new PushButton();
backwards.addClickHandler(new ClickHandler() {
  public void onClick(ClickEvent event) {
addMonths(-1);
  }
});

backwards.getUpFace().setHTML("‹");
backwards.setStyleName(BASE_NAME + "PreviousButton");

forwards = new PushButton();
forwards.getUpFace().setHTML("›");
forwards.setStyleName(BASE_NAME + "NextButton");
forwards.addClickHandler(new ClickHandler() {
  public void onClick(ClickEvent event) {
addMonths(+1);
  }
});


// Set up backwards year
backwardsYear = new PushButton();
backwardsYear.addClickHandler(new ClickHandler() {
  public void onClick(ClickEvent event) {
addMonths(-12);
  }
});

backwardsYear.getUpFace().setHTML("«");
backwardsYear.setStyleName(BASE_NAME + "PreviousButton");

forwardsYear = new PushButton();
forwardsYear.getUpFace().setHTML("»");
forwardsYear.setStyleName(BASE_NAME + "NextButton");
forwardsYear.addClickHandler(new ClickHandler() {
  public void onClick(ClickEvent event) {
addMonths(+12);
  }
});

// Set up grid.
grid = new Grid(1, 5);
grid.setWidget(0, previousYearColumn, backwardsYear);
grid.setWidget(0, previousMonthColumn, backwards);
grid.setWidget(0, nextMonthColumn, forwards);
grid.setWidget(0, nextYearColumn, forwardsYear);

CellFormatter formatter = grid.getCellFormatter();
formatter.setStyleName(0, monthColumn, BASE_NAME + "Month");
formatter.setWidth(0, previousYearColumn, "1");
formatter.setWidth(0, previousMonthColumn, "1");
formatter.setWidth(0, monthColumn, "100%");
formatter.setWidth(0, nextMonthColumn, "1");
formatter.setWidth(0, nextYearColumn, "1");
grid.setStyleName(BASE_NAME + "MonthSelector");
initWidget(grid);
  }

  public void addMonths(int numMonths) {
model.shiftCurrentMonth(numMonths);
picker.refreshComponents();
  }

}

Danny
On Jun 2, 8:31 pm, Jim Douglas  wrote:
> No, it's not possible, short of writing a custom DatePicker.  You
> might want to vote for this open issue:
>
> http://code.google.com/p/google-web-toolkit/issues/detail?id=3520
>
> On Jun 2, 9:24 am, Rob Tanner  wrote:
>
>
>
> > Hi,
>
> > I'm using a DateBox() widget for users to enter their date of birth.
> > When the picker is displayed, on either side of the month/year
> > displayed in the center top of the picker are the greater than and
> > less than arrows for moving forward or backward, month at a time.  I
> > have not figured out anyway to add year at a time as well (25 or more
> > years of moths is a lot of clic

Re: ClickHandler not called on second click

2010-06-02 Thread Danny Goovaerts
I managed to isolate the code in a few classes which reproduce the
problem.

Can I upload a zipfile (15k) somewhere?

On Jun 2, 5:27 pm, Olivier Monaco  wrote:
> Danny,
>
> What your click handler does? May be it puts some (transparent)
> element in front of the button... How do you use the PushButton? What
> is the exact structure of panels? You need to build a test case to us
> help you.
>
> Olivier
>
> On 2 juin, 08:02, Danny Goovaerts  wrote:
>
>
>
> > I have not yet been able to isolate the code while reproducing the
> > problem. It's probably related to the actual structured of the page.
> > But I managed to get some more information using the debugger.
>
> > - The problem occurs when using a PushButton (constructed using the
> > constructor PushButton(Image image)), not when using a simple Button
> > - In the class CustomButton when the method onBrowserEvent is called
> > for a MOUSUP event :
> > ...
> > case Event.ONMOUSEUP:
> >         if (isCapturing)
> >           isCapturing = false;
> >           DOM.releaseCapture(getElement());
> >           if (isHovering() && event.getButton() == Event.BUTTON_LEFT)
> > {
> >             onClick();
> >           }
> >         }
> >         break;
> > ...
>
> > isHovering() returns true at the first click while it returns false at
> > the subsequent clicks
>
> > The method isHovering is implemented as follows
>
> > final boolean isHovering() {
> >     return (HOVERING_ATTRIBUTE & getCurrentFace().getFaceID()) > 0;
> >   }
>
> > At the first click getCurrentFace().getFaceID()) evaluates to 3, while
> > at the subsequent clicks, it evaluates to 1.
> > So there is probably something wrong in setting the correct face in
> > the particular situation.
>
> > I hope that this can provide enough information to find the real root
> > cause.
>
> > Danny
>
> > On Jun 1, 6:21 pm, Danny Goovaerts  wrote:
>
> > > My application is quite large. The button is several "levels" deep,
> > > i.e. in a FlowPanel which itself is in a HorizontalPaneI in a hierachy
> > > of divs. I will try to isolate while still reproducing the error.
> > > I would also try to step through the code in a debugger, but
> > > unfortunaly for this I need to move the mouse from the page to
> > > Eclipse, which prevents from reproducing the error.
> > > Danny
>
> > > On Jun 1, 4:17 pm, Ranjan  wrote:
>
> > > > Something like that should not have gone unnoticed for so long. Could
> > > > you post your code snippet?
>
> > > > On Jun 1, 12:07 pm, Olivier Monaco  wrote:
>
> > > > > Danny,
>
> > > > > I had no problem (in dev mode). Here is my test case:
>
> > > > >     public void onModuleLoad()
> > > > >     {
> > > > >         Button b = new Button("click me");
> > > > >         b.addClickHandler(new ClickHandler()
> > > > >         {
> > > > >             @Override
> > > > >             public void onClick(ClickEvent event)
> > > > >             {
> > > > >                 RootPanel.get().add(new Label("clicked"));
> > > > >             }
> > > > >         });
> > > > >         RootPanel.get().add(b);
> > > > >     }
>
> > > > > What's your test case?
>
> > > > > Olivier
>
> > > > > On 1 juin, 08:07, Danny Goovaerts  wrote:
>
> > > > > > I have a button with a ClickHandler. When I move the mouse over the
> > > > > > button and click the button, the ClickHandler is called. When I do 
> > > > > > no
> > > > > > move the mouse away from the button, the ClickHandler is not called 
> > > > > > on
> > > > > > any subsequent clicks. I have to move the mouse away from the button
> > > > > > and back. Then the ClickHandler is called when I click again.
>
> > > > > > To investigate, I have added a MouseDownHandler and a 
> > > > > > MouseUpHandler.
> > > > > > These are called on subsequent clicks, only the ClickHandler is not
> > > > > > called.
> > > > > > As the focus stays on the button, I have tried hitting the enter 
> > > > > > key.
> > > > > > This triggers calling the ClickHandler.
>
> > > > > > I 've tried adding a DeferredCommand to the ClickHandler with a
> > > > > > variaty of actions(remove focus, remove focus and set focus again),
> > > > > > but this does not change anything.
>
> > > > > > Environment
> > > > > > - GWT 2.0.3
> > > > > > - Vista
> > > > > > - Chrome 6.0.408.1 dev / Firefox 3.5.9/ Internet Explorer 7.0
>
> > > > > > There are several posts in this forum that describe a similar
> > > > > > behaviour 
> > > > > > (e.g.http://groups.google.com/group/google-web-toolkit/browse_thread/threa...)
> > > > > > but none have a solution.
>
> > > > > > Any idea how to solve this?
>
> > > > > > Thanks in advance,
>
> > > > > > Danny

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

File download from a GWT Service: "java.lang.RuntimeException: Unable to report failure"

2010-06-02 Thread J-Pro
Hello, dear GWT gurus!

I'm trying to send a String to the client as a file after user presses
a button. After searching I've found and doing it this way:
http://codepad.org/kbZ8Cp2V

But when I run it in GWT DEV mode, I'm getting this exception:
"java.lang.RuntimeException: Unable to report failure" (details see
here: http://codepad.org/TIGk861g)
And also, below it there is another one:
"com.google.gwt.user.client.rpc.InvocationException: File contents
" (details see here: http://codepad.org/JGIXaPCg)

I'm using smartwgt 2.2, GWT SDK 2.0.3 with Eclipse 3.5 SR1 and jdk
1.6.0 u18 from Windows 7 Enterprise x64 and Mozilla Firefox 3.5.9 as
browser.

Please, advise me something, maybe I'm just doing something wrong... I
work with file download in GWT for the first time.

Thank you in advance.

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



Re: Chunking File Upload

2010-06-02 Thread kozura
Sorry, GWT doesn't provide any particular magic over javascript, which
due to its architecture to avoid security risks cannot access client
files except by sending them to the server with the user's consent.
You could run a separate server to process these, try a flash
solution, or presumably upgrade GAE service to get around the quotas.

On Jun 2, 11:29 am, Ken  wrote:
> I'm looking at a problem that I think I might be able to solve using
> GWT.  We're considering using GWT for the client of our application
> for other reasons, but I think it might also solve this issue.
>
> We're developing a Google App Engine application that processes data
> uploaded to it.  As you may know GAE has quota for various things,
> including total connection time.  In our case we're running into
> another quota regarding database access.  If our uploaded file is
> longer than 8500 lines, we exceed our quota and get an exception.
>
> We can envision upload files much larger than this that need to be
> processed by our customer.  So what we need to do is process the file
> before it is uploaded and then uploaded it to our application in
> chunks, say 5000 lines at a time.
>
> Can GWT help us here?  Basically when someone selects a file with
> 1,000,000 lines in it to upload we would like to pre-process it and
> change it to 200 GWT RPC calls, instead of a standard file upload.  In
> addition, we would like to provide a progress bar, of course.
>
> 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Feedback on "Large scale app development MVP article"

2010-06-02 Thread Tristan
I don't like having two presenters either. I'm not quite sure that's
what's required. My presenters have an adapter parameter, so one
presenter can be coupled with different views depending on what
adapter is selected. Then, depending if it's a listAdapter,
editAdapter, displayAdapter, the same DTO is given to the appropriate
view to display itself.

The big benefits of presenter design really revolve around fast tests.
That was clearly a design choice. On the other hand, if you take a
look at the new Roo and GWT 2.1 integration, I think the waters get
muddled as I *think* they advertise not needing all the layering and
the approach not being a pure MVP from what I understand. So it
doesn't seem like a hard fast rule, but I've found the pattern very
useful and it greatly simplified my development. There is only one
method that does important things in my presenter (not taking into
account refactoring methods out of course). So if logic breaks, I know
where it is and I have fast unit tests for it. Everything else is
declarative boiler plate.

On Jun 2, 1:43 pm, nogridbag  wrote:
> Mainly because of habit - I always try to avoid mixing UI related code
> with client/server code.  IMHO, it seems similar to doing RPC calls in
> a controller or view in MVC which I think is a big no-no.
>
> Sticking with the article example, let's say you have two places where
> you want to display contacts.  The data is the same, but the views may
> be completely different and thus you may want different presenters.
>
> So now you have:
> ContactsModel
> ContactsPresenter
> ContactsView
>
> ContactsPresenter2
> ContactsView2
>
> You already have the RPC call to load and initialize the ContactsModel
> in ContactsPresenter. Do you simply duplicate this in
> ContactsPresenter2 or does ContactsPresenter2 have a dependency on
> ContactsPresenter?
>
> Anyway, I'm really just thinking out loud here ;)  I haven't sat down
> and coded any thing with MVP yet.  If this is the accepted practice I
> will probably do it this way too.
>
> On Jun 2, 1:08 pm, Tristan  wrote:
>
>
>
> > @nogridbag
>
> > What are your reasons for not having the presenter make RPC requests?
> > The RPC Service is not a presenter itself. Probably the MVP model
> > should be called MVPSE (services, event bus) because that's what it
> > takes to make it really work.
>
> > On Jun 1, 4:04 pm, jocke eriksson  wrote:
>
> > > I will answer my own question here, yes I am !! Thank god for the power of
> > > google.
>
> > > 2010/6/1 jocke eriksson 
>
> > > > Am I stupid or isn't EventBus an implementation of observer/observable.
>
> > > > 2010/6/1 Sripathi Krishnan 
>
> > > > There are a few things that you should keep in mind before you try to
> > > >> understand the MVP pattern
>
> > > >>    1. You don't have reflection or observer/observable pattern on the
> > > >>    client side.
> > > >>    2. Views depend on DOM and GWT UI Libraries, and are difficult to
> > > >>    mock/emulate in a pure java test case
>
> > > >> Now, to answer some of your questions
>
> > > >> *1. Why should model just be POJO's?*
> > > >> - Models are shared by the server and client. If models contain code to
> > > >> make RPC calls, it won't work on the server side.
> > > >> - Say the models make RPC calls and update themselves. How will the 
> > > >> views
> > > >> know about this? Remember, there is no observer/observable pattern on 
> > > >> the
> > > >> UI.
> > > >> - The only way multiple views can stay in sync is by listening to 
> > > >> events.
> > > >> And events carry the model objects around, so everybody stays in sync.
>
> > > >> *2. You would have multiple presenters and one of them would 
> > > >> arbitrarily
> > > >> have the RPC logic to initialize the model?*
> > > >> Have a central, command style RPC mechanism. When the data comes from 
> > > >> the
> > > >> server, you put it on the event bus so that every view gets the updated
> > > >> data. If there is an error, you have a plug to do central error 
> > > >> handling.
> > > >> You can also cache results centrally instead of hitting the server 
> > > >> every
> > > >> time.
>
> > > >> *3. Multiple views for the same model?*
> > > >> Its actually a very common thing. Say your model is a list of 
> > > >> contacts. In
> > > >> gmail, the chat view needs this model. Also, the compose email view 
> > > >> needs it
> > > >> to auto-complete the addresses. These views cannot "observe" the list 
> > > >> fof
> > > >> contacts, so the only way for them to stay in sync is via events.
>
> > > >> *4. Why is it a poor design decision to let the view know about this
> > > >> model?*
> > > >> Because then your views are no longer dumb. And if they are not dumb,
> > > >> you'd have to test them, which we know is difficult to do via java.
>
> > > >> If the view knows about the model, you will also be tempted to "read 
> > > >> from
> > > >> the text box and populate the model". At some point, you would be 
> > > >> tempted to
> > > >> add the vali

Re: inserting space between form elements

2010-06-02 Thread Stefan Bachert
Hi Magnus,

on the long run two things will happen

1) you will switch to an absolute layout, may be with some kind of
layout manager
2) you need to learn more about css.

on the short run put a non breaking space in your label ("&nbs;" or
char #160)

Stefan Bachert
http://gwtworld.de


On 1 Jun., 19:39, Magnus  wrote:
> Hi,
>
> I use VerticalPanel for my forms. I subsequently and alternating add
> Labels and TextBoxes:
>
> add ();
> add ();
> add ();
> add ();
>
> I would like some space between the last TextBox and the next Label. I
> tried:
>
> add ();
> add ();
> add (new Label (""));
> add ();
> add ();
>
> But nothing happens...
>
> How can I get some space between the items?
>
> Magnus

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



Re: Feedback on "Large scale app development MVP article"

2010-06-02 Thread nogridbag
Mainly because of habit - I always try to avoid mixing UI related code
with client/server code.  IMHO, it seems similar to doing RPC calls in
a controller or view in MVC which I think is a big no-no.

Sticking with the article example, let's say you have two places where
you want to display contacts.  The data is the same, but the views may
be completely different and thus you may want different presenters.

So now you have:
ContactsModel
ContactsPresenter
ContactsView

ContactsPresenter2
ContactsView2

You already have the RPC call to load and initialize the ContactsModel
in ContactsPresenter. Do you simply duplicate this in
ContactsPresenter2 or does ContactsPresenter2 have a dependency on
ContactsPresenter?

Anyway, I'm really just thinking out loud here ;)  I haven't sat down
and coded any thing with MVP yet.  If this is the accepted practice I
will probably do it this way too.


On Jun 2, 1:08 pm, Tristan  wrote:
> @nogridbag
>
> What are your reasons for not having the presenter make RPC requests?
> The RPC Service is not a presenter itself. Probably the MVP model
> should be called MVPSE (services, event bus) because that's what it
> takes to make it really work.
>
> On Jun 1, 4:04 pm, jocke eriksson  wrote:
>
> > I will answer my own question here, yes I am !! Thank god for the power of
> > google.
>
> > 2010/6/1 jocke eriksson 
>
> > > Am I stupid or isn't EventBus an implementation of observer/observable.
>
> > > 2010/6/1 Sripathi Krishnan 
>
> > > There are a few things that you should keep in mind before you try to
> > >> understand the MVP pattern
>
> > >>    1. You don't have reflection or observer/observable pattern on the
> > >>    client side.
> > >>    2. Views depend on DOM and GWT UI Libraries, and are difficult to
> > >>    mock/emulate in a pure java test case
>
> > >> Now, to answer some of your questions
>
> > >> *1. Why should model just be POJO's?*
> > >> - Models are shared by the server and client. If models contain code to
> > >> make RPC calls, it won't work on the server side.
> > >> - Say the models make RPC calls and update themselves. How will the views
> > >> know about this? Remember, there is no observer/observable pattern on the
> > >> UI.
> > >> - The only way multiple views can stay in sync is by listening to events.
> > >> And events carry the model objects around, so everybody stays in sync.
>
> > >> *2. You would have multiple presenters and one of them would arbitrarily
> > >> have the RPC logic to initialize the model?*
> > >> Have a central, command style RPC mechanism. When the data comes from the
> > >> server, you put it on the event bus so that every view gets the updated
> > >> data. If there is an error, you have a plug to do central error handling.
> > >> You can also cache results centrally instead of hitting the server every
> > >> time.
>
> > >> *3. Multiple views for the same model?*
> > >> Its actually a very common thing. Say your model is a list of contacts. 
> > >> In
> > >> gmail, the chat view needs this model. Also, the compose email view 
> > >> needs it
> > >> to auto-complete the addresses. These views cannot "observe" the list fof
> > >> contacts, so the only way for them to stay in sync is via events.
>
> > >> *4. Why is it a poor design decision to let the view know about this
> > >> model?*
> > >> Because then your views are no longer dumb. And if they are not dumb,
> > >> you'd have to test them, which we know is difficult to do via java.
>
> > >> If the view knows about the model, you will also be tempted to "read from
> > >> the text box and populate the model". At some point, you would be 
> > >> tempted to
> > >> add the validation in the view. And then there will be error handling. 
> > >> And
> > >> slowly and surely, you have reached a stage where you cannot test your 
> > >> app
> > >> easily.
>
> > >> Which is why you want the view to only listen to low level browser events
> > >> like clicks and key events, and then convert them to your apps vocabulary
> > >> and then call the Presenter. Since Presenter is the only one which has 
> > >> any
> > >> real code, and since it does not depend on the DOM, you can test them 
> > >> using
> > >> only JUnit.
>
> > >> *5. Event Handling*
> > >> That part doesn't have to do with MVP, its purely a performance
> > >> optimization. For general concepts on the subject, you may want to read 
> > >> this
> > >> quirks mode article .
>
> > >> --Sri
>
> > >> On 1 June 2010 23:08, nogridbag  wrote:
>
> > >>> Hi, I've been reading the articles on MVP recently, specifically the
> > >>> articles here:
>
> > >>>http://code.google.com/webtoolkit/articles/mvp-architecture.html
> > >>>http://code.google.com/webtoolkit/articles/mvp-architecture-2.html
>
> > >>> I've primarily worked with MVC in the past so this is my first
> > >>> exposure to MVP (I've of course heard about it before but never really
> > >>> cared to learn about it in depth).
>
> > >>> Here

Re: Getting the default DateBox() picker to advance year at a time

2010-06-02 Thread Jim Douglas
No, it's not possible, short of writing a custom DatePicker.  You
might want to vote for this open issue:

http://code.google.com/p/google-web-toolkit/issues/detail?id=3520

On Jun 2, 9:24 am, Rob Tanner  wrote:
> Hi,
>
> I'm using a DateBox() widget for users to enter their date of birth.
> When the picker is displayed, on either side of the month/year
> displayed in the center top of the picker are the greater than and
> less than arrows for moving forward or backward, month at a time.  I
> have not figured out anyway to add year at a time as well (25 or more
> years of moths is a lot of clicks).  Is there anyway to accomplish
> that?
>
> Thanks,
> Rob

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



Re: GWT-RPC vs HTTP Call - which is better??

2010-06-02 Thread Stefan Bachert
Hi,

in general use GWT-RPC (as Sri wrote).
However, the only case I would you classical HTTP is, when you need to
download image data which are business datas (and not static images
which should be located in a ClientBundle).

Stefan Bachert
http://gwtworld.de




On 2 Jun., 06:58, Nirmal  wrote:
> Hi,
>
> I am evaluating if there is a performance variation between calls made
> using GWT-RPC and HTTP Call.
>
> My appln services are hosted as Java servlets and I am currently using
> HTTPProxy connections to fetch data from them. I am looking to convert
> them to GWT-RPC calls if that brings in performance improvement.
>
> I would like to know about pros/cons of each...
>
> Also any suggestions on tools to measure performance of Async calls...
>
> Regards,
> Nirmal

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



Re: eclipse 3.5.2 and gwt

2010-06-02 Thread seven.reeds
I still have no idea what the issue was but I had to un-install
eclipse and delete the ".eclipse" dir in my home directory then
reinstall Eclipse and re-add the GWT plug-in for it to show up.

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



Re: How to center a VerticalPanel on page with UiBinder

2010-06-02 Thread mmoossen
hi Mark!

you should take a look at this in first place:
http://blog.themeforest.net/tutorials/vertical-centering-with-css/

HTH
Michael

On May 30, 3:51 pm, Tristan  wrote:
> have you tried...
>
> 
>   
>     
>       ...
>     
>   
> 
>
> On May 28, 8:38 am, BryanPoit  wrote:
>
> > 
> >         .centerStyle {
> >         width: 800px;
> >         margin: 0 auto 0 auto;
> >         }
> > 
>
> > Is where the definition for style.centerStyle comes from.
>
> > Uibinder interprets the style elements and they can be accessed
> > using style.stylename.
>
> > On May 28, 9:19 am, Mike  wrote:
>
> > > Where did it get the definition for: {style.centerStyle} ???
>
> > > Does UiBinder have access to all of the "default" style information
> > > provided by GWT?
>
> > > Usually, to center something horizontally, the technique is this:
>
> > > .centerStyle {
> > >    margin-left: auto;
> > >    margin-right: auto;
>
> > > }
>
> > > (I believe)
>
> > > Cheers
> > > Mike
>
> > > On May 28, 7:07 am, Mark  wrote:
>
> > > > I finally found out how to do this:
> > > >  > > > styleName='{style.centerStyle}'>
>
> > > > Hopefully this will help anybody else.
>
> > > > On 27 Mai, 13:27, Mark  wrote:
>
> > > > > Hello,
>
> > > > > I am new to gwt and I hope you can help me. I want to center a
> > > > > VerticalPanel on the page.
>
> > > > >  
> > > > >         Login Settings
> > > > >         title
> > > > >         placeholder
> > > > >         text1
> > > > >         text2
> > > > >         stats
> > > > > 
>
> > > > > I tried several things like:
>
> > > > > 
> > > > >         .centerStyle {
> > > > >         width: 800px;
> > > > >         margin: 0 auto 0 auto;
> > > > >         }
> > > > > 
> > > > > 
>
> > > > > or
>
> > > > > @UiField
> > > > > VerticalPanel vertialPanel;
>
> > > > > public void onModuleLoad() {
>
> > > > > vertialPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
> > > > >         vertialPanel.setWidth("100%");
> > > > >         RootLayoutPanel.get().add(uiBinder.createAndBindUi(this));
>
> > > > > }
>
> > > > > My solutions all ended up with a page showing nothing...
> > > > > Can you perhaps give me a hint where to read more about this hole Ui
> > > > > Binder stuff? I think the google page is not very detailed...
>
> > > > > Thank you very much.
>
> > > > > Mark

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



Re: Changing CSS on the fly

2010-06-02 Thread mmoossen
hi fmod!

it is possible, but not out of the box nor easy to implement nor good
practice.
just use a composite rule with some parent like the body element, ie.

.longItems .myRule {
width: 500px;
}

and do:
RootPanel.getBodyElement().setClassName("longItems");

of course, using a css resource bundle instead of the literal...

HTH
Michael


On May 28, 7:39 pm, fmod  wrote:
> Hi, is there a way to change a CSS Property inside a Rule definition
> on the fly.
>
> I have defined a rule
>
> .myRule {
>   height: 22px;
>   width: 100px;
>   overflow: hidden
>
> }
>
> I have hundreds of DIV elements with that rule.
> I will like to change the width property directly on the rule. Without
> iterating all the elements and
> inlining the new width.
>
> Is that 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Chunking File Upload

2010-06-02 Thread Ken
I'm looking at a problem that I think I might be able to solve using
GWT.  We're considering using GWT for the client of our application
for other reasons, but I think it might also solve this issue.

We're developing a Google App Engine application that processes data
uploaded to it.  As you may know GAE has quota for various things,
including total connection time.  In our case we're running into
another quota regarding database access.  If our uploaded file is
longer than 8500 lines, we exceed our quota and get an exception.

We can envision upload files much larger than this that need to be
processed by our customer.  So what we need to do is process the file
before it is uploaded and then uploaded it to our application in
chunks, say 5000 lines at a time.

Can GWT help us here?  Basically when someone selects a file with
1,000,000 lines in it to upload we would like to pre-process it and
change it to 200 GWT RPC calls, instead of a standard file upload.  In
addition, we would like to provide a progress bar, of course.

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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Testing client code fails with "JDOFatalUserException: Duplicate PMF name"

2010-06-02 Thread ingo
hello everyone,

does anyone know the root cause of this problem? i thought the reason
might be duplicate jdoconfig.xml file. however, it turns out that
deleting this file from the src/META-INF/ directory is not a good idea
since it creates even more exceptions:

[WARN] StandardWrapperValve[shell]: Servlet.service() for servlet
shell threw exception
java.lang.ExceptionInInitializerError
at
crm.server.AbstractCommonService.(AbstractCommonService.java:
37)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at
com.google.gwt.dev.shell.GWTShellServlet.tryGetOrLoadServlet(GWTShellServlet.java:
953)
at
com.google.gwt.dev.shell.GWTShellServlet.service(GWTShellServlet.java:
276)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:
198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
118)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:
929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:
160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
799)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
577)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:637)
Caused by: javax.jdo.JDOFatalUserException: A property named
javax.jdo.PersistenceManagerFactoryClass must be specified, or a jar
file with
a META-INF/services/javax.jdo.PersistenceManagerFactory entry must be
in the classpath, or a property named javax.jdo.option.PersistenceUnit
Name must be specified.
NestedThrowables:
javax.jdo.JDOUserException: You have either specified for this PMF to
use a "persistence-unit" of "transactions-optional" (yet this doesnt e
xist!) or you called JDOHelper.getPersistenceManagerFactory with
"transactions-optional" as the name of a properties file (and this
doesnt e
xist in the CLASSPATH)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
856)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
1092)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
914)
at crm.server.PMF.(PMF.java:20)
... 30 more
Caused by: javax.jdo.JDOUserException: You have either specified for
this PMF to use a "persistence-unit" of "transactions-optional" (yet
th
is doesnt exist!) or you called JDOHelper.getPersistenceManagerFactory
with "transactions-optional" as the name of a properties file (and th
is doesnt exist in the CLASSPATH)
at
org.datanucleus.jdo.JDOPersistenceManagerFactory.initialiseProperties(JDOPersistenceManagerFactory.java:
377)
at
org.datanucleus.jdo.JDOPersistenceManagerFactory.(JDOPersistenceManagerFactory.java:
260)
at
org.datanucleus.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFactory(JDOPersistenceManagerFactory.java:
173)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javax.

Re: login/logout/remember

2010-06-02 Thread Bruno Lopes
Hi Alpine Bluster,

look at this code:

public void onModuleLoad() {

this.setLoginPanel();

loginButton = new Button("Login");

loginButton.addListener(new ButtonListenerAdapter() {

public void onClick(Button button, EventObject e) {

userAuthentication();

}

});

formPanel.addButton(loginButton);

formPanel.setBorder(false);

loginPanel.add(formPanel);

Element appPanelEl = loginPanel.getElement();


 @SuppressWarnings("unused")

KeyMap map = new KeyMap(appPanelEl, new KeyMapConfig() {

{

setKey(EventObject.ENTER);

setKeyListener(new KeyListener() {

public void onKey(int key, EventObject e) {

loginButton.focus();

}

});

}

});


 RootPanel.get("login_widget").add(loginPanel);

}


 private void userAuthentication() {

if (this.userNameField.getValueAsString().equals(""))

Window.alert("username must not be empty.");

else {

loginService = GWT.create(LoginService.class);

String username = this.userNameField.getValueAsString();

String password = this.passwordField.getValueAsString();

this.loginService.login(username, password,

new AsyncCallback() {

public void onFailure(Throwable caught) {

Window.alert("server side failure: " + caught);

}

public void onSuccess(LoginResponse result) {

if (result.isLoginSuccess()){

Window.Location.replace("./../Main.html");

}

else Window.alert("username or password invalid.");

}

});

}

}
...

FOR LOGOUT


private Panel northPanel = new Panel();




Toolbar toolbar = new Toolbar();

 ToolbarButton logoutButton = new ToolbarButton("Sign Out");

logoutButton.addListener( new ButtonListenerAdapter() {

public void onClick( Button button, EventObject e ) {

LoginServiceAsync service = GWT.create(LoginService.class);

service.logout(new AsyncCallback() {

@Override

public void onFailure(Throwable caught) {

caught.printStackTrace();

 }


 @Override

public void onSuccess(Void result) {

Window.Location.replace("./../Login.html");

}

});

}

});

 tabPanel = new TabPanel();

 toolbar.addFill();

toolbar.addText("welcome," + someUser..);

toolbar.addSeparator();

toolbar.addButton(logoutButton);

tabPanel.setWidth(NORMALIZE_SPACING);


 tabPanel.setTopToolbar(toolbar);

northPanel.add(tabPanel);

On Wed, Jun 2, 2010 at 5:25 PM, Magnus  wrote:

> Hi,
>
> I cannot find a minimalistic example that shows how to realize a login/
> logout functionality.
> Could please someone point me to such an example?
>
> I also wonder where to put the different things. For example, the code
> that immediately reacts on the "login" button could be placed within
> the "client" folder of a GWT project, or it could be realized as a
> servlet.
>
> When do I use a servlet and how?
>
> Thank you!
> Magnus
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Feedback on "Large scale app development MVP article"

2010-06-02 Thread Tristan
@nogridbag

What are your reasons for not having the presenter make RPC requests?
The RPC Service is not a presenter itself. Probably the MVP model
should be called MVPSE (services, event bus) because that's what it
takes to make it really work.

On Jun 1, 4:04 pm, jocke eriksson  wrote:
> I will answer my own question here, yes I am !! Thank god for the power of
> google.
>
> 2010/6/1 jocke eriksson 
>
>
>
> > Am I stupid or isn't EventBus an implementation of observer/observable.
>
> > 2010/6/1 Sripathi Krishnan 
>
> > There are a few things that you should keep in mind before you try to
> >> understand the MVP pattern
>
> >>    1. You don't have reflection or observer/observable pattern on the
> >>    client side.
> >>    2. Views depend on DOM and GWT UI Libraries, and are difficult to
> >>    mock/emulate in a pure java test case
>
> >> Now, to answer some of your questions
>
> >> *1. Why should model just be POJO's?*
> >> - Models are shared by the server and client. If models contain code to
> >> make RPC calls, it won't work on the server side.
> >> - Say the models make RPC calls and update themselves. How will the views
> >> know about this? Remember, there is no observer/observable pattern on the
> >> UI.
> >> - The only way multiple views can stay in sync is by listening to events.
> >> And events carry the model objects around, so everybody stays in sync.
>
> >> *2. You would have multiple presenters and one of them would arbitrarily
> >> have the RPC logic to initialize the model?*
> >> Have a central, command style RPC mechanism. When the data comes from the
> >> server, you put it on the event bus so that every view gets the updated
> >> data. If there is an error, you have a plug to do central error handling.
> >> You can also cache results centrally instead of hitting the server every
> >> time.
>
> >> *3. Multiple views for the same model?*
> >> Its actually a very common thing. Say your model is a list of contacts. In
> >> gmail, the chat view needs this model. Also, the compose email view needs 
> >> it
> >> to auto-complete the addresses. These views cannot "observe" the list fof
> >> contacts, so the only way for them to stay in sync is via events.
>
> >> *4. Why is it a poor design decision to let the view know about this
> >> model?*
> >> Because then your views are no longer dumb. And if they are not dumb,
> >> you'd have to test them, which we know is difficult to do via java.
>
> >> If the view knows about the model, you will also be tempted to "read from
> >> the text box and populate the model". At some point, you would be tempted 
> >> to
> >> add the validation in the view. And then there will be error handling. And
> >> slowly and surely, you have reached a stage where you cannot test your app
> >> easily.
>
> >> Which is why you want the view to only listen to low level browser events
> >> like clicks and key events, and then convert them to your apps vocabulary
> >> and then call the Presenter. Since Presenter is the only one which has any
> >> real code, and since it does not depend on the DOM, you can test them using
> >> only JUnit.
>
> >> *5. Event Handling*
> >> That part doesn't have to do with MVP, its purely a performance
> >> optimization. For general concepts on the subject, you may want to read 
> >> this
> >> quirks mode article .
>
> >> --Sri
>
> >> On 1 June 2010 23:08, nogridbag  wrote:
>
> >>> Hi, I've been reading the articles on MVP recently, specifically the
> >>> articles here:
>
> >>>http://code.google.com/webtoolkit/articles/mvp-architecture.html
> >>>http://code.google.com/webtoolkit/articles/mvp-architecture-2.html
>
> >>> I've primarily worked with MVC in the past so this is my first
> >>> exposure to MVP (I've of course heard about it before but never really
> >>> cared to learn about it in depth).
>
> >>> Here's a few things that I wanted to comment on to perhaps help me
> >>> understand this all better.
>
> >>> 1.  Everyone does MVC slightly differently, but I've always treated
> >>> the model as more than a simple data object.  In MVC, I've always
> >>> designed it so that it's the model's responsibility to do RPC calls -
> >>> not the controller.
>
> >>> In MVP, I noticed you suggest to put this logic in the presenter.  It
> >>> seems a little strange to me.  What if you want multiple views to
> >>> essentially be an observer of the same model (I know I'm speaking in
> >>> MVC terms but you get the idea).  You would have multiple presenters
> >>> and one of them would arbitrarily have the RPC logic to initialize the
> >>> model?  I know in practice there's very few times in which you
> >>> actually need to have multiple views for the same model - so I'm OK
> >>> with this decision.  Just an observation...
>
> >>> 2. If the model is simply a DTO as you suggest, why is it a poor
> >>> design decision to let the view know about this model?  DTO's are
> >>> simple POJOs with no logic.  True, the vie

Re: GWT Design Problem

2010-06-02 Thread Tristan
check this out to give you some ideas about the history service..

http://code.google.com/p/handlebars/wiki/PlaceServiceOverview

On Jun 2, 8:08 am, ping2ravi  wrote:
> Ya this approach looks good, thanks kozura.
> Now my app will look like this.
>
> myapp.html#type=profile&id=100               call server and get data
> myapp.html#type=profile&id=234               call server and get data
> myapp.html#type=profile&id=100               get data from cache and
> refresh panel with this data
> myapp.html#type=profile&id=234               get data from cache and
> refresh panel with this data
>
> Thanks all, i guess now i can start writing a basic framework around
> this approach.
>
> On Jun 1, 10:25 pm, kozura  wrote:
>
>
>
> > I recommend you use a single widget with a method to change the data
> > showing in it (user profile, whatever).  You have to be able to
> > populate it anyway, so that's no extra code.  Caching panels is
> > generally a bad idea and a lot of overhead.
>
> > As for limiting server calls, you can cache the data returned to avoid
> > having to recall the server.  Easiest way is a simple map id->data;
> > check it when you need an id, if you have it then call the async
> > callback immediately, otherwise make the RPC call and be sure to stick
> > the result into the cache map when it gets returned.  Of course if the
> > data is dynamic you probably want some mechanism to know when a
> > particular piece of data gets changed and needs re-sent..
>
> > Also you might look at one of the models built on top of GWT which do
> > this for you in various ways.
>
> > On Jun 1, 2:36 pm, ping2ravi  wrote:
>
> > > Thanks Shaffer/Sri,
> > > I think i will go with GWT, the only thing is that i will have to
> > > implement History which usually i dont do while writing the
> > > websites(jsp/html page based). May be thats the reason i thought
> > > writing history is overhead but i guess this over head will give me
> > > good webapp/website.
> > > now with GWT also i have few question like.
> > > e.g. i am on a user profile (some other user) screen i created a
> > > panel(grand parent of every widget inside it) say the url is
> > > myapp.html#type=profile&id=100
> > > then i go to another user's profile and url is now
> > > myapp.html#type=profile&id=234.
>
> > > Question, what is the best approach here. Shall i create a brand new
> > > that grand panel and fill the data from server or shall i reuse the
> > > exisitng panel, clean it and then refill the data from server.
> > > Option 1) If i create always new panel, can i trust GWT that it will
> > > never go out of memeory or after some time user;s browser wont feel
> > > that something heavy has been loaded?  By using this approach i can
> > > make sure that if user come to link myapp.html#type=profile&id=100
> > > again, i wont go to server and will just display the existing Panel.
> > > It will be quickest thing on the earth and user may feel better to see
> > > a page faster then anything.
>
> > > My Server calls will be like
>
> > >  myapp.html#type=profile&id=100               call server and get data
> > >  myapp.html#type=profile&id=234               call server and get data
> > >  myapp.html#type=profile&id=100               ==No need to call
> > > server as one panel already exists which can show profile for user 100
> > >  myapp.html#type=profile&id=234               ==No need to call
> > > server as one panel already exists which can show profile for user 234
>
> > > Probelm which i see in this approach:
> > > 1) Memory can be a problem in this approach. Exp GWT developer may be
> > > able to give me some insight here.
> > > 2) Client view might be bit older then server, but panels can be
> > > removed from history cache using timers say 1 minute etc. But still
> > > older.
>
> > > Option 2) Reruse the existing Panel again and again. Basically create
> > > all main panels which need to have history as singleton(although its
> > > javascript, but in java write code like that) and reuse the panel and
> > > whenevr history changes reset all panels/widgets inside it and reload
> > > the data from Server
> > >  myapp.html#type=profile&id=100               call server and get data
> > >  myapp.html#type=profile&id=234               call server and get data
> > >  myapp.html#type=profile&id=100               call server and get data
> > >  myapp.html#type=profile&id=234               call server and get data
>
> > > In this approach i guesss i will have less problem with memory and
> > > data will always be latest. But Server calls will be increased.That
> > > means extra load on server and user's every click(Back and forward)
> > > will go to server
>
> > > Is there any ther option available here?. If not then out of these
> > > which one of you think will be better. SOmehow i am inclined to option
> > > 1 but need to know if memory will be a problem.
> > > Thanks,
> > > Ravi.

-- 
You received this message because you are subscribed to th

Re: suggest box hides whole page in IE

2010-06-02 Thread suresh
Thanks for the link Holger. Our application has lot of Menus and a
suggestion box. Seems there is no work around for this.

On Jun 2, 4:45 am, hriess  wrote:
> I think there are some issues concerning this problem, e.g. look at
> issue 4532.
> I've still the same problem. A discussion you can find 
> here:http://groups.google.com/group/google-web-toolkit/browse_thread/threa...
>
> Holger

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



Re: Date Serialization in RPC

2010-06-02 Thread leslie
That was it.  Recompiling the servlet jar file with the updated Date
Custom Serializer class worked.
Thanks very much.

On Jun 2, 11:11 am, Paul Robinson  wrote:
> I misled you slightlythe date/date/timestamp custom field
> serializers are also in gwt-servlet.jar
>
> Paul
>

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



Re: Date Serialization in RPC

2010-06-02 Thread leslie
I'm converting an existing java desktop application to the web by
using GWT.  The model classes are already written and they contain a
number of Dates.  The Person example was a trivial representation of a
larger model.  What you're suggesting is more complicated than you
realize.

On Jun 2, 11:44 am, kozura  wrote:
> Or, if all you really want is the actual date entered by the user and
> don't care about the time, you can simply send  mm dd, either as a
> separate object or parameters to an RPC, and avoid custom serializers,
> interpreting Universal Date against timezones, or recompiling GWT.
> Why make sh*t complicated??

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



login/logout/remember

2010-06-02 Thread Magnus
Hi,

I cannot find a minimalistic example that shows how to realize a login/
logout functionality.
Could please someone point me to such an example?

I also wonder where to put the different things. For example, the code
that immediately reacts on the "login" button could be placed within
the "client" folder of a GWT project, or it could be realized as a
servlet.

When do I use a servlet and how?

Thank you!
Magnus

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



Getting the default DateBox() picker to advance year at a time

2010-06-02 Thread Rob Tanner
Hi,

I'm using a DateBox() widget for users to enter their date of birth.
When the picker is displayed, on either side of the month/year
displayed in the center top of the picker are the greater than and
less than arrows for moving forward or backward, month at a time.  I
have not figured out anyway to add year at a time as well (25 or more
years of moths is a lot of clicks).  Is there anyway to accomplish
that?

Thanks,
Rob

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



Re: mathsinh is not function

2010-06-02 Thread jamesmikedup...@googlemail.com
Hi all,
I don't want to sound stupid, but I am not a mathematical genius.
What i do know that is it taking a projected point  (on the screen in
Spherical Mercartor) to find out the lat long,

public LatLon eastNorth2latlon(EastNorth p) {
return new LatLon(
Math.atan(Math.sinh(p.north()))*180/Math.PI,
p.east()*180/Math.PI);
}


So the equivalent to this jsom code that I am porting is the open
layers code.

I think this might be correct, but I am not certain. They look
different.

http://trac.openlayers.org/browser/sandbox/crschmidt/google/lib/OpenLayers/Layer/GoogleMercator.js?rev=3791

inverseMercator: function(merc) {
221
222 var lon = (merc.lon / 20037508.34) * 180;
223 var lat = (merc.lat / 20037508.34) * 180;
224
225 lat = 180/Math.PI * (2 * Math.atan(Math.exp(lat *
Math.PI / 180)) - Math.PI / 2);
226
227 return new OpenLayers.LonLat(lon, lat);
260 },
261


But this projection transformation is common, and also done by the
google maps api. I will have to look into this some more.

thanks,
mike
On Jun 2, 4:37 pm, Eric  wrote:
> On Jun 2, 4:21 am, Brendan Kenny  wrote:
>
> > 2) or, if it needs to remain in js-land, just expose a sinh() function
> > for use just like the page at your first link suggests: (e^x - e^(-
> > x)) / 2. Just be careful with your NaNs and Infs.
>
> Actually, be careful with small values of x too.
>   e^x = 1 + x +x^2/2 + x^3/6 +..., but
>   sinh x = x + x^3 / 6 + 
>
> Using e^x directly for small values of x automatically loses
> significant digits.
> The mathematical definition of a special function is rarely the way
> you want
> to compute it.  Look up computational procedures in AMS 55, or the
> Numerical Recipes series.  You might find yourself using continued
> fractions,
> or Pade approximants. You almost certainly want to use different
> procedures
> for different values of x.
>
> Given that you have expm1 available, try sinh x = e^(-x) (e^(2x) - 1) /
> 2 if you
> have nothing else available: Math.exp(-x) * Math.expm1(2.0*x) / 2.0.
> Switch
> to the standard method when |x| > 0.1.  But in any case, use e^(-x) =
> 1/e^x.
>
> Look up AMS 55 (Abromowitz and Stegun), the Numerical Recipes series
> (Press, et al),
> and Numerical Methods that (Usually) Work (Acton).
>
> Why is the original poster using hyperbolic functions anyway?
>
> Respectfully,
> Eric Jablow

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



Re: Date Serialization in RPC

2010-06-02 Thread kozura
Or, if all you really want is the actual date entered by the user and
don't care about the time, you can simply send  mm dd, either as a
separate object or parameters to an RPC, and avoid custom serializers,
interpreting Universal Date against timezones, or recompiling GWT.
Why make sh*t complicated??

On Jun 2, 9:08 am, leslie  wrote:

> > Date is just an Object around a long-value representing the
> > milliseconds since Jan 1, 1970 00:00:00 UTC. So you can send
> > the UTC time to the server or you evaluate the HTTP-request-
> > headers of the request on the server side to find out what
> > timezone the browser resides in to convert it to UTC on
> > server-side.
>
> This is a very good suggestion and this may help me with the
> situation.  I'll work with this idea a bit.  Thanks again.

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



NullPointerException when adding suggestions to a MultiWordSuggestOracle

2010-06-02 Thread Rafael
Hello!

I am quite baffled by the NullPointerException i get when i add
suggestions to a MultiWordSuggestOracle in order to create a
suggestion box later.

MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
List suggestions = new ArrayList();

for(int i = 0; i < getWidgetData().length; i++)
suggestions.add(getWidgetData()[i]);

oracle.addAll(suggestions);  -> NULL POINTER EXCEPTION

Searching around, i found out that the exception is being propagated
from the following method (method that belongs to the class
com.google.gwt.user.client.ui.MultiWordSuggestOracle)

private String  [Search] normalizeSuggestion(String
formattedSuggestion) {
// Formatted suggestions should already have normalized
whitespace. So we
// can skip that step.
// Lower case suggestion.

formattedSuggestion = formattedSuggestion.toLowerCase(); -> NULL
POINTER EXCEPTION

// Apply whitespace.

if (whitespaceChars != null) {
  for (int i = 0; i < whitespaceChars.length; i++) {
char ignore = whitespaceChars[i];
formattedSuggestion = formattedSuggestion.replace(ignore,
WHITESPACE_CHAR);
  }
   }
return formattedSuggestion;
}

I have to admit i am having trouble coming up with an explanation or
solution, so any help will be most welcome and appreciated!

Thanks in advance!

Rafael

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



  1   2   >