Re: Coding dynamic parts with GWT

2010-03-23 Thread Jochen Schnaidt
Thanks a lot. I will try it this way.

-- 
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 can I access a window object in hand written java script in GWT

2010-03-23 Thread Muthu
Hi,

I have a java script that I use from a third party. I needed to do
some modification and as part of that I need to access the window
object.

Whenever I say window.something I get an error saying window is not
defined. Any idea??

Thanks,
Muthu Shanmugam.

-- 
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: Possible to set style for ScrollPanel?

2010-03-23 Thread jayalakshmi jahagirdar
Hi,U can use the below css.

body {

SCROLLBAR-FACE-COLOR: #abc;;
SCROLLBAR-HIGHLIGHT-COLOR: abc;
SCROLLBAR-SHADOW-COLOR: #abc;
SCROLLBAR-ARROW-COLOR: abc;
SCROLLBAR-TRACK-COLOR: #abc;
SCROLLBAR-DARKSHADOW-COLOR: #abc;
}
regards
Jayalakshmi

On Wed, Mar 24, 2010 at 11:08 AM, Sekhar  wrote:
> Is there a way (ideally with CSS) to customize the scrollbar for
> ScrollPanel?
>
> --
> 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.



Possible to set style for ScrollPanel?

2010-03-23 Thread Sekhar
Is there a way (ideally with CSS) to customize the scrollbar for
ScrollPanel?

-- 
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: Feature Request : Authentication/Authorization built into GWT

2010-03-23 Thread wstrange

A big +1

There is far too much hand waving and "the rest is left as an exercise
for the reader" going on with GWT and authN/authZ.  We need concrete
examples and code.





On Mar 5, 9:21 am, Marley  wrote:
> Authentication and Authorization is something a very large percentage
> of Web Applications need.  I am Googling "GWT Spring Security" and
> various word combinations of "GWT and Security" and finding all sorts
> of different threads and a spaghetti of XML descriptors and Classes
> you need to implement, etc...  Most of the information is out of
> date.  Wow.  This is precisely the thing i expect a framework like GWT
> to hide for me.
>
> It sure would be nice to have a default implementation as part of the
> GWT, baked in if you will. Maybe just include a module, a extra jar or
> two, etc... and write a little code or a few lines of configuration
> and have a login page (you specify a html/jsp/etc... or you build
> dynamically with GWT) which calls your specified code with the login
> page values.  If someone needs to use a different implementation or
> not use it they simply do not include it.
>
> This built in Authentication/Authorization covers the rpc calls errors
> when a session times out, login page, remember me, etc  All the
> things people expect a web application to support. Security is
> fundamental to Web Applications and should not be so painful to
> implement when using a Web Application framework.

-- 
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: Servlet Session

2010-03-23 Thread Chi H
RemoteServiceServlet has a getThreadLocalRequest() method which
returns a HttpServletRequest.
With the HttpServletRequest, you can call the standard getSession()
method

On Mar 22, 5:18 am, guest23  wrote:
> Hi there,
>
> gwt rpc is a nice feature!
>
> Is it possible to get a HTTP Session inside RemoteServiceServlet?
>
> User does login over normal Servlet. I store the login token in
> session.
>
> Thanks for 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.



Re: Multi-tenancy in GWT

2010-03-23 Thread Chad
Kyle,

While you *may* be able to do that, the general GWT way would be to
have your urls look more like this:

mysite.com/myapp.html#/acmeHairSalon
mysite.com/myapp.html#/genericDogCollars

And you can easily access the tokens via the History class (the
getToken method).

HTH,
Chad

On Mar 23, 8:24 pm, Kyle Baley  wrote:
> Not sure I understand. I plan to filter data on the server side of
> things. But I don't know how to configure GWT to allow me to navigate
> to specific client for the entire app.
>
> For example, Acme Hair Salon would navigate to mysite.com/
> acmeHairSalon/myapp.html and Generic Dog Collars would navigate to
> mysite.com/genericDogCollars/myapp.html. Both URLs should map to the
> same instance of the application but in it, I'd check the URL to see
> which company was being used and filter all the data in it
> accordingly. I know how to do the filtering and can probably figure
> out how to check the URL for a company token. But I don't know how to
> configure GWT and/or GAE to use a single instance of the application
> for multiple (generic) URLs that aren't pre-defined. It sounds to me
> like something that should be done in web.xml but again, I don't know
> how.
>
> On Mar 23, 1:01 pm, "dolcra...@gmail.com"  wrote:
>
>
>
> > So you can just built the ui once and always include it in the login
> > page for which ever client as the server should be where you filter/
> > prevent access to data that's not for the current client.
>
> > On Mar 22, 10:41 am, Kyle Baley  wrote:
>
> > > I'm new to GWT and the Java world having been in the .NET space for
> > > about 10 years. Our application will be a multi-tenant one (at least,
> > > to the degree that I understand the definition). We'd like customers
> > > to be able to navigate towww.mysite.com/customerName, then log in
> > > from there. I think I have a handle on how to manage this from the GAE
> > > datastore side but am wondering how to manage this URL mapping in
> > > web.xml for GWT.
>
> > > Also, would like to get some opinions on how to manage the
> > > authentication once it's set up. Here's how I see it working:
> > > - User navigates towww.mysite.com/customerName
> > > - System retrieves company data and stores in session and displays
> > > login page
> > > - User logs in. System authenticates user
> > > - For all RPC calls, system verifies user is logged in *and* checks
> > > that the URL matches the company info in the session
>
> > > Basically, I want to guard against a user logging into one client
> > > site, then navigating to another.
>
> > > Thanks
> > > Kyle

-- 
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: Multi-tenancy in GWT

2010-03-23 Thread Kyle Baley
Not sure I understand. I plan to filter data on the server side of
things. But I don't know how to configure GWT to allow me to navigate
to specific client for the entire app.

For example, Acme Hair Salon would navigate to mysite.com/
acmeHairSalon/myapp.html and Generic Dog Collars would navigate to
mysite.com/genericDogCollars/myapp.html. Both URLs should map to the
same instance of the application but in it, I'd check the URL to see
which company was being used and filter all the data in it
accordingly. I know how to do the filtering and can probably figure
out how to check the URL for a company token. But I don't know how to
configure GWT and/or GAE to use a single instance of the application
for multiple (generic) URLs that aren't pre-defined. It sounds to me
like something that should be done in web.xml but again, I don't know
how.


On Mar 23, 1:01 pm, "dolcra...@gmail.com"  wrote:
> So you can just built the ui once and always include it in the login
> page for which ever client as the server should be where you filter/
> prevent access to data that's not for the current client.
>
> On Mar 22, 10:41 am, Kyle Baley  wrote:
>
> > I'm new to GWT and the Java world having been in the .NET space for
> > about 10 years. Our application will be a multi-tenant one (at least,
> > to the degree that I understand the definition). We'd like customers
> > to be able to navigate towww.mysite.com/customerName, then log in
> > from there. I think I have a handle on how to manage this from the GAE
> > datastore side but am wondering how to manage this URL mapping in
> > web.xml for GWT.
>
> > Also, would like to get some opinions on how to manage the
> > authentication once it's set up. Here's how I see it working:
> > - User navigates towww.mysite.com/customerName
> > - System retrieves company data and stores in session and displays
> > login page
> > - User logs in. System authenticates user
> > - For all RPC calls, system verifies user is logged in *and* checks
> > that the URL matches the company info in the session
>
> > Basically, I want to guard against a user logging into one client
> > site, then navigating to another.
>
> > Thanks
> > Kyle

-- 
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: beta eclipse plugin - running in noserver mode with tomcat - having troubles

2010-03-23 Thread bkbonner
Thanks.  Yep, I'm rockin' now.

On Mar 16, 1:51 pm, Keith Platfoot  wrote:
> Brian,
>
> Glad you figured that out.  I've been meaning to respond to your last couple
> of messages, but have been busy doing last-minute preparations for the
> official 1.3 launch.
>
> Keith
>
> On Tue, Mar 16, 2010 at 12:59 PM, bkbonner wrote:
>
> > Keith, I figured out the problem.  It turns out that the problem can
> > be reproduced when the Apache Tomcat 5.5.27 libraries are in the
> > classpath.  They were inadvertently in the classpath as a runtime
> > dependency -- injected by WTP.  When I pulled them OUT, it works fine.
>
> > That was a pain to figure out.
>
> > Brian
>
> > On Mar 15, 10:31 am, bkbonner  wrote:
> > > Keith, I created a sample using only Eclipse and WTP and I experience
> > > exactly the same problem where I get Illegal constant pool index.
>
> > > i.e. I ruled out MAVEN from the picture.  It receives the same error.
> > > Were you able to involve someone from the UI Binder area to help
> > > figure out what is going on??
>
> > > Brian
>
> > > On Mar 12, 4:40 pm, bkbonner  wrote:
>
> > > > Keith, I included the sample here:
>
> > > >http://code.google.com/p/google-web-toolkit/issues/detail?id=4745
>
> > > > Brian
>
> > > > On Mar 12, 2:48 pm, bkbonner  wrote:
>
> > > > > Keith,
>
> > > > > I was working to put together a sample of what I was seeing and I
> > > > > think I figured out what was wrong.  the ui.xml files don't get
> > copied
> > > > > over by default if they're in the src/main/java directories.  they
> > > > > have to be in src/main/resources, or the maven configuration has to
> > be
> > > > > changed to make this work.  I haven't tried it yet, but I'm pretty
> > > > > sure that's the reason for the prior failures.
>
> > > > > Brian
>
> > > > > On Mar 12, 1:57 pm, bkbonner  wrote:
>
> > > > > > I got the other JARs removed.  I changed the scope to provided and
> > > > > > they're gone, but the results are the same.  :(
>
> > > > > > If you have any suggestions, they'd be appreciated.
>
> > > > > > I'll still plug away.  If I pull out the UI Binder stuff it works
> > > > > > fine.  I'll look at pulling another working example in.
>
> > > > > > Brian
>
> > > > > > 13:45:30.618 [ERROR] [Application] Failed to create an instance of
> > > > > > 'com.test.gwt.client.ActivityLogView' via deferred binding
> > > > > > java.lang.VerifyError: (class:
> > com/google/gwt/core/client/Scheduler,
> > > > > > method:  signature: ()V) Illegal constant pool index
> > > > > >     at
>
> > com.google.gwt.dom.client.StyleInjector.schedule(StyleInjector.java:
> > > > > > 389)
> > > > > >     at
>
> > com.google.gwt.dom.client.StyleInjector.inject(StyleInjector.java:382)
> > > > > >     at
>
> > com.google.gwt.dom.client.StyleInjector.inject(StyleInjector.java:222)
> > > > > >     at
>
> > com.google.gwt.dom.client.StyleInjector.inject(StyleInjector.java:208)
> > > > > >     at
>
> > com.test.gwt.client.com_test_gwt_client_ActivityLogView_ActivityLogViewUiBinderImpl_GenBundle_default_InlineClientBundleGenerator
>
> > $1.ensureInjected(com_test_gwt_client_ActivityLogView_ActivityLogViewUiBinderImpl_GenBundle_default_InlineClientBundleGenerator.java:
> > > > > > 14)
> > > > > >     at
>
> > com.test.gwt.client.ActivityLogView_ActivityLogViewUiBinderImpl.createAndBindUi(ActivityLogView_ActivityLogViewUiBinderImpl.java:
> > > > > > 25)
> > > > > >     at
>
> > com.test.gwt.client.ActivityLogView_ActivityLogViewUiBinderImpl.createAndBindUi(ActivityLogView_ActivityLogViewUiBinderImpl.java:
> > > > > > 1)
> > > > > >     at
> > com.test.gwt.client.ActivityLogView.(ActivityLogView.java:
> > > > > > 28)
> > > > > >     at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > > > > > Method)
> > > > > >     at
>
> > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
> > > > > > 39)
> > > > > >     at
>
> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
> > > > > > 27)
> > > > > >     at
> > java.lang.reflect.Constructor.newInstance(Constructor.java:494)
> > > > > >     at
>
> > com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
> > > > > > 422)
> > > > > >     at
>
> > com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39)
> > > > > >     at com.google.gwt.core.client.GWT.create(GWT.java:98)
> > > > > >     at
> > com.test.gwt.client.Application.onModuleLoad(Application.java:
> > > > > > 24)
> > > > > >     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:585)
> > > > > >     at
> > com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
> > > > > > 369)
> > > > > >     

Re: beta eclipse plugin - running in noserver mode with tomcat - having troubles

2010-03-23 Thread bkbonner
It looks like I actually had a conflict with a bad jar dependency
coming in from another dependency.  I resolved it here:
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/9a43abaf2ad5d185#

On Mar 10, 12:39 pm, bkbonner  wrote:
> OK, it looks like the -noserver doesn't get injected into the debug
> configuration based on any of the GWT Toolkit settings.   I don't have
> it working yet, but I've tried:
>
> -remoteUI ${gwt_remote_ui_server_port}:${unique_id} 
> -startupUrlhttp://localhost:8080:/testproject/loganalyzer.html-logLevel INFO -
> noserver -war C:\work\workspace-galileo\testproject\src\main\webapp
> com.test.gwt.Application
>
> I get:
>
> 11:38:22.194 [ERROR] [Application] Failed to load module 'Application'
> from user agent 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
> 1.9.1.8) Gecko/20100202 Firefox/3.5.8' at localhost:4767
> java.lang.NoSuchFieldError:
> reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
>     at
> com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions(JdtCompiler.java:
> 310)
>     at com.google.gwt.dev.javac.JdtCompiler
> $CompilerImpl.(JdtCompiler.java:148)
>     at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
> 466)
>     at com.google.gwt.dev.javac.CompilationStateBuilder
> $CompileMoreLater.compile(CompilationStateBuilder.java:142)
>     at
> com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:
> 281)
>     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.DevModeBase
> $UiBrowserWidgetHostImpl.createModuleSpaceHost(DevModeBase.java:99)
>     at
> com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
> 180)
>     at
> com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
> 380)
>     at
> com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
> 222)
>     at java.lang.Thread.run(Thread.java:595)
>
> It would be nice to have an option to use existing server (which would
> inject the -noserver option)
>
> Also, the performance of the DebugConfiguration screen while I'm
> typing is really slow... I suspect there is parsing going on?   I saw
> that you have to click apply before running debug, but is there
> anything else?
>
> Any suggestions would be appreciated.
>
> On Mar 10, 10:49 am, bkbonner  wrote:
>
> > Keith,
>
> > I'm trying to run our app using the eclipse beta plugin.   I'm not
> > sure if I have things configured correctly.
>
> > The tree for our app is like:
>
> > src\main\java\com\test\gwt\App.gwt.xml
> > src\main\java\com\test\gwt\client\Application.java
> > ...
> > src\main\webapp\
> > src\main\webapp\WEB-INF
> > src\main\webapp\WEB-INF\classes
> > src\main\webapp\WEB-INF\lib
> > ...
> > src\test\java\
>
> > The setup for the google web toolkit is:
>
> > Web Application
> >   X This project has a WAR directory  (checked)
> >      WAR Directory:  src/main/webapp
> >      [ ] Launch and deploy from this directory  (unchecked)  I've
> > tried it checked as well
>
> > Web Toolkit
> >    GWT 2.0.3
>
> > In the Debug Configuration:
>
> > Main
> >      Project
> >          testproject
> >      Main class
> >          com.google.gwt.dev.DevMode
> > Server
> >      [  ] Run built-in server  (unchecked)
>
> > GWT  (defaults)
> >      Available Modules
> >           Application - com.test.gwt
>
> > Arguments
> >     Program Arguments
> >          -war C:\work\workspace\testproject\src\main\webapp -remoteUI $
> > {gwt_remote_ui_server_port}:${unique_id} -logLevel INFO -noserver -
> > startupUrlhttp://localhost:8080/testproject/index.html
> > com.test.gwt.Application
>
> > When I set a breakpoint in my client code... it doesn't recognize that
> > the code is loaded.  I get this in the error console:
>
> > Exception in thread "Code server for Application from Mozilla/5.0
> > (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/
> > 3.5.8 
> > onhttp://localhost:8080/testproject/index.html?gwt.codesvr=localhost:9997
> > @ ;bm'fwKmW~\.LHz1" java.lang.RuntimeException:
> > java.util.concurrent.ExecutionException:
> > com.google.gwt.dev.shell.remoteui.MessageTransport$RequestException:
> > java.lang.NullPointerException
> >         at
> > com.google.gwt.dev.shell.remoteui.ViewerServiceClient.waitForResponse(ViewerServiceClient.java:
> > 309)
> >         at
> > com.google.gwt.dev.shell.remoteui.ViewerServiceClient.createLogger(ViewerServiceClient.java:
> > 268)
> >         at
> > com.google.gwt.dev.shell.remoteui.ViewerServiceClient.addModuleLog(ViewerServiceClient.java:
> > 167)
> >         at
> > com.google.gwt.dev.shell.remoteui.RemoteUI.getModuleLogger(RemoteUI.java:
> > 75)
> >         at com.google.gwt.dev.DevModeBase
> > $UiBrowserWidgetHostImpl.createModuleLogger(DevModeBase.java:85)
> >         at
> > co

reportUnusedDeclaredThrownExceptionIncludeDocCommentReference

2010-03-23 Thread bkbonner
On one of my systems I'm still struggling to get GWT working properly.
It keeps throwing this error:

17:33:47.428 [ERROR] [Application] Failed to load module 'Application'
from user agent 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
1.9.2.2) Gecko/20100316 Firefox/3.6.2' at localhost:2566
java.lang.NoSuchFieldError:
reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
at
com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions(JdtCompiler.java:
310)
at com.google.gwt.dev.javac.JdtCompiler
$CompilerImpl.(JdtCompiler.java:148)
at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
466)
at com.google.gwt.dev.javac.CompilationStateBuilder
$CompileMoreLater.compile(CompilationStateBuilder.java:142)
at
com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:
281)
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.DevModeBase
$UiBrowserWidgetHostImpl.createModuleSpaceHost(DevModeBase.java:99)
at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
180)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
380)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
222)
at java.lang.Thread.run(Thread.java:595)


It looks like the CompilerOptions that is referenced inside the
JDTCompiler has an eclipse package:

org.eclipse.jdt.internal.compiler.impl.CompilerOptions

Lo and behold, I located this class in Eclipse and found out that one
of the dependencies in my project had eclipse:jdtcore:3.1.0.jar as a
dependency.

I removed this dependency because it obviously isn't needed at compile-
time.

Hope this helps someone in the future.

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



User auth in GWT application

2010-03-23 Thread Jacek Żebrowski

Hi !

Could you guys point me to some sources regarding implementing user auth 
in GWT ?


i know the most common approach is separate login page restricting 
access to html file - this does not satisfy me however


please post in any tips on the subject...

--
Jacek Zebrowski

--
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: Coding dynamic parts with GWT

2010-03-23 Thread Jeff Chimene
I'm facing a similar problem; I want to create HTML fragments
dynamically, not just a single widget. I also want to do this in the
context of the net.customware MVP framework. I decided I needed a
handler since the user can increment and decrement the widget count. I
have many of these dynamic widgets; I don't want to use a grid data
entry model.

1. Create an instance manager class. This class manages a private class:
ViewPieces {
int instanceCount;
InstanceView instanceViewGenerator;
Panel panel;
}

and two structures:
1. Map>
2. Map

It has the following methods:
getInstance(String instanceId, int instance)
getInstanceCount(String instanceId)
onInstanceCountChange
This event handler creates a new InstanceView.
Fire  an event to this handler when the user
changes the instance count.

register(String instanceId, Panel groupInstance,
InstanceView generator)
instanceId  is the key into the structures managed
by InstanceManager
groupInstance   is the attach point for the generated
widget
generator   is the callback that creates an
instance of InstanceView

Call register in the MVP startProcessing method. e.g.:
instanceManager.register(CONSTANTS.instanceAirConditioning(),
groupAirConditioningInstance, new InstanceView() {
@Override
public InstanceView get(int i) {
return new AirConditioningInstanceView(i);
}
});

2. Create an abstract class InstanceView which extends Composite. It has
the following methods:
asWidget
buildInstance(String prefix, String instanceId, int instance,
Panel parent, Panel attachPoint)
This creates whatever widget you need. You
probably don't need attachPoint, but you
probably do need parent. Called by the
generator ctor
(e.g. AirConditioningInstanceView())
get
getInstanceSeq

I'm happy to share some code if you're interested

On 03/23/2010 01:21 PM, enTropy Fragment wrote:
> You can also add listeners inside the bucle so every texBox can call a
> different method when the inside value changes, for example :)
> 
> If you need the instances of the texboxes outside from the bucle, wich
> seems your case, you can always create an ArrayList and add them to both
> the list and the parent.
> 
> 2010/3/23 rudolf michael mailto:roud...@gmail.com>>
> 
> well this is easy dude.
> Onblur or onchange over the textbox that serves as an input, you
> catch that event and parse the input so you can get the desired number.
> after that you choose in which panel/parent node you want to create
> those textboxes and accordingly in your listener you can do :
> for(int i=0; i < number; i++)
> parent.add(new TextBox());
> 
> if you want to have names for your textboxes then inside your loop
> you can do myTextBox.setName("myName"+i);
> 
> 
> On Tue, Mar 23, 2010 at 5:04 PM, Jochen Schnaidt
> mailto:j.schna...@t-online.de>> wrote:
> 
> Hi,
> I have a question about coding dynamic parts with GWT. I already
> searched for an answer, but didn’t find something which could
> help me.
> May be I have the wrong keywords? I don’t know…
> 
> So, the problem: My concept is that my application reads a integer
> from a TextBox after the user wrote it in there e.g. 3 and then
> creates 3 new TextBoxes.
> 
> I read the 3 no problems and have it in a variable but now I want to
> add the TextBoxes. In a scripting language I can build new
> objects and
> give a “dummyname” + digit as name to it and use it normal but
> in Java
> I can’t modify my variable’s name. So I need another method.
> 
> I tried to make something like an array of TextBox but it didn’t
> work
> out.
> 
> So please help me with this. I don’t get it on my own. Thanks a lot.
> 
> Greetings Jochen
> 
> --
> You received this message because you are subscribed to the
> Google Groups "Google Web Toolkit" group.
> To post to this group, send email to
> google-web-toolkit@googlegroups.com
> .
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> 

Re: 'Stop running this script' message in browsers

2010-03-23 Thread Eric


On Mar 23, 2:21 pm, Jeff Chimene  wrote:
> On 03/23/2010 11:05 AM, keyboard_samurai wrote:
>
> > Hi,
>
> > I need to know if anyone has solved the script running too long issue
> > in internet explorer. I have a requirement where we need to show a lot
> > of information (in thousands) in tree structure. I was just checking
> > using GWT EXT and came across this issue. The issue in detail can be
> > found @http://support.microsoft.com/kb/175500. As i interpret the
> > issue arises bcoz of the high volume of data to be shown is crossing
> > the maximum no of statements which can be executed.
>
> > Has anyone encountered such an issue and fixed it  ?
>
> Does the script process all data at once? It may need to process the
> data in batces.

If the original poster can, just return the direct children of a node
when the
node is opened. If he needs to, implement paging on the server, and
use
IncrementalCommand to release control to the browser after each page.

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: Coding dynamic parts with GWT

2010-03-23 Thread enTropy Fragment
You can also add listeners inside the bucle so every texBox can call a
different method when the inside value changes, for example :)

If you need the instances of the texboxes outside from the bucle, wich seems
your case, you can always create an ArrayList and add them to both the list
and the parent.

2010/3/23 rudolf michael 

> well this is easy dude.
> Onblur or onchange over the textbox that serves as an input, you catch that
> event and parse the input so you can get the desired number.
> after that you choose in which panel/parent node you want to create those
> textboxes and accordingly in your listener you can do :
> for(int i=0; i < number; i++)
> parent.add(new TextBox());
>
> if you want to have names for your textboxes then inside your loop you can
> do myTextBox.setName("myName"+i);
>
>
> On Tue, Mar 23, 2010 at 5:04 PM, Jochen Schnaidt 
> wrote:
>
>> Hi,
>> I have a question about coding dynamic parts with GWT. I already
>> searched for an answer, but didn’t find something which could help me.
>> May be I have the wrong keywords? I don’t know…
>>
>> So, the problem: My concept is that my application reads a integer
>> from a TextBox after the user wrote it in there e.g. 3 and then
>> creates 3 new TextBoxes.
>>
>> I read the 3 no problems and have it in a variable but now I want to
>> add the TextBoxes. In a scripting language I can build new objects and
>> give a “dummyname” + digit as name to it and use it normal but in Java
>> I can’t modify my variable’s name. So I need another method.
>>
>> I tried to make something like an array of TextBox but it didn’t work
>> out.
>>
>> So please help me with this. I don’t get it on my own. Thanks a lot.
>>
>> Greetings Jochen
>>
>> --
>> 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.
>

-- 
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: HorizontalSplitPanel children

2010-03-23 Thread TM
Aha! It was something stupid, I was just missing a setSize() at one of
the levels of nested controls. Not sure how I missed that.

Thanks for the below Ian, I'll definitely use that style stuff to
debug the layout!


On Mar 22, 10:25 pm, Ian Bambury  wrote:
> Sorry, I didn't read that properly.
>
> If you want to post some code, that would be good.
>
> This works OK, though...
>
> import com.google.gwt.core.client.EntryPoint;
> import com.google.gwt.dom.client.Style.BorderStyle;
> import com.google.gwt.dom.client.Style.Unit;
> import com.google.gwt.user.client.ui.DockPanel;
> import com.google.gwt.user.client.ui.HorizontalSplitPanel;
> import com.google.gwt.user.client.ui.Label;
> import com.google.gwt.user.client.ui.RootPanel;
>
> public class BasicProject implements EntryPoint
> {
>     public void onModuleLoad()
>     {
>         DockPanel d = new DockPanel();
>         RootPanel.get().add(d);
>         d.setSize("400px", "400px");
>         d.getElement().getStyle().setMargin(50, Unit.PX);
>         d.getElement().getStyle().setBorderColor("red");
>         d.getElement().getStyle().setBorderWidth(1, Unit.PX);
>         d.getElement().getStyle().setBorderStyle(BorderStyle.DOTTED);
>
>         HorizontalSplitPanel p = new HorizontalSplitPanel();
>         d.add(p, DockPanel.CENTER);
>         p.setSize("100%", "100%");
>
>         Label left = new Label("Left");
>         left.getElement().getStyle().setBackgroundColor("cyan");
>         p.setLeftWidget(left);
>
>         Label right = new Label("Left");
>         right.getElement().getStyle().setBackgroundColor("yellow");
>         p.setRightWidget(right);
>     }
>
> }
>
> Ian
>
> http://examples.roughian.com
>
> On 22 March 2010 21:39, TM  wrote:
>
> > I'm trying to keep it simple and avoid any extensions like gwt-ext
> > unless I have to. I thought this seemed like a fairly straightforward
> > use of HorizontalSplitPanel?
>
> > BTW Ian, I have found your site very useful lately, thanks!
>
> > On Mar 22, 8:45 pm, Ian Bambury  wrote:
> > > You might be better off in a gwt-ext forum
>
> > > Ian
>
> > >http://examples.roughian.com
>
> > > On 22 March 2010 19:39, TM  wrote:
>
> > > > BorderLayout
>
> > --
> > 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.



Referencing DTO class help needed. Weird Serialization Errors

2010-03-23 Thread Mykhaylo Lytvynuk
My project contains 2 source folder, one is generic J2EE application
another is smartCleintGWT,

I want to use some already existing DTO classes from first source
folder (src)
My GWT are in src_console.

I want to use DMXLicense class for client and server.
This class should come over RemoteService to the client and should use
it to extract required data.

DMXLicense is under com.ho.no.dmx.synch.server.model

I've created file model.gwt.xml in com.ho.no.dmx.synch.server package:





then I've added  into my GWT NoAdmin applciation xml file












But when I try to compile it - I'm getting:


Compiling module com.ho.no.NoAdmin
   Scanning for additional dependencies: file:/C:/..Projects/NoAdmin/Ho
%20DMX%20Console/src_console/com/ho/no/client/view/DashboardView.java
  Computing all possible rebind results for
'com.ho.no.client.NoRPC'
 Rebinding com.ho.no.client.NoRPC
Invoking
com.google.gwt.dev.javac.standardgeneratorcont...@1b65b7f
   Generating client proxy for remote service interface
'com.ho.no.client.NoRPC'
  [ERROR] com.ho.dmx.synch.server.model.DMXLicense is
not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' or
'java.io.Serializable' nor does it have a custom field serializer
(reached via com.ho.dmx.synch.server.model.DMXLicense)
  [ERROR] com.ho.dmx.synch.server.model.DMXLicense has
no available instantiable subtypes. (reached via
com.ho.dmx.synch.server.model.DMXLicense)
 [ERROR]subtype
com.ho.dmx.synch.server.model.DMXLicense is not assignable to
'com.google.gwt.user.client.rpc.IsSerializable' or
'java.io.Serializable' nor does it have a custom field serializer
(reached via com.ho.dmx.synch.server.model.DMXLicense)
   [ERROR] Errors in 'file:/C:/..Projects/NoAdmin/Ho%20DMX%20Console/
src_console/com/ho/no/client/view/DashboardView.java'
  [ERROR] Line 81:  Failed to resolve 'com.ho.no.client.NoRPC' via
deferred binding
   Scanning for additional dependencies: jar:file:/C:/..Projects/.libs/
all/smartgwt.jar!/com/smartgwt/client/util/I18nUtil.java
  [WARN] The following resources will not be created because they
were never committed (did you forget to call commit()?)
 [WARN] C:\Users\MLYTVY~1\AppData\Local\Temp
\gwtc4733475552106072888.tmp\com.ho.no.NoAdmin\compiler
\com.ho.no.client.NoRPC.rpc.log
  [WARN] For the following type(s), generated source was never
committed (did you forget to call commit()?)
 [WARN] com.ho.no.client.NoRPC_Proxy
   [ERROR] Cannot proceed due to previous errors

-- 
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: XML Parser error in hasAttributes()

2010-03-23 Thread Ignat Alexeyenko
I mean (&& was added):

static native boolean hasAttributes(JavaScriptObject jsObject) /*-{
return jsObject.attributes.length != null && jsObject.attributes.length
!= 0;
  }-*/;

--
Kind regards,
Ignat Alexeyenko

On Tue, Mar 23, 2010 at 8:46 PM, Ignat Alexeyenko  wrote:

> Hi!
>
> I have an error in GWT XML parser (GWT 1.7.1)
>
> Look at the following piece of code (XMLParserImpl.java:line182):
>
> static native boolean hasAttributes(JavaScriptObject jsObject) /*-{
> return jsObject.attributes.length != 0;
>   }-*/;
>
> In Firefox I've got a following exception when calling node.hasAttributes()
> method:
> node.jsObject.attributes is null
>
> Does anyone meet the following exception?
>
> It looks like I need to write a native method and use it instead of GWT's
> hasAttributes() one.
> The method should work like that:
>
> static native boolean hasAttributes(JavaScriptObject jsObject) /*-{
> return jsObject.attributes.length != null jsObject.attributes.length !=
> 0;
>   }-*/;
>
>  Any other ideas?
> Thank you.
>
> --
> Kind regards,
> Ignat Alexeyenko.
>

-- 
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: No source code is available for type com.google.gwt.user.server.rpc.RemoteServiceServlet;

2010-03-23 Thread Mykhaylo Lytvynuk
Ah that is right! Thank you

On Mar 23, 2:26 pm, Paul Robinson  wrote:
> Instead of
>
>                 NoRPCAsync service = (NoRPCAsync) GWT.create(NoRPCImpl.class);
>
> try
>
>                 NoRPCAsync service = (NoRPCAsync) GWT.create(NoRPC.class);
>
> or whatever you've called the non-async version of your rpc. You can
> only pass client-side classes to GWT.create()
>
> 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.



XML Parser error in hasAttributes()

2010-03-23 Thread Ignat Alexeyenko
Hi!

I have an error in GWT XML parser (GWT 1.7.1)

Look at the following piece of code (XMLParserImpl.java:line182):

static native boolean hasAttributes(JavaScriptObject jsObject) /*-{
return jsObject.attributes.length != 0;
  }-*/;

In Firefox I've got a following exception when calling node.hasAttributes()
method:
node.jsObject.attributes is null

Does anyone meet the following exception?

It looks like I need to write a native method and use it instead of GWT's
hasAttributes() one.
The method should work like that:

static native boolean hasAttributes(JavaScriptObject jsObject) /*-{
return jsObject.attributes.length != null jsObject.attributes.length !=
0;
  }-*/;

Any other ideas?
Thank you.

--
Kind regards,
Ignat Alexeyenko.

-- 
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: No source code is available for type com.google.gwt.user.server.rpc.RemoteServiceServlet;

2010-03-23 Thread Paul Robinson
Instead of

NoRPCAsync service = (NoRPCAsync) GWT.create(NoRPCImpl.class);

try

NoRPCAsync service = (NoRPCAsync) GWT.create(NoRPC.class);


or whatever you've called the non-async version of your rpc. You can
only pass client-side classes to GWT.create()

Paul

Mykhaylo Lytvynuk wrote:
> Thank you Paul, but without this line my other client class
> DashboardView which does that:
>
>   NoRPCAsync service = (NoRPCAsync) GWT.create(NoRPCImpl.class);
>   ((ServiceDefTarget) service).setServiceEntryPoint(GWT
>   .getModuleBaseURL()
>   + "/NoService");
>
>  Complains like that:
>
>   [ERROR] Errors in 'file:/C:/..Projects/NoAdmin/NoAdmin/src/com/
> ho/no/client/view/DashboardView.java'
>  [ERROR] Line 80: No source code is available for type
> com.ho.no.server.NoRPCImpl; did you forget to inherit a required
> module?
>
> it puzzles me.
>
> On Mar 23, 1:44 pm, Paul Robinson  wrote:
>   
>> You have a bug in your module's .gwt.xml file here:
>>
>> 
>>
>> This line should be removed. It's telling GWT to compile the code in
>> your server directory to javascript.
>>
>> 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: 'Stop running this script' message in browsers

2010-03-23 Thread Jeff Chimene
On 03/23/2010 11:05 AM, keyboard_samurai wrote:
> Hi,
> 
> I need to know if anyone has solved the script running too long issue
> in internet explorer. I have a requirement where we need to show a lot
> of information (in thousands) in tree structure. I was just checking
> using GWT EXT and came across this issue. The issue in detail can be
> found @ http://support.microsoft.com/kb/175500. As i interpret the
> issue arises bcoz of the high volume of data to be shown is crossing
> the maximum no of statements which can be executed.
> 
> Has anyone encountered such an issue and fixed it  ?

Does the script process all data at once? It may need to process the
data in batches.

-- 
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: Example: (simple) Label with image?

2010-03-23 Thread Ralf B
That doesn't help. I know how to do it in Swing and AWT.

Ralf


On Tue, Mar 23, 2010 at 2:36 AM, mram  wrote:
> I haven't seen something like that. I know that with AWT, you can use
> an icon and put it into a label, but this is not the case because you
> can't use AWT with GWT. But still I tell you how you should do it in
> AWT:
>   JLabel label = new JLabel();
>   ImageIcon icon = new ImageIcon("images/my_image.jpg");
>   ImageIcon iconoEscala = new
> ImageIcon(icon.getImage().getScaledInstance(400, 400,
> java.awt.Image.SCALE_DEFAULT));
>   label.setIcon(iconoEscala);
>
>
>
> On 22 mar, 20:01, Ralf B  wrote:
>> Is there a very very simple way to create a label with an image
>> without using CSS, or is the only way to use HTML objects? I was
>> hoping for a constructor like this:
>>
>> Image myImage = new Image(url);
>> Label myLabel = new Label(myimage, "This is the text");
>>
>> Best 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.
>
>

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



'Stop running this script' message in browsers

2010-03-23 Thread keyboard_samurai
Hi,

I need to know if anyone has solved the script running too long issue
in internet explorer. I have a requirement where we need to show a lot
of information (in thousands) in tree structure. I was just checking
using GWT EXT and came across this issue. The issue in detail can be
found @ http://support.microsoft.com/kb/175500. As i interpret the
issue arises bcoz of the high volume of data to be shown is crossing
the maximum no of statements which can be executed.

Has anyone encountered such an issue and fixed it  ?

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.



Re: No source code is available for type com.google.gwt.user.server.rpc.RemoteServiceServlet;

2010-03-23 Thread Mykhaylo Lytvynuk
Thank you Paul, but without this line my other client class
DashboardView which does that:

NoRPCAsync service = (NoRPCAsync) GWT.create(NoRPCImpl.class);
((ServiceDefTarget) service).setServiceEntryPoint(GWT
.getModuleBaseURL()
+ "/NoService");

 Complains like that:

  [ERROR] Errors in 'file:/C:/..Projects/NoAdmin/NoAdmin/src/com/
ho/no/client/view/DashboardView.java'
 [ERROR] Line 80: No source code is available for type
com.ho.no.server.NoRPCImpl; did you forget to inherit a required
module?

it puzzles me.

On Mar 23, 1:44 pm, Paul Robinson  wrote:
> You have a bug in your module's .gwt.xml file here:
>
>     
>
> This line should be removed. It's telling GWT to compile the code in
> your server directory to javascript.
>
> 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: No source code is available for type com.google.gwt.user.server.rpc.RemoteServiceServlet;

2010-03-23 Thread Paul Robinson
You have a bug in your module's .gwt.xml file here:




This line should be removed. It's telling GWT to compile the code in
your server directory to javascript.

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: No source code is available for type com.google.gwt.user.server.rpc.RemoteServiceServlet;

2010-03-23 Thread Mykhaylo Lytvynuk
Thank you Rudolf for the reply.
But I have all jars:

gwt-api-checker.jar
gwt-dev.jar
gwt-servlet.jar
gwt-soyc-vis.jar
gwt-user.jar

Included in my project build path in Eclipse, but it seems to me GWT
compiler doesn't really care about Eclipse Java settings.
How to include jars in GWT compiler, I have no idea.

In Google settings for the project In Web Toolkit I have selected Use
Google Web Toolkit and UseDefault SDK gwt-2.0.2

No other changes can be done.

> I guess that you need to include the gwt-servlet.jar in your classpath. make
> sure that it is also present in the lib of your app server.

-- 
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: Server side: start independent Thread at deploy on server

2010-03-23 Thread dolcra...@gmail.com
I think you need to review GWT and the official tutorials.
1. You cannot use threads on the clientside as javascript is single
threaded.
2. Review the RPC mechanism in GWT as it requires a service interface,
an asynchronous interface, a servlet implementing the service, and
some client code to create and bind the service.

On Mar 23, 10:04 am, piXi  wrote:
> Hellow,
>
> I'm trying to develop an aplication with GWT.
> And have came across with a problem, but first what I wish to
> develop.
>
> And GWT application that will server user data, data will be get over
> RPC and hibernate.
> Now I need thread that will start up socket server and listen incoming
> connection from so called agents.
>
> Do I need to create new module or ?
>
> One solution that works but its not nice solution is :
>
> at EntryPoint in constructor I create a singletone and start the
> Thread.  Next time page is loaded I just return.
> Instance to singleton.
>
> I have tested and it works.
>
> But i do not like getInstance call every time page will refresh.
>
> From tutorials GWT looks very nice, but  I know that I still need much
> of understanding GWT.
>
> Best regards Primoz

-- 
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: Multi-tenancy in GWT

2010-03-23 Thread dolcra...@gmail.com
So you can just built the ui once and always include it in the login
page for which ever client as the server should be where you filter/
prevent access to data that's not for the current client.

On Mar 22, 10:41 am, Kyle Baley  wrote:
> I'm new to GWT and the Java world having been in the .NET space for
> about 10 years. Our application will be a multi-tenant one (at least,
> to the degree that I understand the definition). We'd like customers
> to be able to navigate towww.mysite.com/customerName, then log in
> from there. I think I have a handle on how to manage this from the GAE
> datastore side but am wondering how to manage this URL mapping in
> web.xml for GWT.
>
> Also, would like to get some opinions on how to manage the
> authentication once it's set up. Here's how I see it working:
> - User navigates towww.mysite.com/customerName
> - System retrieves company data and stores in session and displays
> login page
> - User logs in. System authenticates user
> - For all RPC calls, system verifies user is logged in *and* checks
> that the URL matches the company info in the session
>
> Basically, I want to guard against a user logging into one client
> site, then navigating to another.
>
> Thanks
> Kyle

-- 
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: tomcat and apache problem

2010-03-23 Thread Fran
Hi ani,

I read it but its the same problem. It dont work with comet.
I you read all the post, you can see that mod_jk dont work.

Thanks

2010/3/23 ani 

> Hi,
>
>   Go through this post
> http://blog.findasolution.in/2010/03/apache-tomcat-connectorintegrate-apache-with-tomcat/
> hope this will help you.
>
> On Feb 21, 6:10 am, dablack  wrote:
> > I borrowed that connector configuration from a website I came across.
> > I'm not sure why port=0 either. If I put more research into the NIO
> > connector I could probably find out. Why don't you try adding the
> > lines,
> >
> > enableLookups="false"
> > scheme="http"
> >
> > to the NIO connector configuration in the server.xml file that I gave
> > you earlier.
> >
> > As far as accessing the ajp service usinghttp://localhost:8009/servlet,
> > that will not work. Your browser uses the http protocol and the 8009
> > port is being serviced by the ajp protocol. You should still have your
> > connector using the http protocol configured to listen on port 8081.
> >
> > Hopefully the scheme line above will help the NIO connector
> > communicate back to Apache.
> >
> > On Feb 20, 4:45 pm, Fran  wrote:> I test your config,
> dablack, but I cant connect to the servlet.
> > > With this config I cant access not even to:
> http://localhost:8009/servlet
> > > that is tomcat directly without apache
> >
> > > On 20 feb, 23:36, Fran  wrote:
> >
> > > > I cant undestand why this config:
> >
> > > >  > > > channelNioSocket.maxThreads="
> > > > 150"
> > > >   channelNioSocket.maxSpareThreads="50"
> > > > channelNioSocket.minSpareThreads="25"
> > > >   channelNioSocket.bufferSize="16384" />
> >
> > > > Why port 0 ?
> >
> > > > 2010/2/20 dablack 
> >
> > > > > Fran,
> >
> > > > > I'm really not an expert on setting up the connection between
> Apache
> > > > > and Tomcat but I believe that the connections only operate in two
> > > > > protocols: http or ajp. NIO is a Tomcat connector that can
> communicate
> > > > > in either http or ajp. Because of that, I don't see any reason that
> > > > > the Apache mod_jk connector module couldn't communicate with the
> NIO
> > > > > connector. Since I don't use an NIO connector I could be wrong, but
> > > > > that is the way I see it. As a starting point, try these
> > > > > configurations:
> >
> > > > > server.xml
> >
> > > > >  > > > > channelNioSocket.maxThreads="150"
> > > > >   channelNioSocket.maxSpareThreads="50"
> > > > > channelNioSocket.minSpareThreads="25"
> > > > >   channelNioSocket.bufferSize="16384" />
> >
> > > > > (You seem to want to use port 8081 which should be fine, but the
> > > > > standard ajp port is 8009. However, I wouldn't put it on port 8081
> if
> > > > > you are already using that port for another protocol such as http.)
> >
> > > > > httpd.conf
> >
> > > > > LoadModule jk_module modules/mod_jk.so
> > > > > JkWorkersFile conf/workers.properties
> > > > > JkLogFile /var/log/httpd/mod_jk.log
> > > > > JkLogLevel info
> > > > > JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
> > > > > JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> > > > > JkRequestLogFormat "%w %V %T"
> > > > > JkMount /*.svc ajp13
> >
> > > > > (For the JkMount I use *.svc because I use the svc extension for my
> > > > > GWT service target to differentiate service points from other
> files.)
> >
> > > > > (For example, in my web.xml file I will map my service something
> like
> > > > > this to use the svc extension:
> > > > > 
> > > > >   MyService
> > > > >   com.mysite.server.MyServiceImpl
> > > > > 
> > > > > 
> > > > >   MyService
> > > > >   /MyService.svc
> > > > > 
> >
> > > > > And in my GWT code I create my service target like this:
> >
> > > > > target.setServiceEntryPoint( GWT.getModuleBaseURL() +
> > > > > "MyService.svc" );
> >
> > > > > I did this because I had troubles with the 'JkMount /* ajp13'
> entry,
> > > > > but when I used /*.svc the problems cleared up.)
> >
> > > > > workers.properties
> >
> > > > > workers.tomcat_home=/usr/tomcat/apache-tomcat-6.0.16
> > > > > workers.java_home=/usr/java/jdk1.6.0_06
> > > > > worker.list=ajp13
> > > > > worker.ajp13.port=8009
> > > > > worker.ajp13.host=localhost
> > > > > worker.ajp13.type=ajp13
> > > > > worker.ajp13.lbfactor=1
> > > > > worker.loadbalancer.type=lb
> > > > > worker.loadbalancer.balance_workers=ajp13
> >
> > > > > (Of course, match the ajp port in the workers.property file to the
> > > > > port you define in the server.xml file. Also, if your Tomcat is not
> on
> > > > > the same server as your Apache you will need to change the
> localhost
> > > > > host entry to the correct host URL.)
> >
> > > > > I hope this helps.
> >
> > > > > On Feb 20, 12:51 pm, Fran  wrote:
> > > > > > Bad notices.
> >
> > > > > > This dude has same problem that me and he was answered that
> mod_jk
> > > > > > dont support NIO
> >
> > > > > >
> http://www.mail-archive.com/us...@tomcat.apache.org/msg67701.html
> >
> > > > > > :(
> >
> > > > > > On 20 feb, 19:13, Fran  wrote:
> >
> > 

Re: Problems with GWT-EXT widget

2010-03-23 Thread Dan
In case somebody comes across this post with the same problem,
following the tutorial here did the trick:

http://paulgrenyer.blogspot.com/2009/04/setting-up-gwt-ext-for-gwt-16-with.html

On Mar 19, 4:51 pm, Dan  wrote:
> Apologies for double posting, now sure how it happened.
>
> I also followed the instructions found here 
> :http://code.google.com/p/gwt-ext/wiki/GettingStarted
>
> so I included the js and css files as suggested, inside the html file.
>
>     
>     
>
>     
>     
>     
>
> Same error persists...

-- 
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 and HTML5 Client-side Storage

2010-03-23 Thread g p
Check this project out:
http://code.google.com/p/gwt-mobile-webkit/wiki/StorageApi

Cheers!

On 22 March 2010 14:25, Giancarlo  wrote:

> Hello!
> Has anybody a good idea of how to store Java objects into  HTML5
> standard Client-side Storage (Session Storage,Local Storage)
>
> Regards
> Giancarlo
>
> --
> 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: TextBox.setFocus(true) does not work in any browser

2010-03-23 Thread mram
I've done a popup login and the setFocus property works perfectly. The
only thing that you have to pay attention on is that the last command
in your login page load or constructor must be setFocus...


For example:

public class login


  TextBox usuario=new TextBox();

   public login(){
...
  // Do what ever you need


  ...
  usuario.setFocus(true);


}
...
}



On 23 mar, 01:38, DK  wrote:
> I have a login page ... I want to keep the username TextBox focused on
> page load ... I am trying to call the setFocus(true) method on my
> TextBox instance. I cannot see the focus on the textbox with the
> cursor in it. Has anyone faced similar 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.



get the value of an input text (HTML)

2010-03-23 Thread zizou84
I am wrapping html code into gwt widget
i have for exemple an input text:
wrapped to:TextBox userName=TextBox.wrap(DOM.getElementById("login"));
my problem that i can't get the input text value(when i clik a
button , i would like to get the value of the input text field)
if i set the attribute  'value' in the tag input , i could get it's
value but when i write the value in the field(in my interface) ,i
couldn' get it
Is there any solution to get the text written in the input field?

-- 
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 button event problem

2010-03-23 Thread rudolf michael
well you need to know when to use the DOM and when to use the RootPanel,
usually RootPanel works only on DIV tags while the DOM can traverse any kind
of html tags. so in your case you can add a button with a click dynamically
by using DOM. but i dont use this, try to use DIVs as much as you can.
The example you provided would work with
RootPanel.get("sendButtonContainer").add(button);
if the id "sendButtonContainer" was for a div and not a td

On Tue, Mar 23, 2010 at 5:42 AM, msaif  wrote:

> For example I took html from a designer which is given below.
> How can i add click event which shows alert  from GWT?
>
>
>  
> id="x" value="OK" />
>  
>
>
> final Button button = new Button("OK");
> I dont allow to add button dynamically from GWT by
> RootPanel.get("sendButtonContainer").add(button);
>
> I am searching the syntax something like:
> RootPanel.get("sendButtonContainer").getWidget(0).addEventListener()???
> Jquery can search the button object from nameFieldContainer and
> dynamically add click event listener but is it possible in GWT??
>
> --
> 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: Coding dynamic parts with GWT

2010-03-23 Thread rudolf michael
well this is easy dude.
Onblur or onchange over the textbox that serves as an input, you catch that
event and parse the input so you can get the desired number.
after that you choose in which panel/parent node you want to create those
textboxes and accordingly in your listener you can do :
for(int i=0; i < number; i++)
parent.add(new TextBox());

if you want to have names for your textboxes then inside your loop you can
do myTextBox.setName("myName"+i);

On Tue, Mar 23, 2010 at 5:04 PM, Jochen Schnaidt wrote:

> Hi,
> I have a question about coding dynamic parts with GWT. I already
> searched for an answer, but didn’t find something which could help me.
> May be I have the wrong keywords? I don’t know…
>
> So, the problem: My concept is that my application reads a integer
> from a TextBox after the user wrote it in there e.g. 3 and then
> creates 3 new TextBoxes.
>
> I read the 3 no problems and have it in a variable but now I want to
> add the TextBoxes. In a scripting language I can build new objects and
> give a “dummyname” + digit as name to it and use it normal but in Java
> I can’t modify my variable’s name. So I need another method.
>
> I tried to make something like an array of TextBox but it didn’t work
> out.
>
> So please help me with this. I don’t get it on my own. Thanks a lot.
>
> Greetings Jochen
>
> --
> 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: Determining Permutation on Server

2010-03-23 Thread Nathan Wells
Ooo good point... but couldn't you just set caching headers on the
result? I guess I'm not clear on the intricacies of how each browser
would handle this, but you could keep track of whether the app was
modified on the server. If it hasn't been modified, then send 304.

Or am I missing something?

On Mar 23, 9:25 am, Ian Bambury  wrote:
> How would you determine if the current code had been cached on the client or
> not?
>
> Ian
>
> http://examples.roughian.com
>
> On 23 March 2010 14:41, Nathan Wells  wrote:
>
>
>
> > Is there a reason you wouldn't want to determine which permutation to
> > send on the server rather than the client? What I'm thinking is that
> > you could eliminate the need for the selector script entirely if you
> > had a smart enough server. You could even auto generate the code using
> > a linker, I would think.
>
> > So, is there a reason why you wouldn't want to do it?
>
> > --
> > 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 > cr...@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: Servlet Session

2010-03-23 Thread rudolf michael
of course, RemoteServiceServlet is nothing else other than an HTTPServlet
but with a special handling to make it an RPC servlet.

On Mon, Mar 22, 2010 at 1:18 PM, guest23  wrote:

> Hi there,
>
> gwt rpc is a nice feature!
>
> Is it possible to get a HTTP Session inside RemoteServiceServlet?
>
> User does login over normal Servlet. I store the login token in
> session.
>
> Thanks for 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.
>
>

-- 
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: No source code is available for type com.google.gwt.user.server.rpc.RemoteServiceServlet;

2010-03-23 Thread rudolf michael
I guess that you need to include the gwt-servlet.jar in your classpath. make
sure that it is also present in the lib of your app server.


On Mon, Mar 22, 2010 at 8:48 PM, Mykhaylo Lytvynuk wrote:

> Getting this error:
>
> -->  No source code is available for type
> com.google.gwt.user.server.rpc.RemoteServiceServlet;
>
> PackageStructure is like that:
> +client:
>   Na.java
>   NaRPC.java
>   NaRPCAsynch.java
> +server
>   NaRPCImpl.java
> +shared
>  DMXLicenseDTO.java
>
>
> XML file is:
>
> 
>
>
>
>
>
>
>
>
> 
>
>
> Error is like that:
>
>  [ERROR] Errors in 'file:/C:/..Projects/NomadAdmin/NomadAdmin/src/
> com/ho/nomad/server/NaRPCImpl.java'
> [ERROR] Line 6: No source code is available for type
> com.google.gwt.user.server.rpc.RemoteServiceServlet; did you forget to
> inherit a required module?
>   [ERROR] An internal compiler exception occurred
> com.google.gwt.dev.jjs.InternalCompilerException: Failed to get JNode
>at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:75)
>at com.google.gwt.dev.jjs.impl.BuildTypeMap
> $BuildDeclMapVisitor.process(BuildTypeMap.java:595)
>at com.google.gwt.dev.jjs.impl.BuildTypeMap
> $BuildDeclMapVisitor.visit(BuildTypeMap.java:309)
>at
>
> org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:
> 1198)
> .
> cut
>
> What is wrong? Everything seems to be ok?
> Please advice
>
> --
> 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: Client side error

2010-03-23 Thread Michael W
I got similar error.
Any solution of it?

On Mar 10, 5:01 am, Joe Cole  wrote:
> I saw an error today which has me puzzled:
>
> com.google.gwt.core.client.JavaScriptException: (TypeError):
> '$wnd.__gwt_globalEventArray.length' is null or not an object
>  number: -2146823281
>  description: '$wnd.__gwt_globalEventArray.length' is null or not an
> object
>
> This doesn't really make sense to me that it could be null - does
> anyone have any idea how this could happen? The application is fully
> initialised and has been in use for quite a time, but idle. Perhaps
> garbage collection?
>
> The browser config is:
> Browser Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/
> 4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR
> 3.0.30729; .NET CLR 3.5.30729)

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



Problems using GWT for google gadget development

2010-03-23 Thread Graham Crosmarie
I am currently trying to write google gadgets using eclipse, the
google plugin (GWT 2.0.3) and gwt-gadgets-1.0.3.jar.

The problem I have is that when I compile my projects, the
file.gadget.xml produced is not good.

For example, I downloaded an eclipse project for a google wave gadget
(http://files.me.com/captaincurk/9492ct  from
http://thezukunft.com/2010/02/08/a-wave-gadget-robot-using-gwt-2-0-and-google-app-engine-part-1/)
. I compiled using the google plugin and put the gadget.xml file on
the internet. First, the file produced is not the same than the one
shown in the article and then when I tested it on google wave or in
google gadgets ads editor it did not work.
This problem kept happening for every tutotrial I have done (normal
gadgets and wave gadgets) and for every single gadget I try to write
myself.

I checked that the gwt plugin for eclipse works on my computer by
designing a GWT project which did not involve a gadget and it worked
properly.

Has someone any Idea of where my problem might come from ?

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



GWTComplier error

2010-03-23 Thread claudio
Hi, I'm developing web application using GWT. But I've a big problem
compiling the source code with ant configuration. Since 3 days ago
I've never had problems on compliling code, but now during GWTCompile
time, I see the following errors:

 [java]Translatable source found in...
 [java]   [WARN] No source path entries; expect subsequent
failures
 [java] com.google.gwt.core.ext.typeinfo.NotFoundException:
java.lang.Object
 [java] at
com.google.gwt.core.ext.typeinfo.TypeOracle.refresh(TypeOracle.java:
544)
 [java] at
com.google.gwt.dev.javac.TypeOracleMediator.refresh(TypeOracleMediator.java:
394)
 [java] at
com.google.gwt.dev.javac.CompilationState.compile(CompilationState.java:
137)
 [java] at
com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:327)
 [java] at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:
564)

[..]


 [java] Compiling module it.XXX.XXX.XX.
 [java] Computing all possible rebind results for
'it.XXX.XXX.XX.XX.MyEntryPoint'
 [java]Rebinding it.XXX.XXX.XX.XX.MyEntryPoint
 [java]   Checking rule 
 [java]  [ERROR] Unable to find type
'it.XXX.XXX.XX.XX.MyEntryPoint'
 [java] [ERROR] Hint: Previous compiler errors may
have made this type unavailable
 [java] [ERROR] Hint: Check the inheritance chain from
your module; it may not be inheriting a required module or a module
may not be adding its source path entries properly
 [java] [ERROR] Build failed
 [java] Java Result: 1


This is very strange because before I've never seen this error I've
never modified both the source code both the configuration files.
Please help me, I'm not sleeping the night since last week :O

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



TextBox.setFocus(true) does not work in any browser

2010-03-23 Thread DK
I have a login page ... I want to keep the username TextBox focused on
page load ... I am trying to call the setFocus(true) method on my
TextBox instance. I cannot see the focus on the textbox with the
cursor in it. Has anyone faced similar 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.



Re: tomcat and apache problem

2010-03-23 Thread ani
Hi,

   Go through this post 
http://blog.findasolution.in/2010/03/apache-tomcat-connectorintegrate-apache-with-tomcat/
hope this will help you.

On Feb 21, 6:10 am, dablack  wrote:
> I borrowed that connector configuration from a website I came across.
> I'm not sure why port=0 either. If I put more research into the NIO
> connector I could probably find out. Why don't you try adding the
> lines,
>
> enableLookups="false"
> scheme="http"
>
> to the NIO connector configuration in the server.xml file that I gave
> you earlier.
>
> As far as accessing the ajp service usinghttp://localhost:8009/servlet,
> that will not work. Your browser uses the http protocol and the 8009
> port is being serviced by the ajp protocol. You should still have your
> connector using the http protocol configured to listen on port 8081.
>
> Hopefully the scheme line above will help the NIO connector
> communicate back to Apache.
>
> On Feb 20, 4:45 pm, Fran  wrote:> I test your config, 
> dablack, but I cant connect to the servlet.
> > With this config I cant access not even to:http://localhost:8009/servlet
> > that is tomcat directly without apache
>
> > On 20 feb, 23:36, Fran  wrote:
>
> > > I cant undestand why this config:
>
> > >  > > channelNioSocket.maxThreads="
> > > 150"
> > >   channelNioSocket.maxSpareThreads="50"
> > > channelNioSocket.minSpareThreads="25"
> > >   channelNioSocket.bufferSize="16384" />
>
> > > Why port 0 ?
>
> > > 2010/2/20 dablack 
>
> > > > Fran,
>
> > > > I'm really not an expert on setting up the connection between Apache
> > > > and Tomcat but I believe that the connections only operate in two
> > > > protocols: http or ajp. NIO is a Tomcat connector that can communicate
> > > > in either http or ajp. Because of that, I don't see any reason that
> > > > the Apache mod_jk connector module couldn't communicate with the NIO
> > > > connector. Since I don't use an NIO connector I could be wrong, but
> > > > that is the way I see it. As a starting point, try these
> > > > configurations:
>
> > > > server.xml
>
> > > >  > > > channelNioSocket.maxThreads="150"
> > > >   channelNioSocket.maxSpareThreads="50"
> > > > channelNioSocket.minSpareThreads="25"
> > > >   channelNioSocket.bufferSize="16384" />
>
> > > > (You seem to want to use port 8081 which should be fine, but the
> > > > standard ajp port is 8009. However, I wouldn't put it on port 8081 if
> > > > you are already using that port for another protocol such as http.)
>
> > > > httpd.conf
>
> > > > LoadModule jk_module modules/mod_jk.so
> > > > JkWorkersFile conf/workers.properties
> > > > JkLogFile /var/log/httpd/mod_jk.log
> > > > JkLogLevel info
> > > > JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
> > > > JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> > > > JkRequestLogFormat "%w %V %T"
> > > > JkMount /*.svc ajp13
>
> > > > (For the JkMount I use *.svc because I use the svc extension for my
> > > > GWT service target to differentiate service points from other files.)
>
> > > > (For example, in my web.xml file I will map my service something like
> > > > this to use the svc extension:
> > > > 
> > > >   MyService
> > > >   com.mysite.server.MyServiceImpl
> > > > 
> > > > 
> > > >   MyService
> > > >   /MyService.svc
> > > > 
>
> > > > And in my GWT code I create my service target like this:
>
> > > > target.setServiceEntryPoint( GWT.getModuleBaseURL() +
> > > > "MyService.svc" );
>
> > > > I did this because I had troubles with the 'JkMount /* ajp13' entry,
> > > > but when I used /*.svc the problems cleared up.)
>
> > > > workers.properties
>
> > > > workers.tomcat_home=/usr/tomcat/apache-tomcat-6.0.16
> > > > workers.java_home=/usr/java/jdk1.6.0_06
> > > > worker.list=ajp13
> > > > worker.ajp13.port=8009
> > > > worker.ajp13.host=localhost
> > > > worker.ajp13.type=ajp13
> > > > worker.ajp13.lbfactor=1
> > > > worker.loadbalancer.type=lb
> > > > worker.loadbalancer.balance_workers=ajp13
>
> > > > (Of course, match the ajp port in the workers.property file to the
> > > > port you define in the server.xml file. Also, if your Tomcat is not on
> > > > the same server as your Apache you will need to change the localhost
> > > > host entry to the correct host URL.)
>
> > > > I hope this helps.
>
> > > > On Feb 20, 12:51 pm, Fran  wrote:
> > > > > Bad notices.
>
> > > > > This dude has same problem that me and he was answered that mod_jk
> > > > > dont support NIO
>
> > > > > http://www.mail-archive.com/us...@tomcat.apache.org/msg67701.html
>
> > > > > :(
>
> > > > > On 20 feb, 19:13, Fran  wrote:
>
> > > > > > Here the error when I change the protocol of
> > > > > > protocol="org.apache.coyote.http11.Http11NioProtocol" to 
> > > > > > protocol="AJP/
> > > > > > 1.3"
>
> > > > > > [error] jk_ajp_common.c (1962): (worker1) Tomcat is down or refused
> > > > > > connection. No response has been sent to the client (yet)
> > > > > > [error] jk_ajp_common.c (2466): (worker1) connecting to tomcat 
> > > > > > failed.
>
> > > > > > On 20 feb,

Getting "No source code is available for type com.google.gwt.user.server.rpc.RemoteServiceServlet"

2010-03-23 Thread Mykhaylo Lytvynuk
Trying to compile my smartGWT project when added RemoteService
features and constantly getting:

Compiling module com.ho.nomad.NomadAdmin
   Validating newly compiled units
  [ERROR] Errors in 'file:/C:/..Projects/NomadAdmin/NomadAdmin/src/
com/ho/nomad/server/NomadRPCImpl.java'
 [ERROR] Line 6: No source code is available for type
com.google.gwt.user.server.rpc.RemoteServiceServlet; did you forget to
inherit a required module?
   [ERROR] An internal compiler exception occurred
com.google.gwt.dev.jjs.InternalCompilerException: Failed to get JNode
at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:75)
at com.google.gwt.dev.jjs.impl.BuildTypeMap
$BuildDeclMapVisitor.process(BuildTypeMap.java:595)
at com.google.gwt.dev.jjs.impl.BuildTypeMap
$BuildDeclMapVisitor.visit(BuildTypeMap.java:309)
at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:
1198)
at
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:
687)
at
com.google.gwt.dev.jjs.impl.BuildTypeMap.createPeersForNonTypeDecls(BuildTypeMap.java:
883)
at com.google.gwt.dev.jjs.impl.BuildTypeMap.exec(BuildTypeMap.java:
873)
at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:
455)
at
com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:
32)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:522)
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)
  [ERROR] : public class
com.google.gwt.user.server.rpc.RemoteServiceServlet
extends com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
implements :
com.google.gwt.user.server.rpc.SerializationPolicyProvider
/*   fields   */
private final [unresolved] Map
serializationPolicyCache
/*   methods   */
public void ()
[unresolved] protected Unresolved type
com.google.gwt.user.server.rpc.SerializationPolicy
doGetSerializationPolicy(Unresolved type
javax.servlet.http.HttpServletRequest, java.lang.String,
java.lang.String)
[unresolved] private Unresolved type
com.google.gwt.user.server.rpc.SerializationPolicy
getCachedSerializationPolicy(java.lang.String, java.lang.String)
[unresolved] public final Unresolved type
com.google.gwt.user.server.rpc.SerializationPolicy
getSerializationPolicy(java.lang.String, java.lang.String)
[unresolved] static Unresolved type
com.google.gwt.user.server.rpc.SerializationPolicy
loadSerializationPolicy(Unresolved type
javax.servlet.http.HttpServlet, Unresolved type
javax.servlet.http.HttpServletRequest, java.lang.String,
java.lang.String)
[unresolved] protected void
onAfterResponseSerialized(java.lang.String)
[unresolved] protected void
onBeforeRequestDeserialized(java.lang.String)
[unresolved] public java.lang.String processCall(java.lang.String)
throws Unresolved type
com.google.gwt.user.client.rpc.SerializationException
public final void processPost(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse) throws java.io.IOException,
javax.servlet.ServletException,
com.google.gwt.user.client.rpc.SerializationException
[unresolved] private void
putCachedSerializationPolicy(java.lang.String, java.lang.String,
Unresolved type com.google.gwt.user.server.rpc.SerializationPolicy)
[unresolved] protected boolean shouldCompressResponse(Unresolved type
javax.servlet.http.HttpServletRequest, Unresolved type
javax.servlet.http.HttpServletResponse, java.lang.String)
[unresolved] private void writeResponse(Unresolved type
javax.servlet.http.HttpServletRequest, Unresolved type
javax.servlet.http.HttpServletResponse, java.lang.String) throws
java.io.IOException



 org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding
  [ERROR] at NomadRPCImpl.java(6): class NomadRPCImpl
 com.google.gwt.dev.jjs.ast.JClassType

Any ideas what can be wrong?
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 and HTML5 Client-side Storage

2010-03-23 Thread Giancarlo
Hello!
Has anybody a good idea of how to store Java objects into  HTML5
standard Client-side Storage (Session Storage,Local Storage)

Regards
Giancarlo

-- 
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: Class Observer/Observable not emulated

2010-03-23 Thread enTropy Fragment
I already did a rudimentary implementation of this in my GWT projects for
the same reason (MCV pattern). Here they are, feel free to use them in any
way you want. It's not much what I have though :P

public interface Observer {
public void update();
}

public class Observable {
private List observers;

public synchronized void deleteObservers() {
getObservers().clear();
}

public synchronized void addObserver(Observer o) {
getObservers().add(o);
}

public synchronized int countObservers() {
return getObservers().size();
}

public synchronized void deleteObserver(Observer o) {
getObservers().remove(o);
}

private List getObservers() {
if(observers == null)
observers = new ArrayList();
return observers;
}

protected void broadcastObservers(){
for(Observer o: getObservers())
o.update();
}
}

2010/3/22 jcb 

>
> Thank you, interesting link !
>
>
> On Mar 22, 7:40 am, Nathan Wells  wrote:
> > Can't speak for the GWT team here, but this could be a reason:
> >
> > http://forums.sun.com/thread.jspa?threadID=5336733
> >
> > On Mar 20, 10:43 am, jcb  wrote:
> >
> >
> >
> > > I am very satisfied with gwt, and I am making a simple gwt app with
> > > just client side code.
> > > I  want to separate model and view, so I wanted to use the simple
> > > Observer/Observable classes of java.util but it is not emulated in GWT
> > > (cf. references).
> > > Someone know why these classes are not emulated ?
> >
> > > Of course it's not a big issue I can create similar classes in client
> > > side, but it seems a pity if we have to invent/copy again the wheel.
>
> --
> 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.



Coding dynamic parts with GWT

2010-03-23 Thread Jochen Schnaidt
Hi,
I have a question about coding dynamic parts with GWT. I already
searched for an answer, but didn’t find something which could help me.
May be I have the wrong keywords? I don’t know…

So, the problem: My concept is that my application reads a integer
from a TextBox after the user wrote it in there e.g. 3 and then
creates 3 new TextBoxes.

I read the 3 no problems and have it in a variable but now I want to
add the TextBoxes. In a scripting language I can build new objects and
give a “dummyname” + digit as name to it and use it normal but in Java
I can’t modify my variable’s name. So I need another method.

I tried to make something like an array of TextBox but it didn’t work
out.

So please help me with this. I don’t get it on my own. Thanks a lot.

Greetings Jochen

-- 
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 application shows blank page

2010-03-23 Thread me2
I am experiencing the same behavior, our application works fine with
GWT versions 1.5 through 1.7.1, but as soon as GWT 2.0 is used the
page experiences a javascript error on load.

If we compile the application using "pretty" or "detailed" styles then
it will run fine, so we feel there is a bug with the GWT 2.0
optimizations.

Building with JDK 1.6 makes no difference.



On Mar 5, 2:04 am, Gourab Panda  wrote:
> Hi,
>
> Try putting some alert('Page is Loaded');
>
> If this work. Try once with JDK 1.6, Not sure this will work. Just a guess.
>
>
>
> On Wed, Mar 3, 2010 at 7:05 PM, drecute  wrote:
> > Using Netbeans 6.8, my GWT application shows blank page both at Dev
> > mode and when I deploy the app to Tomcat server.
>
> > I have tried a simple WIndow.alert('smth') within the onModuleLoad
> > function, but nothing seems to work.
>
> > Also, the application builds successfully without any errors.
>
> > Any ideas please?
>
> > --
> > 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 > cr...@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.



No source code is available for type com.google.gwt.user.server.rpc.RemoteServiceServlet;

2010-03-23 Thread Mykhaylo Lytvynuk
Getting this error:

-->  No source code is available for type
com.google.gwt.user.server.rpc.RemoteServiceServlet;

PackageStructure is like that:
+client:
   Na.java
   NaRPC.java
   NaRPCAsynch.java
+server
   NaRPCImpl.java
+shared
  DMXLicenseDTO.java


XML file is:













Error is like that:

  [ERROR] Errors in 'file:/C:/..Projects/NomadAdmin/NomadAdmin/src/
com/ho/nomad/server/NaRPCImpl.java'
 [ERROR] Line 6: No source code is available for type
com.google.gwt.user.server.rpc.RemoteServiceServlet; did you forget to
inherit a required module?
   [ERROR] An internal compiler exception occurred
com.google.gwt.dev.jjs.InternalCompilerException: Failed to get JNode
at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:75)
at com.google.gwt.dev.jjs.impl.BuildTypeMap
$BuildDeclMapVisitor.process(BuildTypeMap.java:595)
at com.google.gwt.dev.jjs.impl.BuildTypeMap
$BuildDeclMapVisitor.visit(BuildTypeMap.java:309)
at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:
1198)
.
cut

What is wrong? Everything seems to be ok?
Please advice

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



Servlet Session

2010-03-23 Thread guest23
Hi there,

gwt rpc is a nice feature!

Is it possible to get a HTTP Session inside RemoteServiceServlet?

User does login over normal Servlet. I store the login token in
session.

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



Stock Watcher- Onload

2010-03-23 Thread Shreyas Goel
I have successfully executed the stock watcher tutorial.
However, on load i wish to display the stock quote of a specific
company onload.

Also, i wish to make sure that none can delete the same.

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



Multi-tenancy in GWT

2010-03-23 Thread Kyle Baley
I'm new to GWT and the Java world having been in the .NET space for
about 10 years. Our application will be a multi-tenant one (at least,
to the degree that I understand the definition). We'd like customers
to be able to navigate to www.mysite.com/customerName, then log in
from there. I think I have a handle on how to manage this from the GAE
datastore side but am wondering how to manage this URL mapping in
web.xml for GWT.

Also, would like to get some opinions on how to manage the
authentication once it's set up. Here's how I see it working:
- User navigates to www.mysite.com/customerName
- System retrieves company data and stores in session and displays
login page
- User logs in. System authenticates user
- For all RPC calls, system verifies user is logged in *and* checks
that the URL matches the company info in the session

Basically, I want to guard against a user logging into one client
site, then navigating to another.

Thanks
Kyle

-- 
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: PopupPanel, UiBinder and setGlassEnabled

2010-03-23 Thread mram
Why don't you try to use DialogBox instead??

it would be like this:

public class DatasheetWidget extends DialogBox{
  uiBinder.createAndBindUi(this);
  setGlassEnabled(true);
  ...

On 22 mar, 10:38, hriess  wrote:
> Is there a way to enable the glass panel of a popup with UiBinder?
> My definition  doesn't work - there
> is no compilation error but also no glass panel.
>
> If I set the property in my java class with
>
> public class DatasheetWidget extends PopupPanel {
>   ...
>   uiBinder.createAndBindUi(this);
>   this.setGlassEnabled(true);
>   ...
> the glass panel is over the popup (it hides my popup), not below.

-- 
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: Example: (simple) Label with image?

2010-03-23 Thread mram
I haven't seen something like that. I know that with AWT, you can use
an icon and put it into a label, but this is not the case because you
can't use AWT with GWT. But still I tell you how you should do it in
AWT:
   JLabel label = new JLabel();
   ImageIcon icon = new ImageIcon("images/my_image.jpg");
   ImageIcon iconoEscala = new
ImageIcon(icon.getImage().getScaledInstance(400, 400,
java.awt.Image.SCALE_DEFAULT));
   label.setIcon(iconoEscala);



On 22 mar, 20:01, Ralf B  wrote:
> Is there a very very simple way to create a label with an image
> without using CSS, or is the only way to use HTML objects? I was
> hoping for a constructor like this:
>
> Image myImage = new Image(url);
> Label myLabel = new Label(myimage, "This is the text");
>
> Best 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.



Re: Images in server folder (store and access)

2010-03-23 Thread mram
I had a similar problem, I had to change the path for the image if I
were using the Tomcat or Eclipse. I think that using this you could
get rid of the problem:
  String path= this.getThreadLocalRequest().getContextPath()

With this you get the path where is it running the application, so you
don't need to assign the path manually.



On 11 feb, 17:57, "K. K. Forest"  wrote:
> To extend on this, when generating an image (I am operating in hosted
> mode) it puts it into MyEclipseProject/images, but when running the
> service (in hosted mode) it tries to find it in MyEclipseProject/war/
> images. Does this mean that I cannot test this in hosted mode but only
> in fully deployed mode? Is there a trick to link these two folders so
> that I can use generative content without an extra deployment step?
>
> Ralf

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



Exception: com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: This application is out of date, please click the refresh button on your browser.

2010-03-23 Thread sharat singh
hi,

My Project was working properly, but after few modifications when i
deployed the war again, i am getting the
IncompatibleRemoteServiceException while trying to populate the data
from db to GUI after successful login.

The following are the details of the exception:

com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:
This application is out of date, please click the refresh button on
your browser.

I verified the dependent jar versions for compilation and deployment
were the same. Also the was no other old war with the same name
present in the classpath.

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



GWT button event problem

2010-03-23 Thread msaif
For example I took html from a designer which is given below.
How can i add click event which shows alert  from GWT?


  

  


final Button button = new Button("OK");
I dont allow to add button dynamically from GWT by
RootPanel.get("sendButtonContainer").add(button);

I am searching the syntax something like:
RootPanel.get("sendButtonContainer").getWidget(0).addEventListener()???
Jquery can search the button object from nameFieldContainer and
dynamically add click event listener but is it possible in GWT??

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



Server side: start independent Thread at deploy on server

2010-03-23 Thread piXi
Hellow,

I'm trying to develop an aplication with GWT.
And have came across with a problem, but first what I wish to
develop.

And GWT application that will server user data, data will be get over
RPC and hibernate.
Now I need thread that will start up socket server and listen incoming
connection from so called agents.

Do I need to create new module or ?

One solution that works but its not nice solution is :

at EntryPoint in constructor I create a singletone and start the
Thread.  Next time page is loaded I just return.
Instance to singleton.

I have tested and it works.

But i do not like getInstance call every time page will refresh.

>From tutorials GWT looks very nice, but  I know that I still need much
of understanding GWT.

Best regards Primoz

-- 
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: Determining Permutation on Server

2010-03-23 Thread Ian Bambury
How would you determine if the current code had been cached on the client or
not?

Ian

http://examples.roughian.com


On 23 March 2010 14:41, Nathan Wells  wrote:

> Is there a reason you wouldn't want to determine which permutation to
> send on the server rather than the client? What I'm thinking is that
> you could eliminate the need for the selector script entirely if you
> had a smart enough server. You could even auto generate the code using
> a linker, I would think.
>
> So, is there a reason why you wouldn't want to do it?
>
> --
> 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.



Determining Permutation on Server

2010-03-23 Thread Nathan Wells
Is there a reason you wouldn't want to determine which permutation to
send on the server rather than the client? What I'm thinking is that
you could eliminate the need for the selector script entirely if you
had a smart enough server. You could even auto generate the code using
a linker, I would think.

So, is there a reason why you wouldn't want to do it?

-- 
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 deploying using eclipse plugin.

2010-03-23 Thread Jolam
My app works fine in my own machine but when I deploy it using eclipse
plugin ,  an error occurs:

javax.servlet.ServletContext log: UrlServiceImpl: ERROR: The
serialization policy file '/urlshorter/
C62BC673E99C4E252FDCF22B3898D6E7.gwt.rpc' was not found; did you
forget to include it in this deployment?

I checked if it the file C62BC673E99C4E252FDCF22B3898D6E7.gwt.rpc
exists , It is in the folder mentioned above.What 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: JavaScriptException during JSNI call: Invoking an instance method on a null instance

2010-03-23 Thread Olivier Monaco
ChrisK,

For instance method, you need to reference the method from the
instance like "th...@...". Here is my exact code that compile:

private native void installListener()
/*-{
var callback = $entry(this.
@net.antidot.gwtcommon.mvp.share.client.channel.HTML5MessageChannel::process(Lnet/
antidot/gwtcommon/mvp/share/client/channel/HTML5MessageEvent;));
$wnd.addEventListener("message", (function(callback, channel) {
return function(event) {
callback.call(channel, event);
};
})(callback, this), false);;
}-*/;

Sorry, I forgot that...

Olivier

On 23 mar, 13:58, ChrisK  wrote:
> Actually, Olivier's methods work in development mode but don't seem to
> compile with this error:
>
> "Cannot make an unqualified reference to the instance method callback"
>
> I've tried the pre-assignment of "this" to "var that" and also an
> argument to the JSNI method passing in my instance. I've tried both of
> these with Olivier's first method as well as the second to avoid
> leaks. All with the same result - working in development mode but not
> when I compile.
>
> It looks to me as though the compiler doesn't understand the call
> method or the closure correctly. It looks at though it's trying to
> parse the @mypackage.MyClass::MyMethod() and seeing it's an instance
> method so failed (instead of looking at subsequent JavaScript). Of
> course I could quite easily be doing something wrong.
>
> Thomas - your method compiles fine so I guess I'll use that for now.
>
> On Mar 23, 10:07 am, ChrisK  wrote:
>
> > Ahhh ok. Sorry for the simple questions but I'm just getting my head
> > around all this. I also have some other methods with arguments and
> > have those working thanks to both of you.
>
> > On Mar 23, 9:56 am, Olivier Monaco  wrote:
>
> > > ChrisK,
>
> > > On 23 mar, 10:32, ChrisK  wrote:
>
> > > > Thomas - your solution worked from 6 worked but at first I didn't
> > > > include both pairs of brackets after the function call "MyMethod" but
> > > > it turns out they are required. With only one set (i.e. no arguments),
> > > > it just doesn't work. I thought that was legal but maybe not.
>
> > > Remember that "@mypackage.MyClass::MyMethod()" is a reference to the
> > > function, not a call. The parenthesis allow you to give the full
> > > signature of the method. Java allows two methods to have the same name
> > > but different parameters. GWT needs the "full" signature to find which
> > > method you want to reference, even is there is only one method with
> > > this name.
>
> > > The second parenthesis are to call the method. If you forgot then, you
> > > just obtain the function object and do nothing with it...
>
> > > Olivier
>
>

a...@a

-- 
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: Determining the user's OS

2010-03-23 Thread Rinpun
Apple Safari on Windows does have OK listed before Cancel.

OS information is part of the user agent, I think. I don't have time
at the moment to check to see if it states Mac OS in the user agent on
Mac, but Safari on Windows states "Windows" within its User Agent, as
does every other Windows-version browser I've tried so far (Chrome,
Firefox, IE, Opera).

You should have no problem differentiating between Windows and Mac OS.
I'd think the main issue would be differentiating between Linux
Distributions, if you wanted to do so.

Hope this helps!

Blake Hurd

On Mar 22, 4:42 pm, Eric  wrote:
> Is there any reasonable way to determine the user's OS (independent of
> the browser's user agent setting)? I just realized that every version
> of WIndows shows dialog boxes with the OK button to the left of the
> Cancel button (in ltr locales, of course). The Macintosh OS use the
> opposite convention: Cancel is left of OK.  I've never used Apple
> Safari on a Windows box, so I don't know whether it works like Windows
> or like Macs.
>
> If I could find this out, then I could decide how to fill my dialog
> boxes based on the natural tendency of the OS. However, I fear this
> information is not part of the user agent setting.
>
> 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.



Bug in TextBox?

2010-03-23 Thread Lothar Kimmeringer
Hi,

I'm currently migrating from GWT 1.4 to 2.0 and am changing
from Listener to Handler from class to class. I've found the
following problem with a TextBox/Label-combination. Here
some code:

// this part is inside a method building a row in a table,
// index is the row-number being passed as parameter
final Label receiverLabel = new Label(recipientAddress);
final TextBox receiverValue = new TextBox();

receiverValue.addKeyPressHandler(new KeyPressHandler() {
public void onKeyPress(KeyPressEvent event) {
  switch(event.getCharCode()){
case KeyCodes.KEY_ENTER:{
  GWT.log("key enter pressed, confirm");
  confirmParameterValue(receiverLabel, receiverValue, index);
  break;
}
case KeyCodes.KEY_ESCAPE:{
  GWT.log("key cancel pressed, cancelling");
  cancelParameterValue(receiverLabel, receiverValue, index);
  break;
}
  }
}
});

receiverValue.addBlurHandler(new BlurHandler() {
  public void onBlur(BlurEvent sender) {
GWT.log("on blur, confirming");
confirmParameterValue(receiverLabel, receiverValue, index);
  }
});

private void confirmParameterValue(Label oldName, TextBox newName, int index){
  GWT.log("confirm " + newName.getText()  + " to " + oldName.getText());
  oldName.setText(newName.getText());
  GWT.log("confirmed name is now " + oldName.getText());
  // call cancel to perform the change in the GUI, values
  // are equal now, so this is not a problem
  cancelParameterValue(oldName, newName, index);
}

private void cancelParameterValue(Label oldName, TextBox newName, int index){
  GWT.log("cancel " + newName.getText()  + " back to " + oldName.getText());
  newName.setText(oldName.getText());
  newName.setVisible(false);
  oldName.setVisible(true);
  GWT.log("cancelled name is now " + oldName.getText() + "/" + 
newName.getText());
}

In the plugin (I haven't tried it with a deployed application, yet)
I receive the following outputs in the message-pane, if I enter
"1" into the TextBox, pressing enter, reenter "1_2"
in that TextBox and press ESCAPE:

00:25:59,713  [INFO] key enter pressed, confirm
00:25:59,718  [INFO] confirm 1 to
00:25:59,719  [INFO] confirmed name is now 1
00:25:59,729  [INFO] cancel 1 back to 1
00:25:59,736  [INFO] cancelled name is now 1/1
00:26:01,410  [INFO] on blur, confirming
00:26:01,415  [INFO] confirm 1 to 1
00:26:01,420  [INFO] confirmed name is now 1
00:26:01,421  [INFO] cancel 1 back to 1
00:26:01,426  [INFO] cancelled name is now 1/1

00:26:07,089  [INFO] key cancel pressed, cancelling
00:26:07,089  [INFO] cancel 1_2 back to 1
00:26:07,097  [INFO] cancelled name is now 1/1
00:26:08,849  [INFO] on blur, confirming
00:26:08,853  [INFO] confirm 1_2 to 1
00:26:08,853  [INFO] confirmed name is now 1_2
00:26:08,853  [INFO] cancel 1_2 back to 1_2
00:26:08,854  [INFO] cancelled name is now 1_2/1_2

Messages 00:26:07,089 and 00:26:08,853 confuse me. Both are
working with the same instances of TextBox and Label, so why
is there still the value "1_2" in newName in onBlur after
being set to "1" in cancelParameterValue?

The whole thing worked in GWT 1.4 using onLostFocus
and onKeyPressed. Of course I can introduce a boolean
being checked in onBlur but if this is a bug, it would
be a very ugly workaround for something that should be
fixed in my eyes.

Used version: GWT SDK Bundle 2.0.3.v201002191036 running
the Browser plugin for Firefox 3.6.2


Best regards, Lothar

-- 
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: JavaScriptException during JSNI call: Invoking an instance method on a null instance

2010-03-23 Thread ChrisK
Actually, Olivier's methods work in development mode but don't seem to
compile with this error:

"Cannot make an unqualified reference to the instance method callback"

I've tried the pre-assignment of "this" to "var that" and also an
argument to the JSNI method passing in my instance. I've tried both of
these with Olivier's first method as well as the second to avoid
leaks. All with the same result - working in development mode but not
when I compile.

It looks to me as though the compiler doesn't understand the call
method or the closure correctly. It looks at though it's trying to
parse the @mypackage.MyClass::MyMethod() and seeing it's an instance
method so failed (instead of looking at subsequent JavaScript). Of
course I could quite easily be doing something wrong.

Thomas - your method compiles fine so I guess I'll use that for now.


On Mar 23, 10:07 am, ChrisK  wrote:
> Ahhh ok. Sorry for the simple questions but I'm just getting my head
> around all this. I also have some other methods with arguments and
> have those working thanks to both of you.
>
> On Mar 23, 9:56 am, Olivier Monaco  wrote:
>
> > ChrisK,
>
> > On 23 mar, 10:32, ChrisK  wrote:
>
> > > Thomas - your solution worked from 6 worked but at first I didn't
> > > include both pairs of brackets after the function call "MyMethod" but
> > > it turns out they are required. With only one set (i.e. no arguments),
> > > it just doesn't work. I thought that was legal but maybe not.
>
> > Remember that "@mypackage.MyClass::MyMethod()" is a reference to the
> > function, not a call. The parenthesis allow you to give the full
> > signature of the method. Java allows two methods to have the same name
> > but different parameters. GWT needs the "full" signature to find which
> > method you want to reference, even is there is only one method with
> > this name.
>
> > The second parenthesis are to call the method. If you forgot then, you
> > just obtain the function object and do nothing with it...
>
> > Olivier
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-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: JsonpRequestBuilder and JsArray

2010-03-23 Thread A. Kong
Hi, Thomas,

Thanks for the detail explanation! After making the change, I can read
the title attribute from the Article object.

Cheers

On Mar 22, 10:43 pm, Thomas Broyer  wrote:
> On Mar 22, 1:21 am, "A. Kong"  wrote:
>
> > Hi, Thomas,
>
> > Thanks very much for the quick reply!
>
> > I am away from the workstation where the work is, so I cannot give
> > your suggestion a go yet.
>
> > But I have a question about the remedy you suggested, namely to access
> > the 'title' field using '_array[0].Article.title'
>
> > In my case, I would have expected GWT to be able to understand the
> > JSON "[]" representation as an array. GWT should be able to dispatch
> > each individual element in the array to Article class, which will use
> > native methods to map out individual attributes. That's why I assume
> > "this" in "this.title" correspond to "Aritcle:{...}"
>
> Your Article class corresponds to the object which is a direct child
> of the array, the one with an "Article" key. Your code expects it to
> be the object that's the value of this "Article" property.
> Let's try again:
> You receive:
>  [
>    {
>       "Article": { "title": ... }
>    },
>    {
>       "Article": { "title": ... }
>    },
>    ...
>  ]
> but process it as if it were:
>  [
>     { "title": ... },
>     { "title": ... },
>     ...
>
>  ]
>
> > Now let's say I changed the native code to 'array[0].Article.title'.
>
> I wasn't suggesting that. I was suggesting that either you use
> this.Article.title or add another JavaScriptObject representing the
> {'Article': ... } object, whose this.Article would be your current
> Article class.

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



UiBinder fails with class HTML has no appropriate setHtml() method

2010-03-23 Thread brendan
Using the following UiBinder xml I get  " In , class HTML
has no appropriate setHTML() method".  However the HTML class does
have a setHTML method, as my workaround is to call setHTML from code.
So this error is incorrect.  Unless someone can see something I'm
doing wrong, I'll report the error.

http://dl.google.com/gwt/DTD/xhtml.ent";>








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



DualList, showing lists inside a fieldset

2010-03-23 Thread noob_boy
Experts,

I have to show the left side and the right side lists in a duallist
inside fieldsets. How do I do it?

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.



Re: how to make cookie unable to expire

2010-03-23 Thread mariyan nenchev
Hi,

use
Cookies.setCookie(name, value, new Date(System.currentTimeMillis() +
exipry));
Where expiry is how long you want your cookie to live in milliseconds.

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



Printing the contents of TextArea

2010-03-23 Thread abhiram
Hi All,

   I am trying to print the contents of a textArea. But i am able to
print only the part of the text which is visible and not the ones that
I see when i scroll down. Can someone one tell me the proper print
functionality that needs to be used to actually display the entire
content of the text area (same behaviour is seen in scrollpanel even).

  Right now I am using this functionality.


native void printx(String s) /*-{

var win1 = window.open('', 'reportwindow');

win1.document.open();
win1.document.write("Report");
win1.document.write(" body,td {font-family:sans-
serif;font-size:10pt;}");
win1.document.write(" \r\n")
win1.document.write("function Print(){window.print()}")
win1.document.write("");
win1.document.write(s);
win1.document.write("");
win1.document.close();
win1.close();
}-*/;

public void printIt(String html){



printx(html);
}

 Please let me know what is the approach to be followed.

Thanks and regards,
Abhiram

-- 
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: Strange behavior on label in FF

2010-03-23 Thread mariyan nenchev
Hi,

don't worry i fixed it. There was some other invisible div that overlaps on
resizing.

-- 
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 make cookie unable to expire

2010-03-23 Thread la_89ondevg
Hye Everybody
I posted here expecting suggestions or solution for this problem.

PROBLEM: I was making a for a login screen and wanted to add the
feature of 'remember me' in the login screen. But even after googling
and reading hundreds of lines on different blogs I don't find any
solution for setting a cookie such that it never expires. Where ever I
read people written that it is impossible or set the expire date
duration too long but cookie will expire in any case. I heard about
setting some value (For me it is a coding trick as I'm a newbie) to
the cookie such that it will never expire. So if anybody knows kindly
reply to this post.

Regards
la_89ondevg

-- 
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: Unable to migrate GWT application to version 2.03 due to problem with internationalization

2010-03-23 Thread craige
Sorry, it looks you are indeed right. Many thanks for your help. This
project was my first foray into internationalization and GWT let me do
something I should not have done which was to create my own locale by
the looks of things.

Regards

Craige




On Mar 23, 10:15 am, craige  wrote:
> Thanks for the suggestion. I tried it but even with a valid locale as
> the suffix of the file, it still gave the same error when attempting
> to compile. Perhaps I'm missing an essential piece of information that
> I cannot find!
>
> The name of the file is InternationalizationConstants_es-
> GTC.properties and perhaps it was a happy accident that it worked
> before.
>
> Regards
>
> Craige
>
> On Mar 19, 3:03 pm, Danny Goovaerts  wrote:
>
> > es_GTC is normally not a valid locale. The "country" part of a locale
> > is the two character ISO country code. GTC is not a valid country
> > code.
> > A reason might be that GWT 1.5 was not strict about the country code
> > format, and that 2.0 is much stricter.
>
> > Danny
> > On 19 mrt, 14:28,craige wrote:
>
> > > I am trying to migrate a GWT 1.5 application (which definitely works
> > > without problem) to 2.03 and I am having problems with the compilation
> > > of the application. My application uses various locales which are
> > > defined in the Main.gwt.xml file
>
> > >         
> > >         
> > >         
>
> > > The problem comes when the compiler attempts to compile the locale
> > > es_GTC and the file InternationalizationConstants_es_GTC.properties
>
> > > The error from the compiler was as follows :
>
> > >         Validating newly compiled units
> > >             [ERROR] Errors in 'generated://
> > > 6156E89F6D1ADDBDACCA415E145F7A5A/com/google/gwt/i18n/client/impl/
> > > LocaleInfoImpl_es-gtc.java'
> > >                [ERROR] Line 10: The type LocaleInfoImpl_es is already
> > > defined
> > >                [ERROR] Line 10: Syntax error on token "-", < expected
> > >                [ERROR] Line 10: Syntax error, insert ">" to complete
> > > ReferenceType1
>
> > > This previously worked with GWT 1.5. If I remove the locale
>
> > > 
>
> > > from the Main.gwt.xml file, the application compiles and runs without
> > > problem. It seems that the GWT compiler has a problem with the -
> > > character in the name of the autogenerated java method which is
>
> > > public class LocaleInfoImpl_es-gtc extends LocaleInfoImpl_shared {
>
> > > Anybody got any suggestions? I've looked in the documentation for GWT
> > > 2.x and there is nothing to indicate that this has changed.
>
> > > Thanks
>
> > >Craige
>
>

-- 
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: "java.net.SocketException: Invalid argument" when running devmode

2010-03-23 Thread Chihab Otmani
It seems to be an IPV6 issue. By seting the networking property
"java.net.preferIPv4Stack=true" as jvm argument, jetty server starts
successfully.
I did this by adding the property to the jvm arguments on the devmode
ant target.
On eclipse, I added the property to jvm arguments on the StockWatcher
Run configuration.

Thanks for your help.

On Mar 22, 6:15 pm, Chihab Otmani  wrote:
> I've actually set up this property on my eclipse.ini because otherwise
> I can't download GWT plugin on Eclipse.
>
> I can successfully start Jetty (installed from debian repository) and
> also other java services so it doesn't seem to be a socket listening
> issue. Maybe, the issue is do to the way eclipse's jetty is
> configured...
> I'll try tonight to figure out where it comes from.
>
> Thanks for your indications
>
> Chihab
>
> On Mar 22, 4:58 pm, Jason Parekh  wrote:
>
>
>
> > Hi Chihab,
>
> > Rajeev brought up a good point.  It could potentially be an IPV6 issue with
> > Sun's sockets. You could try seting the networking property:
> > java.net.preferIPv4Stack=true
> > as documented 
> > here:http://java.sun.com/j2se/1.4.2/docs/guide/net/ipv6_guide/index.htmljason
>
> > On Mon, Mar 22, 2010 at 10:30 AM, Jason Parekh wrote:
>
> > > Hi Chihab,
>
> > > It looks like there are general issues with your configuration when
> > > listening on sockets.
>
> > > Given you're on Linux, I can't imagine it to be permission issues.  Have
> > > you tried rebooting?  Do you know if any of your other apps successfully
> > > listen on a port?  Could you try a quick Java sample to listen on a port?
> > >  For example
> > >http://java.sun.com/docs/books/tutorial/networking/sockets/clientServ
>
> > > jason
>
> > > On Sun, Mar 21, 2010 at 5:58 PM, Chihab Otmani  wrote:
>
> > >> Hi all,
>
> > >> I've got the following errors when running the development mode code
> > >> server as described in this tutorial:
> > >>http://code.google.com/webtoolkit/doc/latest/tutorial/create.html,
> > >> either using eclipse or webAppcreator ant.
>
> > >> When using Eclipse, the following message is displayed in the
> > >> console :
> > >> "Could not connect to remote UI listening at localhost:52134. Using
> > >> default UI instead."
> > >> The GWT development Mode window is displayed. According to the Web
> > >> Server tab, AppEngine seems to be started. The Development mode tab
> > >> shows a Communications error -- exception SocketException the detailed
> > >> trace is :
>
> > >> java.net.SocketException: Invalid argument
> > >>  at java.net.PlainSocketImpl.socketBind(Native Method)
> > >>  at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
> > >>  at java.net.ServerSocket.bind(ServerSocket.java:319)
> > >>  at java.net.ServerSocket.bind(ServerSocket.java:277)
> > >>  at
> > >> com.google.gwt.dev.shell.BrowserListener.(BrowserListener.java:
> > >> 67)
> > >>  at
> > >> com.google.gwt.dev.DevModeBase.ensureCodeServerListener(DevModeBase.java:
> > >> 898)
> > >>  at com.google.gwt.dev.DevModeBase.doStartup(DevModeBase.java:888)
> > >>  at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1030)
> > >>  at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:783)
> > >>  at com.google.gwt.dev.DevMode.main(DevMode.java:275)
>
> > >> When using webAppCreator (from the GWT eclipse plugin installation
> > >> folder) and then "ant devmode" to test, I've got:
> > >> devmode:
> > >>     [java] Unable to start embedded HTTP server
> > >>     [java] java.net.SocketException: Invalid argument
> > >>     [java]     at sun.nio.ch.Net.bind(Native Method)
> > >>     [java]     at
> > >> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:
> > >> 119)
> > >>     [java]     at
> > >> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:
> > >> 59)
> > >>     [java]     at
>
> > >> org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.ja
> > >>  va:
> > >> 205)
> > >>     [java]     at
>
> > >> org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector
> > >>  .java:
> > >> 304)
> > >>     [java]     at
> > >> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> > >> 39)
> > >>     [java]     at org.mortbay.jetty.Server.doStart(Server.java:
> > >> 233)
> > >>     [java]     at
> > >> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> > >> 39)
> > >>     [java]     at
> > >> com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:
> > >> 543)
> > >>     [java]     at
> > >> com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:
> > >> 421)
> > >>     [java]     at
> > >> com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:
> > >> 1035)
> > >>     [java]     at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:
> > >> 783)
> > >>     [java]     at com.google.gwt.dev.DevMode.main(DevMode.java:275)
>
> > >> Do you have an idea where these errors come from ?
>
> > >> My environment:
> > >> * Eclipse Galileo 3.5.2 with Java EE IDE Feature 1.2.2
> > >

Re: Unable to migrate GWT application to version 2.03 due to problem with internationalization

2010-03-23 Thread craige
Thanks for the suggestion. I tried it but even with a valid locale as
the suffix of the file, it still gave the same error when attempting
to compile. Perhaps I'm missing an essential piece of information that
I cannot find!

The name of the file is InternationalizationConstants_es-
GTC.properties and perhaps it was a happy accident that it worked
before.

Regards

Craige

On Mar 19, 3:03 pm, Danny Goovaerts  wrote:
> es_GTC is normally not a valid locale. The "country" part of a locale
> is the two character ISO country code. GTC is not a valid country
> code.
> A reason might be that GWT 1.5 was not strict about the country code
> format, and that 2.0 is much stricter.
>
> Danny
> On 19 mrt, 14:28,craige wrote:
>
> > I am trying to migrate a GWT 1.5 application (which definitely works
> > without problem) to 2.03 and I am having problems with the compilation
> > of the application. My application uses various locales which are
> > defined in the Main.gwt.xml file
>
> >         
> >         
> >         
>
> > The problem comes when the compiler attempts to compile the locale
> > es_GTC and the file InternationalizationConstants_es_GTC.properties
>
> > The error from the compiler was as follows :
>
> >         Validating newly compiled units
> >             [ERROR] Errors in 'generated://
> > 6156E89F6D1ADDBDACCA415E145F7A5A/com/google/gwt/i18n/client/impl/
> > LocaleInfoImpl_es-gtc.java'
> >                [ERROR] Line 10: The type LocaleInfoImpl_es is already
> > defined
> >                [ERROR] Line 10: Syntax error on token "-", < expected
> >                [ERROR] Line 10: Syntax error, insert ">" to complete
> > ReferenceType1
>
> > This previously worked with GWT 1.5. If I remove the locale
>
> > 
>
> > from the Main.gwt.xml file, the application compiles and runs without
> > problem. It seems that the GWT compiler has a problem with the -
> > character in the name of the autogenerated java method which is
>
> > public class LocaleInfoImpl_es-gtc extends LocaleInfoImpl_shared {
>
> > Anybody got any suggestions? I've looked in the documentation for GWT
> > 2.x and there is nothing to indicate that this has changed.
>
> > Thanks
>
> >Craige
>
>

-- 
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: JavaScriptException during JSNI call: Invoking an instance method on a null instance

2010-03-23 Thread ChrisK
Ahhh ok. Sorry for the simple questions but I'm just getting my head
around all this. I also have some other methods with arguments and
have those working thanks to both of you.


On Mar 23, 9:56 am, Olivier Monaco  wrote:
> ChrisK,
>
> On 23 mar, 10:32, ChrisK  wrote:
>
> > Thomas - your solution worked from 6 worked but at first I didn't
> > include both pairs of brackets after the function call "MyMethod" but
> > it turns out they are required. With only one set (i.e. no arguments),
> > it just doesn't work. I thought that was legal but maybe not.
>
> Remember that "@mypackage.MyClass::MyMethod()" is a reference to the
> function, not a call. The parenthesis allow you to give the full
> signature of the method. Java allows two methods to have the same name
> but different parameters. GWT needs the "full" signature to find which
> method you want to reference, even is there is only one method with
> this name.
>
> The second parenthesis are to call the method. If you forgot then, you
> just obtain the function object and do nothing with it...
>
> Olivier

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-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.



Strange behavior on label in FF

2010-03-23 Thread mariyan nenchev
Hi,

I have gwt app that is placed in 600x750px box, centered on the screen. The
left part of this box is vertical menu that contains labels. When the
browser window is in full size the labels are working, but when i begin
unmaximize (resize) the browser window after some point they become inactive
- onClick is not fired when i click on some of the labels. Instead, if i
move the mouse little after the label content and click it is working. This
is happening in FF and safari, in IE it works.

Here is my code:
Custom link:
public class CustomLink extends Label {

public CustomLink(String title) {
super(title);
this.setStyleName("custom-link");
this.setHorizontalAlignment(ALIGN_LEFT);
}
}

In the MenuView:
private final VerticalPanel main = new VerticalPanel();



// click handler that changes the styles:
final ClickHandler clickHandler = new ClickHandler() {
@Override
public void onClick(ClickEvent clickevent) {
final CustomLink link = ((CustomLink)
clickevent.getSource());
final Iterator i = main.iterator();
while (i.hasNext()) {
final Widget w = i.next();
if (w instanceof CustomLink) {
final CustomLink bl = (CustomLink) w;
bl.removeStyleName("link-selected");
bl.addStyleName("link");
}
}
link.removeStyleName("link");
link.addStyleName("link-selected");
}
};

main.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
link1 = new CustomLink("link1");
link.addClickHandler(clickHandler);

main.add(link1);

addLineSeparator();

link2 = new CustomLink("link2";
link2.addClickHandler(clickHandler);
main.add(link2);

addLineSeparator();

css:
link-selected {
margin-left: 10px;
cursor: pointer;
cursor: hand;
font-size: 11px;
font-weight: bold;
color: #003366;
font-family: Arial;
}

.link {
text-decoration: none;
margin-left: 10px;
cursor: pointer;
cursor: hand;
font-size: 11px;
color: #003366;
font-family: Arial;
}

-- 
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: JavaScriptException during JSNI call: Invoking an instance method on a null instance

2010-03-23 Thread Olivier Monaco
ChrisK,

On 23 mar, 10:32, ChrisK  wrote:
> Thomas - your solution worked from 6 worked but at first I didn't
> include both pairs of brackets after the function call "MyMethod" but
> it turns out they are required. With only one set (i.e. no arguments),
> it just doesn't work. I thought that was legal but maybe not.

Remember that "@mypackage.MyClass::MyMethod()" is a reference to the
function, not a call. The parenthesis allow you to give the full
signature of the method. Java allows two methods to have the same name
but different parameters. GWT needs the "full" signature to find which
method you want to reference, even is there is only one method with
this name.

The second parenthesis are to call the method. If you forgot then, you
just obtain the function object and do nothing with it...

Olivier

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-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: JavaScriptException during JSNI call: Invoking an instance method on a null instance

2010-03-23 Thread ChrisK
Hi, thanks for the answers again!

Ok, I have some working code now! I think my issues were a combined
not understand "this" became the $wnd object when written how I had
it, plus not understanding what $entry actually does. Having said that
the docs on $entry could be better than the few sentences given.

Incidentally, I had some similar code where I had tried wrapping in
"function() { }" but hadn't gotten that working.

Olivier - your solutions worked first time for me.

Thomas - your solution worked from 6 worked but at first I didn't
include both pairs of brackets after the function call "MyMethod" but
it turns out they are required. With only one set (i.e. no arguments),
it just doesn't work. I thought that was legal but maybe not.

Now I just have to decide which method is best. I think I prefer
passing in the instance as a parameter of the inject method - I just
prefer the argument to be strongly typed on the Java side (being
primarily a Java developer). Olivier's code to work against memory
leaks also seems sensible to me. I have a static method which does
both of these now and works fine and think I understand the area a lot
better thanks to you two. It does seem like a lot to write just to get
a callback though! Maybe some decent examples like this would be
useful in the GWT documentation pages?



On Mar 23, 8:30 am, Olivier Monaco  wrote:
> Hi Thomas,
>
> The problem with memory leaks in browser is that it's sometimes hard
> to understand where they come from. Here, we are writting a little
> piece of code that will be transformed (replacement of @...()) and
> incorporated into a more complexe code. I don't want to look at the
> generated code to check if leaks are possibile. So, I always use the
> syntax I give so that I'm sure there will not be any leak... It's some
> type of discipline.
>
> Using a static method to inject the code seems to me being the same
> thing...
>
> Olivier
>
> On 23 mar, 00:07, Thomas Broyer  wrote:
>
> > On 22 mar, 23:42, Olivier Monaco  wrote:
>
> > > The "call" method of a JavaScript function allows you to call it with
> > > a differente "this". Then, using "$wnd.js_callback.call(otherObject)",
> > > the "this" variable reference otherObject. So the glue is:
>
> > > var that = this;
> > > $wnd.js_callback = function() {
> > >     $entry(@mypackage.MyClass::MyMethod()).call(that);
>
> > > }
>
> > > When "js_callback" will be called, MyMethod is called on "that", the
> > > JavaScript object representing the MyClass instance. Finally, to avoid
> > > memory leaks of closure:
>
> > > $wnd.js_callback = (function(obj) {
> > >     return function() {
> > >         $entry(@mypackage.MyClass::MyMethod()).call(obj);
> > >     };
>
> > > })(this);
>
> > ... or more simply:
> > var that = this;
> > $wnd.js_callback = $entry(function() { that.
> > @mypackage.MyClass::MyMethod()(); });
>
> > (this is what I should have written previously, sorry for the buggy
> > code)
>
> > As for the leak, are you sure there really is one once the code is
> > translated into JS? would it be better if the "inject" method were a
> > static one with the instance being passed as an argument (no use of
> > the "this"keyword within JSNI)?
>
>

-- 
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: JavaScriptException during JSNI call: Invoking an instance method on a null instance

2010-03-23 Thread Olivier Monaco
Hi Thomas,

The problem with memory leaks in browser is that it's sometimes hard
to understand where they come from. Here, we are writting a little
piece of code that will be transformed (replacement of @...()) and
incorporated into a more complexe code. I don't want to look at the
generated code to check if leaks are possibile. So, I always use the
syntax I give so that I'm sure there will not be any leak... It's some
type of discipline.

Using a static method to inject the code seems to me being the same
thing...

Olivier

On 23 mar, 00:07, Thomas Broyer  wrote:
> On 22 mar, 23:42, Olivier Monaco  wrote:
>
>
>
>
>
> > The "call" method of a JavaScript function allows you to call it with
> > a differente "this". Then, using "$wnd.js_callback.call(otherObject)",
> > the "this" variable reference otherObject. So the glue is:
>
> > var that = this;
> > $wnd.js_callback = function() {
> >     $entry(@mypackage.MyClass::MyMethod()).call(that);
>
> > }
>
> > When "js_callback" will be called, MyMethod is called on "that", the
> > JavaScript object representing the MyClass instance. Finally, to avoid
> > memory leaks of closure:
>
> > $wnd.js_callback = (function(obj) {
> >     return function() {
> >         $entry(@mypackage.MyClass::MyMethod()).call(obj);
> >     };
>
> > })(this);
>
> ... or more simply:
> var that = this;
> $wnd.js_callback = $entry(function() { that.
> @mypackage.MyClass::MyMethod()(); });
>
> (this is what I should have written previously, sorry for the buggy
> code)
>
> As for the leak, are you sure there really is one once the code is
> translated into JS? would it be better if the "inject" method were a
> static one with the instance being passed as an argument (no use of
> the "this"keyword within JSNI)?

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