Session Management in the gwt-ext

2011-04-22 Thread Sanjay Jain
Hello All
I am working on the gwt-ext application.On the server side I am using
Hibernate.I am mantaining session on the server side.it's time out is
5 minute (In action class).
Now take a secenario in which a user logged in  remains it open for
five minute.After five minutes expires it do a click on a button on
the screen.There is some process on the client side  it is of 2
minutes and after that it goes for a server call.When it go for server
call it is already session out (as session time is 5 minutes which is
already expired).And a message of session out popped up with
redirecting the login page.
In this whole case user feels that I am active on the system so why I
am redirected to login page.
Reason behind is that that session is maintained on the server
side.And server hit is after seven minutes.
So I am thinking to maitain the session on the client side also.How to
achieve this in the gwt based application.
Is there any other way to do solve this issue.
Thanks to all.

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



Debugging Maven Project in Eclipse ( Tutorial )

2011-04-22 Thread Metronome Basic
Any suggestion for debugging in Eclipse

If you create an Eclipse Project , the debugging facilities are there and ready 
to use.

If you import a maven project , you cannot run as Webapp nor Debug

Or you have to setup a debug configuration ( for every project ? )

or is there something you can add in your pom ?

any help welcome

Patrick

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



module not loading

2011-04-22 Thread Carlos
hi all,

if i have two different modules and each module is associated to an
html page
when the user navigates from the host page to the second page the
module(script) is not working its just viewing the html contents and
the onModuleLoad() is not firing.

in fact i compiled the two modules and running in development mode.

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



Re: Layout Panels missing from GWT Designer palette in Eclipse

2011-04-22 Thread Christian
I have done some further testing. Using Eclipse under Windows the
problem remains the same. But if I create a new project the missing
panels are present in the designer, so it must depend on some settings
of my existing project. Nevertheless it is not possible to export the
palette from the one project and import it into the other.

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



Loading thumbnails of images as links in gwt

2011-04-22 Thread Patssay
Hi,
I am trying to load thumbnail images as links in gwt. I am not able to
figure out the exact way to do this?
Could someone please help?


Thanks,
Sayali

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



Debuging GWT application with Eclipse

2011-04-22 Thread tdanan
Hi All,

I am currently working on a client / server GWT application using
eclipse and gwt plugin and jetty.
The server code needs to read a file on disk.
When I launch my Web Application from eclipse ( run or debug mode ) I
get the following exception.
I do not have the issue when starting the Web Application in devmode
using ant :
It sounds like the security policy configuration is not correct but I
cannot figure out why it is different  when I start the project from
eclipse or not. Due to this, I am not able to debug my Web
application.
I did not find any good explanation on google but I think I am not the
only one who has this issue.

Thank you very much for your help

Thomas

java.security.AccessControlException: access denied
(java.io.FilePermission /etc/vtiflash/vtiflash.site.properties read)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:
323)
at
java.security.AccessController.checkPermission(AccessController.java:
546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:
532)
at com.google.appengine.tools.development.DevAppServerFactory
$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at java.io.File.exists(File.java:731)
at
com.mycom.vtiflash.server.VTIBuilderServiceImpl.init(VTIBuilderServiceImpl.java:
89)
at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:
440)
at
org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:
339)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
58)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
122)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
70)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:351)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
409)
at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:582)

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



Which widget to use

2011-04-22 Thread Riyaz
Hi,

I am a 2 day  old developer of GWT,
I need some advice on which widget to use, my use case is this

1) i need a grid to display items,
2)Each item row should have a link/icon , clicking on which the should
expand and collapse showing the details of the item
3)I should also be able to edit few fields in a row and commit them
instantly
4)i will be updating the grid for additional entries frquently, so
some refresh mechanism should be supported

Thanks in advance
Riyaz

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



some problem about GWT

2011-04-22 Thread 剑涛 何
I code a servlet in GWT:
Line 8:   public class AddServvlet extends HttpServlet{
private static final long serialV = 1L;
protected void doPost(HttpServletRequest req,HttpServletResponse res)
{
int a = Integer.parseInt(req.getParameter(a));
int b = Integer.parseInt(req.getParameter(b));
try {
res.getWriter().print(a+b);
} catch (IOException e) {
// TODO: handle exception
}
}
}
when I run the project in IE,it say:[ERROR] [hellogwt] - Line 8: No
source code is available for type javax.servlet.http.HttpServlet; did
you forget to inherit a required module?
[ERROR] [hellogwt] - Line 10: No source code is available for 
type
javax.servlet.http.HttpServletRequest; did you forget to inherit a
required module?
[ERROR] [hellogwt] - Line 10: No source code is available for 
type
javax.servlet.http.HttpServletResponse; did you forget to inherit a
required module?
thank you!

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



Re: Debugging Maven Project in Eclipse ( Tutorial )

2011-04-22 Thread cri
You may find http://mojo.codehaus.org/gwt-maven-plugin/ helpful.

On Apr 22, 2:33 am, Metronome  Basic
metronome.ba...@worldonline.fr wrote:
 Any suggestion for debugging in Eclipse

 If you create an Eclipse Project , the debugging facilities are there and 
 ready to use.

 If you import a maven project , you cannot run as Webapp nor Debug

     Or you have to setup a debug configuration ( for every project ? )

     or is there something you can add in your pom ?

 any help welcome

 Patrick

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



Appstats RecordingFuture classcast exception

2011-04-22 Thread Baloe
Hi all,

We're using the appstats for extra logging. Works fine as far as I've
looked at it, but not we get a classcast exception for most requests.
Looks like a java version conflict to me, but we only included the
library, so there is no point in fixing anything.


The error:

Reason:
precom.google.appengine.tools.appstats.RecordingFuture cannot be
cast to com.google.appengine.tools.appstats.RecordingFuture/pre/
ph3Caused by:/h3prejava.lang.ClassCastException:
com.google.appengine.tools.appstats.RecordingFuture cannot be cast to
com.google.appengine.tools.appstats.RecordingFuture



The only thing we did was add it to the web.xml:

filter
filter-nameappstats/filter-name
filter-
classcom.google.appengine.tools.appstats.AppstatsFilter/filter-
class
init-param
param-namelogMessage/param-name
param-valueAppstats available: /appstats/details?
time={ID}/param-value
/init-param
/filter
filter-mapping
filter-nameappstats/filter-name
url-pattern/ourstuff/*/url-pattern
/filter-mapping


 servlet
servlet-nameappstats/servlet-name
servlet-
classcom.google.appengine.tools.appstats.AppstatsServlet/servlet-
class
/servlet
servlet-mapping
servlet-nameappstats/servlet-name
url-pattern/appstats/*/url-pattern
/servlet-mapping

Thanks,
Niels

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



Re: Debugging Maven Project in Eclipse ( Tutorial )

2011-04-22 Thread Metronome Basic

Using Eclipse
Google Eclipse plugin automatically handle launching the Hosted mode browser 
with a simple right click on your module gwt.xml file run as  web 
application.


I wish it could be that simple

I have 3 Pcs ( 2 with Xp 1 debian lenny ) with eclipse and maven plugin

only on on 3 only 1 of  then  has  run as  web application. on maven 
projects


( they all have this option on Eclipse Projects )

nightmare

Patrick

- Original Message - 
From: cri chuck.irvine...@gmail.com

To: Google Web Toolkit google-web-toolkit@googlegroups.com
Sent: Friday, April 22, 2011 3:41 PM
Subject: Re: Debugging Maven Project in Eclipse ( Tutorial )


You may find http://mojo.codehaus.org/gwt-maven-plugin/ helpful.

On Apr 22, 2:33 am, Metronome  Basic
metronome.ba...@worldonline.fr wrote:

Any suggestion for debugging in Eclipse

If you create an Eclipse Project , the debugging facilities are there and 
ready to use.


If you import a maven project , you cannot run as Webapp nor Debug

Or you have to setup a debug configuration ( for every project ? )

or is there something you can add in your pom ?

any help welcome

Patrick


--
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.

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





-
Aucun virus trouvé dans ce message.
Analyse effectuée par AVG - www.avg.fr
Version: 10.0.1209 / Base de données virale: 1500/3590 - Date: 22/04/2011


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



Re: Debugging Maven Project in Eclipse ( Tutorial )

2011-04-22 Thread Jeff Larsen
Have you enabled the GPE for the other projects that don't have right click 
run as web application?

you can also check out David Chandler's post 
http://googlewebtoolkit.blogspot.com/2010/08/how-to-use-google-plugin-for-eclipse.html



It is a bit old, so it might be dated. I'm not sure. I know I just use the 
archetype to create new maven projects and everything works out just swell.

archetype link 
http://mojo.codehaus.org/gwt-maven-plugin/user-guide/archetype.html

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



Adding a control (ex.: Button) to a StackPanel header, is it possible?

2011-04-22 Thread Chris
I'm looking around and trying to find a way to add a Button to a Stack
Panel's header; has anyone done this before?

Thanks.

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



Re: Problems with Godaddy hosting and server-side deserialization

2011-04-22 Thread Andrew Calleja
Unfortunately the appengine doesn't cater for my needs as the 3000
files limit is too low for the custom skin I need to use.

Is there really no way around the above?

Thanks again,

Andrew

On Apr 21, 6:49 pm, Andrew C drewcall...@gmail.com wrote:
 Will look it up.

 Thanks David and Nino

 On Apr 21, 6:18 pm, nino ekambi jazzmatad...@googlemail.com wrote:







  + 1  for Appengine

  You will never regret :)

  2011/4/21 David Chandler drfibona...@google.com

   Hi Andrew,

Can anyone point me in the right direction?

   May I suggest Google App Engine? :-)

   /dmc

   On Wed, Apr 20, 2011 at 4:55 PM, Andrew C drewcall...@gmail.com wrote:

   Hi there,

   I have developed an application using GWT and have managed to
   successfully deploy it on my local tomcat server. Everything works
   fine here and I am able to transmit serialized data from client to
   server and vice-versa. However, when I use Godaddy hosting, on a
   specific call to server, due to what I believe are restrictions on
   reflection, I am getting the following exception:

   java.security.AccessControlException: access denied
   (java.lang.RuntimePermission accessDeclaredMembers)

   java.security.AccessControlContext.checkPermission(AccessControlContext.jav
a:
   264)
   java.security.AccessController.checkPermission(AccessController.java:
   427)
   java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
   java.lang.SecurityManager.checkMemberAccess(SecurityManager.java:1662)
   java.lang.Class.checkMemberAccess(Class.java:2125)
   java.lang.Class.getDeclaredConstructor(Class.java:1952)

   com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.instant
iate(ServerSerializationStreamReader.java:
   886)

   com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deseria
lize(ServerSerializationStreamReader.java:
   544)

   com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readO
bject(AbstractSerializationStreamReader.java:
   61)
   com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader
   $ValueReader$8.readValue(ServerSerializationStreamReader.java:137)

   com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deseria
lizeValue(ServerSerializationStreamReader.java:
   384)
   com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:296)

   com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServi
ceServlet.java:
   186)

   com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServi
ceServlet.java:
   224)

   com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(Abstract
RemoteServiceServlet.java:
   62)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:
   709)javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   sun.reflect.GeneratedMethodAccessor274.invoke(Unknown

   Source)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
ssorImpl.java:
   25)
   java.lang.reflect.Method.invoke(Method.java:
   592)org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:
   239)
   java.security.AccessController.doPrivileged(Native
   Method)javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
   org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:
   266)
   org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:
   157)

   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
nFilterChain.java:
   231)
   org.apache.catalina.core.ApplicationFilterChain.access
   $000(ApplicationFilterChain.java:50)
   org.apache.catalina.core.ApplicationFilterChain
   $1.run(ApplicationFilterChain.java:140)
   java.security.AccessController.doPrivileged(Native Method)

   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
hain.java:
   136)

   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
ava:
   214)

   org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
xt.java:
   104)
   org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
   520)

   org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContex
tValve.java:
   198)

   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
ava:
   152)

   org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
xt.java:
   104)
   org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
   520)
   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
   137)

   org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
xt.java:
   104)
   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
   117)

   org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
xt.java:
   102)
   org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
   

Re: Which widget to use

2011-04-22 Thread Sunit Katkar
Take a look at the new CELL widgets in GWT .

Thank you,
Sunit Katkar




On Thu, Apr 21, 2011 at 8:25 PM, Riyaz sunez.ri...@gmail.com wrote:

 Hi,

 I am a 2 day  old developer of GWT,
 I need some advice on which widget to use, my use case is this

 1) i need a grid to display items,
 2)Each item row should have a link/icon , clicking on which the should
 expand and collapse showing the details of the item
 3)I should also be able to edit few fields in a row and commit them
 instantly
 4)i will be updating the grid for additional entries frquently, so
 some refresh mechanism should be supported

 Thanks in advance
 Riyaz

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



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



Re: Adding a control (ex.: Button) to a StackPanel header, is it possible?

2011-04-22 Thread Sunit Katkar
The StackPanel header itself is supposed to be a clickable area. So I wonder
why you would want to add a button to this area.
Anyway, I do not have an idea how to add the button there.

Thank you,
Sunit Katkar




On Fri, Apr 22, 2011 at 7:50 AM, Chris chris.sim...@gmail.com wrote:

 I'm looking around and trying to find a way to add a Button to a Stack
 Panel's header; has anyone done this before?

 Thanks.

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



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



Re: GWT RPC - WebServiceClient

2011-04-22 Thread Sunit Katkar
We have exact same situation and it all works.

We use apache cxf as the communication between the GWT servlets and the API
layer on another server.
When the WSDLs are created for the apache cxf, we generate a client side jar
and include it in the GWT project. This allows us access to the java objects
which are created on API layer side, then transmitted as XML and finally
reconstructed on GWT (UI) server side.

Basically the idea is similar to generating a Java client for using your web
service and then use it in your GWT servlet.

I would have shared code with you but cannot as its company code and company
policy, etc.

Thank you,
Sunit Katkar




On Wed, Apr 20, 2011 at 12:17 AM, Stijn Bienkens 
stijn.bienk...@k2-solutions.eu wrote:

 Hello

 We are currently looking to optimize some of our GWT projects but we
 ran into a few issues.

 Most if not all of our data is coming from an OSGI backend.
 Communication between the GWT client - GWT RPC - OSGI backend is far
 from optimal as we have to write a lot of boiler plate code. To
 optimize this we were thinking of including one ( or multiple)
 webservices in our OSGI backend using Apache CXF.

 On the GWT RPC side we implemented a webservice client using Apache
 CXF 2 as well. However the real challenge we are facing is how to use
 the CXF generated objects for communication between GWT client and GWT
 RPC.

 I've came across several posts claiming this was perfectly possible
 but so far we haven't been successful.

 The Apache CXF generated classes have references to JAXBElement, when
 compiling this results in: No source code is available for type
 javax.xml.bind.JAXBElementT;
 Using the super-source tag we provided the source for JAXBElement,
 however this results in more of the same issues for:
 javax.xml.namespace.Qname, java.io.ObjectInputStream,
 java.lang.ClassNotFoundException, ...

 Is there anyway to accomplish this or another path we can follow?

 Thank you in advance
 Stijn

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



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



Re: Problems with Godaddy hosting and server-side deserialization

2011-04-22 Thread Alan Chaney
I have no experience with GoDaddy, but it looks to me like they have a Java security manager in 
place. You could fix your problem by changing the security settings to allow  classes in the 
com.google.gwt.user.server.rpc.impl package access.


You may have to take this up with GoDaddy, as I suspect they may have a standard security manager 
that they use.


As a matter of interest I use tomcat regularly on other hosting providers and 
have no problems.

HTH

Alan


On 4/22/2011 7:51 AM, Andrew Calleja wrote:

Unfortunately the appengine doesn't cater for my needs as the 3000
files limit is too low for the custom skin I need to use.

Is there really no way around the above?

Thanks again,

Andrew

On Apr 21, 6:49 pm, Andrew Cdrewcall...@gmail.com  wrote:

Will look it up.

Thanks David and Nino

On Apr 21, 6:18 pm, nino ekambijazzmatad...@googlemail.com  wrote:








+ 1  for Appengine
You will never regret :)
2011/4/21 David Chandlerdrfibona...@google.com

Hi Andrew,

Can anyone point me in the right direction?

May I suggest Google App Engine? :-)
/dmc
On Wed, Apr 20, 2011 at 4:55 PM, Andrew Cdrewcall...@gmail.com  wrote:

Hi there,
I have developed an application using GWT and have managed to
successfully deploy it on my local tomcat server. Everything works
fine here and I am able to transmit serialized data from client to
server and vice-versa. However, when I use Godaddy hosting, on a
specific call to server, due to what I believe are restrictions on
reflection, I am getting the following exception:
java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessDeclaredMembers)
java.security.AccessControlContext.checkPermission(AccessControlContext.jav a:
264)
java.security.AccessController.checkPermission(AccessController.java:
427)
java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
java.lang.SecurityManager.checkMemberAccess(SecurityManager.java:1662)
java.lang.Class.checkMemberAccess(Class.java:2125)
java.lang.Class.getDeclaredConstructor(Class.java:1952)
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.instant 
iate(ServerSerializationStreamReader.java:
886)
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deseria 
lize(ServerSerializationStreamReader.java:
544)
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readO 
bject(AbstractSerializationStreamReader.java:
61)
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader
$ValueReader$8.readValue(ServerSerializationStreamReader.java:137)
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deseria 
lizeValue(ServerSerializationStreamReader.java:
384)
com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:296)
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServi 
ceServlet.java:
186)
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServi 
ceServlet.java:
224)
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(Abstract 
RemoteServiceServlet.java:
62)
javax.servlet.http.HttpServlet.service(HttpServlet.java:
709)javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
sun.reflect.GeneratedMethodAccessor274.invoke(Unknown
Source)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce 
ssorImpl.java:
25)
java.lang.reflect.Method.invoke(Method.java:
592)org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:
239)
java.security.AccessController.doPrivileged(Native
Method)javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:
266)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:
157)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio 
nFilterChain.java:
231)
org.apache.catalina.core.ApplicationFilterChain.access
$000(ApplicationFilterChain.java:50)
org.apache.catalina.core.ApplicationFilterChain
$1.run(ApplicationFilterChain.java:140)
java.security.AccessController.doPrivileged(Native Method)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC 
hain.java:
136)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j ava:
214)
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte 
xt.java:
104)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContex 
tValve.java:
198)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j ava:
152)
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte 
xt.java:
104)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
137)
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte 
xt.java:
104)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:

Re: Debuging GWT application with Eclipse

2011-04-22 Thread Carlos
hi,

i had a similar problem with eclipse.
the problem was that my SDK was in a shared network which results in
this exception.
so when i placed my SDK in a non shared area like D: or C: it worked
correctly.

hope this can help.

On 22 avr, 12:45, tdanan thomas.da...@mycom-int.com wrote:
 Hi All,

 I am currently working on a client / server GWT application using
 eclipse and gwt plugin and jetty.
 The server code needs to read a file on disk.
 When I launch my Web Application from eclipse ( run or debug mode ) I
 get the following exception.
 I do not have the issue when starting the Web Application in devmode
 using ant :
 It sounds like the security policy configuration is not correct but I
 cannot figure out why it is different  when I start the project from
 eclipse or not. Due to this, I am not able to debug my Web
 application.
 I did not find any good explanation on google but I think I am not the
 only one who has this issue.

 Thank you very much for your help

 Thomas

 java.security.AccessControlException: access denied
 (java.io.FilePermission /etc/vtiflash/vtiflash.site.properties read)
         at
 java.security.AccessControlContext.checkPermission(AccessControlContext.jav­a:
 323)
         at
 java.security.AccessController.checkPermission(AccessController.java:
 546)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:
 532)
         at com.google.appengine.tools.development.DevAppServerFactory
 $CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
         at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
         at java.io.File.exists(File.java:731)
         at
 com.mycom.vtiflash.server.VTIBuilderServiceImpl.init(VTIBuilderServiceImpl.­java:
 89)
         at
 org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:
 440)
         at
 org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:
 339)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
 487)
         at org.mortbay.jetty.servlet.ServletHandler
 $CachedChain.doFilter(ServletHandler.java:1166)
         at
 com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi­lter.java:
 58)
         at org.mortbay.jetty.servlet.ServletHandler
 $CachedChain.doFilter(ServletHandler.java:1157)
         at
 com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans­actionCleanupFilter.java:
 43)
         at org.mortbay.jetty.servlet.ServletHandler
 $CachedChain.doFilter(ServletHandler.java:1157)
         at
 com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile­Filter.java:
 122)
         at org.mortbay.jetty.servlet.ServletHandler
 $CachedChain.doFilter(ServletHandler.java:1157)
         at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
 388)
         at
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
 216)
         at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
 182)
         at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
 765)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
 418)
         at
 com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEn­gineWebAppContext.java:
 70)
         at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
 152)
         at com.google.appengine.tools.development.JettyContainerService
 $ApiProxyHandler.handle(JettyContainerService.java:351)
         at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
 152)
         at org.mortbay.jetty.Server.handle(Server.java:326)
         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
 542)
         at org.mortbay.jetty.HttpConnection
 $RequestHandler.content(HttpConnection.java:938)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
         at
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
 409)
         at org.mortbay.thread.QueuedThreadPool
 $PoolThread.run(QueuedThreadPool.java:582)

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



Re: some problem about GWT

2011-04-22 Thread Carlos
hi,

you are writing your code in the client side.
thats why it can't recognize the javax.servlet.http.HttpServlet since
it is not supported by the gwt libraries.


On 22 avr, 07:28, 剑涛 何 hejiant...@gmail.com wrote:
 I code a servlet in GWT:
 Line 8:   public class AddServvlet extends HttpServlet{
         private static final long serialV = 1L;
         protected void doPost(HttpServletRequest req,HttpServletResponse res)
 {
                 int a = Integer.parseInt(req.getParameter(a));
                 int b = Integer.parseInt(req.getParameter(b));
                 try {
                         res.getWriter().print(a+b);
                 } catch (IOException e) {
                         // TODO: handle exception
                 }
         }}

 when I run the project in IE,it say:            [ERROR] [hellogwt] - Line 8: 
 No
 source code is available for type javax.servlet.http.HttpServlet; did
 you forget to inherit a required module?
                 [ERROR] [hellogwt] - Line 10: No source code is available for 
 type
 javax.servlet.http.HttpServletRequest; did you forget to inherit a
 required module?
                 [ERROR] [hellogwt] - Line 10: No source code is available for 
 type
 javax.servlet.http.HttpServletResponse; did you forget to inherit a
 required module?
 thank you!

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



Re: How to validate email here

2011-04-22 Thread Harald Schilly
You need to be a bit more specific. You cannot use arbitrary classes on 
GWT's client side. That code needs to be accessible to the GWT compiler!

H

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



Why only Spring support in Roo?

2011-04-22 Thread cri
I see so many people wanting help on integrating Spring and GWT.
Google supports Spring integration in the context of Roo. Why not
support Spring integration with vanilla GWT applications? Actually,
same question with regard to Maven, i.e. I believe that Maven support
is provided in the context of GWT  Roo. Why not in the context of GWT
alone. I know there is gwt-maven-plugin and we use it with some
success however seamless interaction with GPE is not its strong suit.

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



GWT Reflection on Client Side

2011-04-22 Thread richip
I've two requirements that Reflection on the client side seems most
appropriate for:

1) To get references to field variables from client-side Java classes
where the the specific name is determined at runtime. I figured that
with Reflection, I could expose said field variables by using
accessors (e.g. name -- getName() { return name; }) and would use
Reflection to access the methods.

2) I'd need to know what class that returned object is an instance of
and inherits from. The objects themselves will be various GWT widgets.

What I'm attempting to accomplish here is a late-binding of a GWT
widget to its data model field. So say I've a field data of type int
that I could have the option of binding to a TextBox or an IntegerBox
at runtime.

Are there updates on Reflection in GWT? Any proposals that would avoid
creating a registry type of object for the various widgets that we'll
be using? (as they may be dynamically instantiated, as well)

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



Re: How to validate email here

2011-04-22 Thread andy
Sorry , i have got the concept... can please explain...

On Apr 22, 8:37 pm, Harald Schilly harald.schi...@gmail.com wrote:
 You need to be a bit more specific. You cannot use arbitrary classes on
 GWT's client side. That code needs to be accessible to the GWT compiler!

 H

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



Re: GWT Reflection on Client Side

2011-04-22 Thread Christian Goudreau
Take a look at this project:

http://code.google.com/p/gwt-ent/

Cheers,

On Fri, Apr 22, 2011 at 12:08 PM, richip ric...@gmail.com wrote:

 I've two requirements that Reflection on the client side seems most
 appropriate for:

 1) To get references to field variables from client-side Java classes
 where the the specific name is determined at runtime. I figured that
 with Reflection, I could expose said field variables by using
 accessors (e.g. name -- getName() { return name; }) and would use
 Reflection to access the methods.

 2) I'd need to know what class that returned object is an instance of
 and inherits from. The objects themselves will be various GWT widgets.

 What I'm attempting to accomplish here is a late-binding of a GWT
 widget to its data model field. So say I've a field data of type int
 that I could have the option of binding to a TextBox or an IntegerBox
 at runtime.

 Are there updates on Reflection in GWT? Any proposals that would avoid
 creating a registry type of object for the various widgets that we'll
 be using? (as they may be dynamically instantiated, as well)

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




-- 
Christian Goudreau
www.arcbees.com

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



Re: GWT Reflection on Client Side

2011-04-22 Thread richip
Actually, I might have jumped the gun there. Instead of accessing the
widget as one of my class's field variables, I could just traverse the
Widget structure looking for it by name. Is that even possible? Are
there methods / libraries out there that would allow me to specify a
Widget by some path specifier from within a Widget structure?

On Apr 22, 10:08 am, richip ric...@gmail.com wrote:
 I've two requirements that Reflection on the client side seems most
 appropriate for:

 1) To get references to field variables from client-side Java classes
 where the the specific name is determined at runtime. I figured that
 with Reflection, I could expose said field variables by using
 accessors (e.g. name -- getName() { return name; }) and would use
 Reflection to access the methods.

 2) I'd need to know what class that returned object is an instance of
 and inherits from. The objects themselves will be various GWT widgets.

 What I'm attempting to accomplish here is a late-binding of a GWT
 widget to its data model field. So say I've a field data of type int
 that I could have the option of binding to a TextBox or an IntegerBox
 at runtime.

 Are there updates on Reflection in GWT? Any proposals that would avoid
 creating a registry type of object for the various widgets that we'll
 be using? (as they may be dynamically instantiated, as well)

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



Re: GWT Reflection on Client Side

2011-04-22 Thread richip
*sigh* I replied before I saw this. Thanks!

On Apr 22, 10:17 am, Christian Goudreau goudreau.christ...@gmail.com
wrote:
 Take a look at this project:

 http://code.google.com/p/gwt-ent/

 Cheers,









 On Fri, Apr 22, 2011 at 12:08 PM, richip ric...@gmail.com wrote:
  I've two requirements that Reflection on the client side seems most
  appropriate for:

  1) To get references to field variables from client-side Java classes
  where the the specific name is determined at runtime. I figured that
  with Reflection, I could expose said field variables by using
  accessors (e.g. name -- getName() { return name; }) and would use
  Reflection to access the methods.

  2) I'd need to know what class that returned object is an instance of
  and inherits from. The objects themselves will be various GWT widgets.

  What I'm attempting to accomplish here is a late-binding of a GWT
  widget to its data model field. So say I've a field data of type int
  that I could have the option of binding to a TextBox or an IntegerBox
  at runtime.

  Are there updates on Reflection in GWT? Any proposals that would avoid
  creating a registry type of object for the various widgets that we'll
  be using? (as they may be dynamically instantiated, as well)

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

 --
 Christian Goudreauwww.arcbees.com

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



Re: How to validate email here

2011-04-22 Thread andy
Sorry , i haven't got the concept... can you please explain...

On Apr 22, 8:37 pm, Harald Schilly harald.schi...@gmail.com wrote:
 You need to be a bit more specific. You cannot use arbitrary classes on
 GWT's client side. That code needs to be accessible to the GWT compiler!

 H

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



Re: GWT Reflection on Client Side

2011-04-22 Thread Jeff Larsen
Are you just looking for databinding? If so look at the editor 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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



CellTable sorting : sorting several columns ?

2011-04-22 Thread Celinio
Hi,
I am using GWT 2.2 and the new CellTable sorting features, as described here
:
http://code.google.com/intl/fr-FR/webtoolkit/doc/latest/DevGuideUiCellTable.html

There is a strange error (Umbrella exception, nothing else) when I use the
columnSortHandler.setComparator(...) method.
I commented it out.

If i use the addColumnSortHandler(new ColumnSortEvent.Handler() {  ...}
method, it works.

However on one column only. I want to be able to sort the table, on
whichever column i click on.

So i'm stuck :
either i figure out what's wrong with the setComparator(..) method
or i use the addColumnSortHandler(...) and in that case i need to figure out
how to retrieve the name of the column
that is currently sorted.
Does anyone know what could be wrong ?
Thanks

Here is the code :
package com.francetelecom.voltage.gestion.presentation.client.mvp.view.impl;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

import com.ft.v.g.presentation.client.GwtApplication;
import com.ft.v.g.presentation.client.mvp.presenter.ListPresenter;
import com.ft.v.g.presentation.client.mvp.view.ListView;
import com.ft.v.g.presentation.client.ui.RecherchePanel;
import com.ft.v.g.presentation.client.ui.SimpleHasFeedback;
import com.ft.v.model.DemandeBean;
import com.google.gwt.cell.client.ClickableTextCell;
import com.google.gwt.cell.client.FieldUpdater;
import com.google.gwt.core.client.GWT;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.text.shared.AbstractSafeHtmlRenderer;
import com.google.gwt.text.shared.SafeHtmlRenderer;
import com.google.gwt.user.cellview.client.CellTable;
import com.google.gwt.user.cellview.client.Column;
import com.google.gwt.user.cellview.client.ColumnSortEvent;
import com.google.gwt.user.cellview.client.SimplePager;
import com.google.gwt.user.cellview.client.TextColumn;
import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;
import com.google.gwt.user.cellview.client.SimplePager.TextLocation;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.view.client.Range;
import com.google.gwt.view.client.RangeChangeEvent;
import com.google.gwt.view.client.RangeChangeEvent.Handler;


public class DemandesListViewImpl extends Composite implements
ListViewDemandeBean {


private RecherchePanel rp = new RecherchePanel();

private final CellTableDemandeBean demandeTable;
private final SimplePager pager;
private final static int PAGE_SIZE = 7;
private ListDemandeBean demandes;
private SimpleHasFeedback feedback;

private ListPresenterDemandeBean presenter;

public DemandesListViewImpl() {



feedback = new SimpleHasFeedback();
// Create a CellTable.
demandeTable = new CellTableDemandeBean();
demandeTable.getElement().setId(marketlist);
demandeTable.setPageSize(PAGE_SIZE);
demandeTable.setRowCount(0, true);

demandeTable.addRangeChangeHandler(new Handler() {

public void onRangeChange(RangeChangeEvent event) {

Range range = demandeTable.getVisibleRange();
int start = range.getStart();
int length = range.getLength();
ListDemandeBean toSet = new
ArrayListDemandeBean(length);
for (int i = start; i  start + length  i 
demandes.size(); i++)
toSet.add(demandes.get(i));
demandeTable.setRowData(start, toSet);

}
});

// Create a Pager to control the table.
SimplePager.Resources pagerResources = GWT
.create(SimplePager.Resources.class);
pager = new SimplePager(TextLocation.CENTER, pagerResources, false,
0,
true);
pager.setDisplay(demandeTable);

// Create id column.
TextColumnDemandeBean idColumn = new TextColumnDemandeBean() {

@Override
public String getValue(DemandeBean demande) {
//return demande.getId().toString();
return String.valueOf(demande.getIdDemande());
}

};

// renderer for nameColumn
SafeHtmlRendererString nameColumnRenderer = new
AbstractSafeHtmlRendererString() {

public SafeHtml render(String object) {

SafeHtmlBuilder builder = new SafeHtmlBuilder();
builder.appendHtmlConstant(a);
builder.appendEscaped(object);
builder.appendHtmlConstant(/a);
return builder.toSafeHtml();
}

};

// Create id column.
TextColumnDemandeBean etatColumn = new TextColumnDemandeBean() {

@Override
public String getValue(DemandeBean demande) {
return 

Re: Problems with Godaddy hosting and server-side deserialization

2011-04-22 Thread Andrew Calleja
I have a hunch its not possible in shared hosting accounts.

Thanks for the tip though.

Andrew

On Apr 22, 5:19 pm, Alan Chaney a...@mechnicality.com wrote:
 I have no experience with GoDaddy, but it looks to me like they have a Java 
 security manager in
 place. You could fix your problem by changing the security settings to allow  
 classes in the
 com.google.gwt.user.server.rpc.impl package access.

 You may have to take this up with GoDaddy, as I suspect they may have a 
 standard security manager
 that they use.

 As a matter of interest I use tomcat regularly on other hosting providers and 
 have no problems.

 HTH

 Alan

 On 4/22/2011 7:51 AM, Andrew Calleja wrote:









  Unfortunately the appengine doesn't cater for my needs as the 3000
  files limit is too low for the custom skin I need to use.

  Is there really no way around the above?

  Thanks again,

  Andrew

  On Apr 21, 6:49 pm, Andrew Cdrewcall...@gmail.com  wrote:
  Will look it up.

  Thanks David and Nino

  On Apr 21, 6:18 pm, nino ekambijazzmatad...@googlemail.com  wrote:

  + 1  for Appengine
  You will never regret :)
  2011/4/21 David Chandlerdrfibona...@google.com
  Hi Andrew,
  Can anyone point me in the right direction?
  May I suggest Google App Engine? :-)
  /dmc
  On Wed, Apr 20, 2011 at 4:55 PM, Andrew Cdrewcall...@gmail.com  wrote:
  Hi there,
  I have developed an application using GWT and have managed to
  successfully deploy it on my local tomcat server. Everything works
  fine here and I am able to transmit serialized data from client to
  server and vice-versa. However, when I use Godaddy hosting, on a
  specific call to server, due to what I believe are restrictions on
  reflection, I am getting the following exception:
  java.security.AccessControlException: access denied
  (java.lang.RuntimePermission accessDeclaredMembers)
  java.security.AccessControlContext.checkPermission(AccessControlContext.jav
   a:
  264)
  java.security.AccessController.checkPermission(AccessController.java:
  427)
  java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
  java.lang.SecurityManager.checkMemberAccess(SecurityManager.java:1662)
  java.lang.Class.checkMemberAccess(Class.java:2125)
  java.lang.Class.getDeclaredConstructor(Class.java:1952)
  com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.instant
   iate(ServerSerializationStreamReader.java:
  886)
  com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deseria
   lize(ServerSerializationStreamReader.java:
  544)
  com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readO
   bject(AbstractSerializationStreamReader.java:
  61)
  com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader
  $ValueReader$8.readValue(ServerSerializationStreamReader.java:137)
  com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deseria
   lizeValue(ServerSerializationStreamReader.java:
  384)
  com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:296)
  com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServi
   ceServlet.java:
  186)
  com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServi
   ceServlet.java:
  224)
  com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(Abstract
   RemoteServiceServlet.java:
  62)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:
  709)javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  sun.reflect.GeneratedMethodAccessor274.invoke(Unknown
  Source)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
   ssorImpl.java:
  25)
  java.lang.reflect.Method.invoke(Method.java:
  592)org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:
  239)
  java.security.AccessController.doPrivileged(Native
  Method)javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
  org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:
  266)
  org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:
  157)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
   nFilterChain.java:
  231)
  org.apache.catalina.core.ApplicationFilterChain.access
  $000(ApplicationFilterChain.java:50)
  org.apache.catalina.core.ApplicationFilterChain
  $1.run(ApplicationFilterChain.java:140)
  java.security.AccessController.doPrivileged(Native Method)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
   hain.java:
  136)
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
   ava:
  214)
  org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
   xt.java:
  104)
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
  520)
  org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContex
   tValve.java:
  198)
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
   ava:
  152)
  

trying to open MySqlConn project sample file

2011-04-22 Thread gwtuser
Hello,

I have downloaded sample project MySqlConn.
I couldn't import it into eclipse through File-import-General-
Existing Projects..
Can any one help me

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



Re: trying to open MySqlConn project sample file

2011-04-22 Thread gwtuser
Just now i saw that it is .war filecan anyone tell me from where i
can download full project file.
I want to refer this, because i just want the same login for my
project.
want to access mysql data to gwt project.

thanks.

On Apr 22, 11:50 am, gwtuser acp...@gmail.com wrote:
 Hello,

 I have downloaded sample project MySqlConn.
 I couldn't import it into eclipse through File-import-General-
 Existing Projects..
 Can any one help me

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



Re: Loading thumbnails of images as links in gwt

2011-04-22 Thread Ben Imp
The Image class implements HasClickHandlers, so you can just tie into that 
and do whatever you need to do when your handler gets called.

-Ben

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



Re: Which widget to use

2011-04-22 Thread Ben Imp
These examples will probably be helpful.  As the other person mentioned in 
this thread, the Cell Widgets will probably be what you are looking for.

http://code.google.com/webtoolkit/examples/

-Ben

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



GWT UIBinder content assist lag

2011-04-22 Thread Wojciech O.
Hello,

whe using gwt-maven-plugin inside Eclipse or STS I am facing a major
lag when trying to content assist tag in UIBinder view. Take for
example the expenses sample app provided by gwt team available to
download from the repo. I created an issue related to this here

http://code.google.com/p/google-web-toolkit/issues/detail?id=6262sort=-idcolspec=ID%20Type%20Status%20Owner%20Milestone%20Summary%20Stars

please star if you are experiencing the same problem.
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Debugging Maven Project in Eclipse ( Tutorial )

2011-04-22 Thread Hilco Wijbenga
On 22 April 2011 00:33, Metronome  Basic
metronome.ba...@worldonline.fr wrote:
 Any suggestion for debugging in Eclipse

Use mvn gwt:debug (instead of mvn gwt:run) and attach your debugger in
Eclipse (use Remote Java Application).

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



Re: Nobody is using Struts1 with GWT successfully?

2011-04-22 Thread Jak
We have an existing Struts1.3 application with forms. I want to be
able to add some of the GWT component or gwt-ext on the existing
forms.
Is there any example or link online I can download? I'm still new to
GWT framework, but I like it better than YUI. Any help or guide would
be so much appreciated. Thanks!

On Apr 21, 10:34 am, SVR svr...@gmail.com wrote:
 It depends on what you want to do. We are using GWT with Struts2. Your GWT
 UI can be part/whole of a page (this could become the host page of your GWT
 app) generated by a Struts action and so on.

 On Thu, Apr 21, 2011 at 9:23 AM, Jak jaka...@gmail.com wrote:
  I've been search the entire internet about samples or tutorial on how
  to build GWT with Struts. It seems nobody has done it successfully. So
  the two frameworks combined is not a common practice. Can somebody
  help enlighten this topic? The only thing I've found is this plugin:
 http://code.google.com/p/struts2gwtplugin/
  The example/demo is a bit outdated.

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

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



Re: Nobody is using Struts1 with GWT successfully?

2011-04-22 Thread Jeff Larsen
give an element an id

div id=someid/


public class MyModule implements EntryPoint{


  public void onModuleLoad(){
   

 Label someLabel = new Label(test);

  RootPanel.get(someid).add(someLabel);
  }
}

you should see test in your page. I've never used struts, but I'd imagine 
you're able to set IDs on elements.

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



RE: GWT RPC - WebServiceClient

2011-04-22 Thread Armishev, Sergey
I did this GWT-RPC-WSDL integration and it works fine. Maybe not very
much efficient but it works and I made quicly what I needed. I used
wscompile to generate POJO java classes from WSDL. That are classes that
Web server user for web services communication. They are server side
classes. Then I copied server classes to client package and manually
editted generated POJO classes to be  GWT RPC compatible. Yes, it is
duplication and bad and I would like to have the same classes for both
sides but... don't have time to develop full solution  Then ,Cxf knows
nothing about GWT so even POJO classes has references on unsupported
Java classes such as Calendar (see below example). I manually editted
those file to be GWT RPC compatible. Not a big deal Then I add  
implements java.io.Serializable  implementation to class definition.
And then in run time translate server side classes to client and back.

Below is POJO file generated by cxf and corresponding class which is
GWT-RPC compatible. See Calendar class that is not supported.

 

Let me know if you need more help

-Sergey 

 

// This class was generated by the JAXRPC SI, do not edit.

// Contents subject to change without notice.

// JAX-RPC Standard Implementation (1.1.3, build R1)

// Generated source version: 1.1.3

 

package com.idirect.webnms.server.toolkit;

 

 

public class NmsErrorCondition extends
com.idirect.webnms.server.toolkit.NmsObject {

protected java.util.Calendar timeStamp;

protected com.idirect.webnms.client.toolkit.NmsErrorSeverity
errorSeverity;

protected java.lang.String errorMessage;



public NmsErrorCondition() {

}



public NmsErrorCondition(int objectType, boolean initialized,
java.util.Calendar timeStamp,
com.idirect.webnms.client.toolkit.NmsErrorSeverity errorSeverity,
java.lang.String errorMessage) {

this.objectType = objectType;

this.initialized = initialized;

this.timeStamp = timeStamp;

this.errorSeverity = errorSeverity;

this.errorMessage = errorMessage;

}



public java.util.Calendar getTimeStamp() {

return timeStamp;

}



public void setTimeStamp(java.util.Calendar timeStamp) {

this.timeStamp = timeStamp;

}



public com.idirect.webnms.client.toolkit.NmsErrorSeverity
getErrorSeverity() {

return errorSeverity;

}



public void
setErrorSeverity(com.idirect.webnms.client.toolkit.NmsErrorSeverity
errorSeverity) {

this.errorSeverity = errorSeverity;

}



public java.lang.String getErrorMessage() {

return errorMessage;

}



public void setErrorMessage(java.lang.String errorMessage) {

this.errorMessage = errorMessage;

}

}

 

And you translate it to

// This class was generated by the JAXRPC SI, do not edit.

// Contents subject to change without notice.

// JAX-RPC Standard Implementation (1.1.3, build R1)

// Generated source version: 1.1.3

 

package com.idirect.webnms.client.toolkit;

 

 

public class NmsErrorCondition extends
com.idirect.webnms.client.toolkit.NmsObject {

protected java.util.Date timeStamp;

protected com.idirect.webnms.client.toolkit.NmsErrorSeverity
errorSeverity;

protected java.lang.String errorMessage;

public NmsErrorCondition() {

}



public NmsErrorCondition(int objectType, boolean initialized,
java.util.Date timeStamp,
com.idirect.webnms.client.toolkit.NmsErrorSeverity errorSeverity,
java.lang.String errorMessage) {

this.objectType = objectType;

this.initialized = initialized;

this.timeStamp = timeStamp;

this.errorSeverity = errorSeverity;

this.errorMessage = errorMessage;

}



public java.util.Date getTimeStamp() {

return timeStamp;

}



public void setTimeStamp(java.util.Date timeStamp) {

this.timeStamp = timeStamp;

}



public com.idirect.webnms.client.toolkit.NmsErrorSeverity
getErrorSeverity() {

return errorSeverity;

}



public void
setErrorSeverity(com.idirect.webnms.client.toolkit.NmsErrorSeverity
errorSeverity) {

this.errorSeverity = errorSeverity;

}



public java.lang.String getErrorMessage() {

return errorMessage;

}



public void setErrorMessage(java.lang.String errorMessage) {

this.errorMessage = errorMessage;

}

 

}

 

And then you need  Calendar - Date translation

public static java.util.Date get(java.util.Calendar in)
{

return in.getTime();

}

 

public static java.util.Calendar get(java.util.Date in)
{

Calendar calendar =
java.util.Calendar.getInstance();

calendar.setTime(in);

return calendar;

}

 

From: google-web-toolkit@googlegroups.com

Re: Nobody is using Struts1 with GWT successfully?

2011-04-22 Thread Jak
Thanks for the code, but not sure what is your point here. This topic
is about how to integrate Struts1 with GWT.

On Apr 22, 4:23 pm, Jeff Larsen larse...@gmail.com wrote:
 give an element an id

 div id=someid/

 public class MyModule implements EntryPoint{

   public void onModuleLoad(){

      Label someLabel = new Label(test);

       RootPanel.get(someid).add(someLabel);
   }

 }

 you should see test in your page. I've never used struts, but I'd imagine
 you're able to set IDs on elements.

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



Re: Layout Panels missing from GWT Designer palette in Eclipse

2011-04-22 Thread Eric Clayberg
See...

http://code.google.com/intl/de/webtoolkit/doc/latest/DevGuideUiPanels.html#Standards

Those widgets only work in Standards mode, and GWT Designer will only
show them, if your project is configured for Standards mode. That is
the default for new projects, but probably not for your older project.

On Apr 22, 5:38 am, Christian crucke...@googlemail.com wrote:
 I have done some further testing. Using Eclipse under Windows the
 problem remains the same. But if I create a new project the missing
 panels are present in the designer, so it must depend on some settings
 of my existing project. Nevertheless it is not possible to export the
 palette from the one project and import it into the other.

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



JWebSocket using GWT

2011-04-22 Thread Guess What
Folks , I am  build a chat Server App in GWT .I came across
JWebSocket . (http://jwebsocket.org/)
This seems to be useful . But  I am not sure how to build using GWT .
Has anybody worked on this or can give me some example of how to wrap
the JWebScoket calls 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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Which widget to use

2011-04-22 Thread riyaz ahmed
Thank you sunit and Ben



On Sat, Apr 23, 2011 at 12:58 AM, Ben Imp benlee...@gmail.com wrote:

 These examples will probably be helpful.  As the other person mentioned in
 this thread, the Cell Widgets will probably be what you are looking for.

 http://code.google.com/webtoolkit/examples/

 -Ben

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




-- 
Riyaz
9916220381

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



Querying webservice which is on another server hosted on appengine

2011-04-22 Thread Riyaz
Hi,

I just used the stockwatcher example for querying webservice which
return JSON data , but i dont get the response , i get a status code
of 0
The webservice is hosted on an appengine and is online, when i access
the URL directly on the browser i am able to get the data on the
browser.
I am quite sure that the code used is correct because when i changed
someother URL which is hosts webservice i get the proper response.
Is there any setting that has to be done on the appengine that hosts
the webservie

I used the following code snippet from stockwatcher for querying


RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url);
try {

Request request = builder.sendRequest(null, new RequestCallback() {

@Override
public void onResponseReceived(Request request, Response 
response) {
// TODO Auto-generated method stub
  if (200 == response.getStatusCode()) {
  String resp = response.getText();
  System.out.println(Response +resp);
} else {
  displayError(Couldn't retrieve JSON ( +
response.getStatusText()
  + ) + Text +response.getStatusText());
}


}

@Override
public void onError(Request request, Throwable exception) {
// TODO Auto-generated method stub

displayError(OnError: Couldn't retrieve JSON);

}
});

 } catch (RequestException e) {
  displayError(Couldn't retrieve JSON);
}


Thanks in advance
Riyaz

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



[gwt-contrib] Session Management in the gwt-ext

2011-04-22 Thread Sanjay Jain
Hello All
I am working on the gwt-ext application.On the server side I am using
Hibernate.I am mantaining session on the server side.it's time out is
5 minute (In action class).
Now take a secenario in which a user logged in  remains it open for
five minute.After five minutes expires it do a click on a button on
the screen.There is some process on the client side  it is of 2
minutes and after that it goes for a server call.When it go for server
call it is already session out (as session time is 5 minutes which is
already expired).And a message of session out popped up with
redirecting the login page.
In this whole case user feels that I am active on the system so why I
am redirected to login page.
Reason behind is that that session is maintained on the server
side.And server hit is after seven minutes.
So I am thinking to maitain the session on the client side also.How to
achieve this in the gwt based application.
Is there any other way to do solve this issue.
Thanks to all.

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


[gwt-contrib] Re: Create a utility class for checking assignability of types for use (issue1420808)

2011-04-22 Thread t . broyer

I wrote it down yesterday evening, and the method is now gone, but
anyway:


http://gwt-code-reviews.appspot.com/1420808/diff/1/user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java
File user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java
(right):

http://gwt-code-reviews.appspot.com/1420808/diff/1/user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java#newcode60
user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java:60:
JType... argTypes) {
On 2011/04/22 01:13:17, rjrjr wrote:

I don't know that I would ever use this unless it was based on
JClassType.getOverridableMethods().


getOverridableMethods would miss final and static methods. You'd have to
use getInheritableMethods instead.

The question is what should be done about protected and default access
methods? In most cases in GWT generators, unless we're sure about the
package of the caller and callee classes (as is the case when the caller
is a class that's being generated: UiBinder, EditorDelegate and other
EditorContext), we don't bother checking if the method is accessible, we
simply filter out non-public methods (see PlaceHistoryMapperWithFactory
re. the factory's methods).



But rather than hardcoding that choice, perhaps you should make the

first

argument a JMethod[] to let me choose the set myself?


and/or provide both:
  hasCompatibleMethod(JClassType,boolean,methodName,JType...)
  containsCompatibleMethod(JMethod[],boolean,methodName,JType...)

the former simply delegating to the latter.

http://gwt-code-reviews.appspot.com/1420808/

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


[gwt-contrib] Re: MobileWebApp sample. Showcases GWT providing a single app providing specialized views for Deskto... (issue1427803)

2011-04-22 Thread jlabanca

Or CloudTasks.

@rchandia - please hold off on any big refactor until I get my changes
in.  I'll try to send them for review today.

http://gwt-code-reviews.appspot.com/1427803/

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


[gwt-contrib] Re: MobileWebApp sample. Showcases GWT providing a single app providing specialized views for Deskto... (issue1427803)

2011-04-22 Thread Rodrigo Chandia
No problem.

On Fri, Apr 22, 2011 at 8:20 AM, jlaba...@google.com wrote:

 Or CloudTasks.

 @rchandia - please hold off on any big refactor until I get my changes
 in.  I'll try to send them for review today.


 http://gwt-code-reviews.appspot.com/1427803/


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

[gwt-contrib] Re: Create a utility class for checking assignability of types for use (issue1420808)

2011-04-22 Thread John Tamplin
On Fri, Apr 22, 2011 at 3:45 AM, t.bro...@gmail.com wrote:

 I wrote it down yesterday evening, and the method is now gone, but
 anyway:



 http://gwt-code-reviews.appspot.com/1420808/diff/1/user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java
 File user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java
 (right):


 http://gwt-code-reviews.appspot.com/1420808/diff/1/user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java#newcode60
 user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java:60:
 JType... argTypes) {
 On 2011/04/22 01:13:17, rjrjr wrote:

 I don't know that I would ever use this unless it was based on
 JClassType.getOverridableMethods().


 getOverridableMethods would miss final and static methods. You'd have to
 use getInheritableMethods instead.

 The question is what should be done about protected and default access
 methods? In most cases in GWT generators, unless we're sure about the
 package of the caller and callee classes (as is the case when the caller
 is a class that's being generated: UiBinder, EditorDelegate and other
 EditorContext), we don't bother checking if the method is accessible, we
 simply filter out non-public methods (see PlaceHistoryMapperWithFactory
 re. the factory's methods).


Right, we discussed these things in chat and decided since we didn't have an
immediate need it was better to leave it out and then when we do have the
need for it, we will have a better idea about what API is useful.

But rather than hardcoding that choice, perhaps you should make the

 first

 argument a JMethod[] to let me choose the set myself?


 and/or provide both:
  hasCompatibleMethod(JClassType,boolean,methodName,JType...)
  containsCompatibleMethod(JMethod[],boolean,methodName,JType...)

 the former simply delegating to the latter.


Right, that is what i had but there was a question about whether it should
filter only public methods or include protected, and whether the API should
expose that choice, etc.

-- 
John A. Tamplin
Software Engineer (GWT), Google

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

[gwt-contrib] [google-web-toolkit] r10055 committed - Edited wiki page RequestFactoryMovingParts through web user interface.

2011-04-22 Thread codesite-noreply

Revision: 10055
Author:   b...@google.com
Date: Fri Apr 22 06:18:48 2011
Log:  Edited wiki page RequestFactoryMovingParts through web user  
interface.

http://code.google.com/p/google-web-toolkit/source/detail?r=10055

Modified:
 /wiki/RequestFactoryMovingParts.wiki

===
--- /wiki/RequestFactoryMovingParts.wikiWed Apr 20 11:46:29 2011
+++ /wiki/RequestFactoryMovingParts.wikiFri Apr 22 06:18:48 2011
@@ -27,7 +27,8 @@
 * All accumulated operations will be applied to the domain objects by  
traversing properties of the proxies.

 * All method invocations in the payload are executed.
 * The versions of entities referred to in the original payload are  
compared to the up-to-date versions of the entities after all work has been  
performed.
-  * Entities with updated properties are enqueued to be sent back to  
the client.
+  * Entities in the return payload graph (i.e. those reachable from  
the return values of an invocation) are returned to the client with a  
subset of properties controlled by the original `Request.with()`  
specification.
+  * Entities referred to solely in the invocation arguments graph are  
checked to see if their version properties have changed.  If so, an  
`UPDATE` message is sent to the client for each changed entity, but no  
property data is sent.  This allows ephemeral ids to updated in a  
chained-persist use pattern.
   * Entities that can be no longer retrieved after all work has been  
performed are reported as having been deleted.

   * The return payload is assembled and sent to the client.
 * The various `Receivers` attached to `Requests` or the  
`RequestContext` are invoked to report success, failure, or validation  
violations.

@@ -48,16 +49,18 @@

 === Entity ===

-An Entity is any object with a well-defined identity and version.   
Entities are mapped on the client as `EntityProxy` subtypes, while all  
other POJOS can be mapped as `ValueProxy` subtypes.
+An Entity is any object with a well-defined identity and version.   
Entities are mapped on the client as `EntityProxy` subtypes, while all  
other POJOS can be mapped as `ValueProxy` subtypes.  No assumption is made  
about the semantic meaning of the version property (no requirement to be  
`Comparable` or otherwise ordered), just that it is non-`equal()` to old  
version values.


 While entity domain objects need not extend any particular base type or  
interface, they must implement the following informal protocol:

-  * The domain type is default-instantiable
-  * `I getId()` must return a stable value
-  * `V getVersion()` must change every time the meaningful state of the  
domain object changes.  No assumption is made about the semantic meaning of  
the value, just that it is non-`equal()` to state version values.
+  * The domain type is default-instantiable if the client is allowed to  
use `RequestContext.create()` to arbitrarily create new instances.

+  * `I getId()` must return a stable value.
+  * `V getVersion()` must change every time the meaningful state of the  
domain object changes.
   * `static Entity findEntity(I id)` is used to retrieve a  
previously-referenced entity, using a value returned by `getId()`.  The  
`findEntity()` method may return `null` to indicate that the entity has  
been deleted or is otherwise unavailable. A specific naming scheme is used  
for this method: `find + Entity.class.getSimpleName()`.


 Domain types that cannot satisfy some or all of the requirements of the  
entity protocol may participate as entities by using a `Locator`.


+The id and version properties may return any type that can be transported  
by `RequestFactory`.  Objects with composite ids or versions may return a  
domain object, provided that there is an associated proxy for the domain  
type.  For example, if users wish to treat embedded objects as entities,  
the enclosing domain object can be used as the id.

+
 Entities can be transferred in a sparse manner, as any undefined  
properties can be later retrieved since the entity has a persistent id.  By  
default, reference properties are not transferred unless explicitly  
specified by a `Request.with()`predicate.


 === Values ===
@@ -113,7 +116,7 @@

 The  
[http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/server/RequestFactoryInterfaceValidator.java  
RequestFactoryInterfaceValidator] class compares the structures of the  
client-side interfaces with the method signatures of the domain objects.   
Starting from a RequestFactory interface, the validator examines each  
`RequestContext` and the various proxy types reachable from the contexts.   
The validator records the mappings between the client interfaces and the  
domain types and their optional locators as expressed in the `@Proxy` and  
`@Service` annotations.  The `ResolverServiceLayer` uses this accumulated  
data to find the proxy 

[gwt-contrib] Re: Add RequestContext.append() to allow actions across different domain service types to be combine... (issue1423805)

2011-04-22 Thread BobV
 Which to me leaves the question: is our usage described at [1] an
 intended use case, that's here to stay? or simply a fortunate
 unspecified behavior, and we should change our code to this new
 append() feature?

For now, I'm going to call it a fortunate unspecified behavior.  At
some point in the future when I can get time allocated to add robust
polymorphism support to RequestFactory, that behavior might go away if
it helps promote uniformity between proxy-entity and context-code
type hierarchy mappings.

-- 
Bob Vawter
Google Web Toolkit Team

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


[gwt-contrib] [google-web-toolkit] r10056 committed - Edited wiki page RequestFactoryMovingParts through web user interface.

2011-04-22 Thread codesite-noreply

Revision: 10056
Author:   b...@google.com
Date: Fri Apr 22 07:44:46 2011
Log:  Edited wiki page RequestFactoryMovingParts through web user  
interface.

http://code.google.com/p/google-web-toolkit/source/detail?r=10056

Modified:
 /wiki/RequestFactoryMovingParts.wiki

===
--- /wiki/RequestFactoryMovingParts.wikiFri Apr 22 06:18:48 2011
+++ /wiki/RequestFactoryMovingParts.wikiFri Apr 22 07:44:46 2011
@@ -73,7 +73,7 @@

 A proxy is a lightweight interface that exposes a subset of the property  
accessors of domain types to the RequestFactory client.  All  
developer-defined proxies must extend either 'EntityProxy'  
or 'ValueProxy'.  While the two proxy types extend a common `BaseProxy'  
type, this type exists solely to reduce API method count and is not  
directly usable by developers.


-Every proxy must be annotated with a `@ProxyFor` or `@ProxyForName`  
annotation to declare which domain type the proxy provides access to.  It  
is legal for multiple proxy types to be mapped to the same domain type.
+Every proxy must be annotated with a `@ProxyFor` or `@ProxyForName`  
annotation to declare which domain type the proxy provides access to.  It  
is legal for multiple proxy types to be mapped to the same domain type.   
The effects of `@ProxyFor` and `@ProxyForName` are equivalent, although the  
latter uses string values instead of class literals to support the  
compilation of clients without access to server classes.


 Proxies that map non-default-instantiable domain types can define a  
`Locator` in their `@ProxyFor` annotation.


@@ -110,7 +110,15 @@
 RequestReturnTypeProxy methodName(SomeParamProxy p0, int p1, String p2);
 }}}

-The bulk of the `RequestContext` implementation can be found in  
[http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java  
AbstractRequestContext].
+The bulk of the `RequestContext` implementation can be found in  
[http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java  
AbstractRequestContext].  Implementations of user-defined methods are  
provided by a generator or reflection-based proxy.  The generated subtypes  
of `AbstractRequestProxy` provide their own `AutoBeanFactory` interfaces  
which define only those proxy types that are reachable from the methods  
defined within the `RequestContext` interface in order to improve code  
pruning.

+
+The `ProxySerializer` provided by the `RequestFactory` is essentially a  
loopback version of `AbstractRequestContext` implemented in  
[http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/shared/impl/ProxySerializerImpl.java  
ProxySerializerImpl].

+
+== !RequestFactory ==
+
+The `RequestFactory` interface defines the top-level API used by  
developers.  Through the `RequestFactory` interface, the developer can  
obtain instances of `RequestContext` objects, serialize and restore id and  
proxy objects, and use the `find()` method to retrieve previously-accessed  
entities.

+
+Most of the `RequestFactory` API is implemented by  
[http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestFactory.java  
AbstractRequestFactory], with the user-defined methods added via  
code-generation or a reflection-based proxy.  The `AbstractRequestFactory`  
type send events to a user-provided `EventBus` and delegates payload  
handling to a optional `RequestTransport` type.  The factory also maintains  
a map of encoded id and version pairs to suppress redundant `UPDATE`  
messages.


 == !RequestFactoryinterfaceValidator ==

@@ -138,6 +146,19 @@

 The  
[http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/server/SimpleRequestProcessor.java  
SimpleRequestProcessor] is relatively stateless.  All transient state  
necessary for processing an individual request is contained in a  
`RequestState` object.


+== !StableId ==
+
+Every `EntityProxy` has a stable id object that can be accessed via  
`EntityProxy.stableId()` and is implemented via  
[http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/shared/impl/SimpleProxyId.java  
SimpleProxyId].  Most operations involving the lifecycle or encoding of id  
objects are contained in  
[http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/shared/impl/IdFactory.java  
IdFactory], which is a base type of `AbstractRequestFactory`, and  
[http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/shared/impl/IdUtil.java  
IdUtil].

+
+The `SimpleProxyId` may use one or more of the following 

[gwt-contrib] [google-web-toolkit] r10057 committed - Edited wiki page RequestFactoryMovingParts through web user interface.

2011-04-22 Thread codesite-noreply

Revision: 10057
Author:   b...@google.com
Date: Fri Apr 22 08:12:24 2011
Log:  Edited wiki page RequestFactoryMovingParts through web user  
interface.

http://code.google.com/p/google-web-toolkit/source/detail?r=10057

Modified:
 /wiki/RequestFactoryMovingParts.wiki

===
--- /wiki/RequestFactoryMovingParts.wikiFri Apr 22 07:44:46 2011
+++ /wiki/RequestFactoryMovingParts.wikiFri Apr 22 08:12:24 2011
@@ -132,10 +132,28 @@

 == !ServiceLayer ==

-The `ServiceLayer` mediates all interactions between the  
`SimpleRequestProcessor` and the domain.  RequestFactory's default  
behaviors may be overridden by providing one or more  
`ServiceLayerDecorator` instance to `ServiceLayer.create()`.  For instance,  
the `ServiceLayer.setProperty()` method can be used to provide access  
control for specific users.
+The  
[http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/server/ServiceLayer.java  
ServiceLayer] mediates all interactions between the  
`SimpleRequestProcessor` and the domain.  RequestFactory's default  
behaviors may be overridden by providing one or more  
`ServiceLayerDecorator` instance to `ServiceLayer.create()`.  For instance,  
the `ServiceLayer.setProperty()` method can be used to provide access  
control for specific users.


 Because the API expressed by `ServiceLayer` is intimately tied to the  
services required by the `SimpleRequestProcessor`, the API is subject to  
change over time.  Efforts will be made to keep `ServiceLayerDecorator`  
source-compatible, however this API should be treated as only semi-public.   
Developers who are advanced enough to take advantage of decorating the  
`ServiceLayer` will be able to adapt to changes as they come up.


+The default implementation of `ServiceLayer` is comprised of several  
`ServiceLayerDecorator` types that group implementation implementation  
details by overall function.

+
+Methods in the `ServiceLayer` API have a mostly-uniform naming scheme:
+  * `createFoo()` controls the instantiation of domain objects, `Locator`,  
`ServiceLocator`, and service objects.  Users of the dependency-injection  
pattern will typically override the create methods to use their framework  
of choice.
+  * `resolveFoo()` controls the mappings between client types and domain  
types.
+  * `getFoo()` retrieves various declared and synthetic properties and  
methods of domain objects.

+
+The `die()` and `report()` methods in `ServiceLayerDecorator` are both  
used to report fatal errors and abort request processing.  The difference  
between the two is that `report()` will send diagnostic information to the  
client whereas `die()` fails in a client-opaque way.  Typically, `report()`  
is used to send exceptions thrown by user-provided service methods, while  
`die()` is used for all other failures.

+
+The default stack:
+  *  
[http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/server/ServiceLayerCache.java  
ServiceLayerCache] is used to reduce the number of type-introspection calls.

+  * User-provided `ServiceLayerDecorators` are inserted here.
+  *  
[http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/server/LocatorServiceLayer.java  
LocatorServiceLayer] implements support for `Locator` and `ServiceLocator`  
types.
+  *  
[http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/server/ReflectiveServiceLayer.java  
ReflectiveServiceLayer] implements the majority of the domain-object  
manipulation code.
+  *  
[http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/server/ResolverServiceLayer.java  
ResolverServiceLayer] provides the client to domain type and method  
mappings.

+
+Implementors of `ServiceLayerDecorator` types should always use  
`getTop().serviceMethod()` when calling methods defined in the  
`ServiceLayer` API in order to allow those methods to be further  
overridden.  Implementations of `ServiceLayerDecorator` should be  
stateless, as the default `RequestFactoryServlet` does not create a new  
`ServiceLayer` for each request.  If a stateful `ServiceLayerDecorator` is  
written, the developer is responsible for ensuring the appropriate  
lifecycle is used by the caller to `SimpleRequestProcessor`.

+
 == !ServiceLocator ==

 A `ServiceLocator` is used to provide instance objects for non-static  
domain methods that are not defined on a domain object (where an  
`InstanceRequest` could be used instead).  Implementations of  
`ServiceLocators` are assumed to be default-instantiable, however this may  
be changed by providing alternate implementation of  
`ServiceLayer.createServiceLocator()`.


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


[gwt-contrib] Documentation review requested: RequestFactoryMovingParts

2011-04-22 Thread BobV
http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryMovingParts

The RFMP doc is targeted at potential contributors or those with
non-trivial integration schemes.  For those who have been using
RequestFactory, what implementation details would you like to have
more documentation on?


-- 
Bob Vawter
Google Web Toolkit Team

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


[gwt-contrib] Re: Create a utility class for checking assignability of types for use (issue1420808)

2011-04-22 Thread jat

http://gwt-code-reviews.appspot.com/1420808/

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


[gwt-contrib] Re: Create a utility class for checking assignability of types for use (issue1420808)

2011-04-22 Thread rjrjr

LGTM++

http://gwt-code-reviews.appspot.com/1420808/

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


[gwt-contrib] Re: MobileWebApp sample. Showcases GWT providing a single app providing specialized views for Deskto... (issue1427803)

2011-04-22 Thread Ray Ryan
I'm getting up to my elbows in there too, trying to narrow the exposure of
ClientFactory. John, are there particular spots I should avoid?

On Fri, Apr 22, 2011 at 5:27 AM, Rodrigo Chandia rchan...@google.comwrote:

 No problem.


 On Fri, Apr 22, 2011 at 8:20 AM, jlaba...@google.com wrote:

 Or CloudTasks.

 @rchandia - please hold off on any big refactor until I get my changes
 in.  I'll try to send them for review today.


 http://gwt-code-reviews.appspot.com/1427803/




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

[gwt-contrib] Re: MobileWebApp sample. Showcases GWT providing a single app providing specialized views for Deskto... (issue1427803)

2011-04-22 Thread Rodrigo Chandia
+1 on CloudTasks, I'll defer the CL 'til John finishes so that the merge
onus is on me.

On Fri, Apr 22, 2011 at 12:03 PM, Ray Ryan rj...@google.com wrote:

 I'm getting up to my elbows in there too, trying to narrow the exposure of
 ClientFactory. John, are there particular spots I should avoid?


 On Fri, Apr 22, 2011 at 5:27 AM, Rodrigo Chandia rchan...@google.comwrote:

 No problem.


 On Fri, Apr 22, 2011 at 8:20 AM, jlaba...@google.com wrote:

 Or CloudTasks.

 @rchandia - please hold off on any big refactor until I get my changes
 in.  I'll try to send them for review today.


 http://gwt-code-reviews.appspot.com/1427803/





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

[gwt-contrib] [google-web-toolkit] r10058 committed - Create a utility class for checking assignability of types for use...

2011-04-22 Thread codesite-noreply

Revision: 10058
Author:   j...@google.com
Date: Fri Apr 22 09:21:14 2011
Log:  Create a utility class for checking assignability of types for use
in finding compatible constructors/methods.

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

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

Added:
 /trunk/user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java
 /trunk/user/test/com/google/gwt/uibinder/rebind/TypeOracleUtilsTest.java
Modified:
 /trunk/user/src/com/google/gwt/uibinder/elementparsers/DateLabelParser.java
 /trunk/user/test/com/google/gwt/uibinder/UiBinderJreSuite.java

===
--- /dev/null
+++ /trunk/user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java	Fri  
Apr 22 09:21:14 2011

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

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

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under

+ * the License.
+ */
+package com.google.gwt.uibinder.rebind;
+
+import com.google.gwt.core.ext.typeinfo.JArrayType;
+import com.google.gwt.core.ext.typeinfo.JClassType;
+import com.google.gwt.core.ext.typeinfo.JConstructor;
+import com.google.gwt.core.ext.typeinfo.JPrimitiveType;
+import com.google.gwt.core.ext.typeinfo.JType;
+
+/**
+ * Utilities for functionality that really should be part of TypeOracle.
+ */
+public class TypeOracleUtils {
+
+  /**
+   * Check for a constructor which is compatible with the supplied argument
+   * types.
+   *
+   * @param type
+   * @param argTypes
+   * @return true if a constructor compatible with the supplied arguments  
exists

+   */
+  public static boolean hasCompatibleConstructor(JClassType type, JType...  
argTypes) {

+// Note that this does not return the constructor, since that is a more
+// complicated decision about finding the best matching arguments where
+// more than one are compatible.
+for (JConstructor ctor : type.getConstructors()) {
+  if (typesAreCompatible(ctor.getParameterTypes(), argTypes,  
ctor.isVarArgs())) {

+return true;
+  }
+}
+return false;
+  }
+
+  /**
+   * Return true if the supplied argument type is assignment compatible  
with a

+   * declared parameter type.
+   *
+   * @param paramType
+   * @param argType
+   * @return true if the argument type is compatible with the parameter  
type

+   */
+  public static boolean typeIsCompatible(JType paramType, JType argType) {
+if (paramType == argType) {
+  return true;
+}
+JClassType paramClass = paramType.isClassOrInterface();
+if (paramClass != null) {
+  JClassType argClass = argType.isClassOrInterface();
+  return argClass != null  paramClass.isAssignableFrom(argClass);
+}
+JArrayType paramArray = paramType.isArray();
+if (paramArray != null) {
+  JArrayType argArray = argType.isArray();
+  return argArray != null   
typeIsCompatible(paramArray.getComponentType(),

+  argArray.getComponentType());
+}
+if (paramType instanceof JPrimitiveType  argType instanceof  
JPrimitiveType) {
+  return isWideningPrimitiveConversion((JPrimitiveType) paramType,  
(JPrimitiveType) argType);

+}
+// TODO: handle autoboxing?
+return false;
+  }
+
+  /**
+   * Check if the types of supplied arguments are compatible with the  
parameter

+   * types of a method.
+   *
+   * @param paramTypes
+   * @param argTypes
+   * @param varArgs true if the method is a varargs method
+   * @return true if all argument types are compatible with the parameter  
types

+   */
+  public static boolean typesAreCompatible(JType[] paramTypes, JType[]  
argTypes, boolean varArgs) {

+int expectedArgs = paramTypes.length;
+int actualArgs = argTypes.length;
+int comparedArgs = expectedArgs;
+if (varArgs) {
+  comparedArgs--;
+  if (actualArgs != expectedArgs | 
| !typeIsCompatible(paramTypes[comparedArgs], argTypes[comparedArgs])) {

+if (actualArgs  comparedArgs) {
+  return false;
+}
+JArrayType varargsArrayType = paramTypes[comparedArgs].isArray();
+assert varargsArrayType != null;
+JType varargsType = varargsArrayType.getComponentType();
+for (int i = comparedArgs; i  actualArgs; ++i) {
+  if (!typeIsCompatible(varargsType, argTypes[i])) {
+return false;
+  }
+}
+  }
+} else if (actualArgs != expectedArgs) {
+  return false;
+}
+for (int i = 0; i  comparedArgs; ++i) {
+  

[gwt-contrib] Re: Create a utility class for checking assignability of types for use (issue1420808)

2011-04-22 Thread jat

Committed at r10058


http://gwt-code-reviews.appspot.com/1420808/

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


[gwt-contrib] Re: Introducing CustomScrollPanel, a subclass of ScrollPanel that lets users define their own scroll... (issue1427804)

2011-04-22 Thread rchandia

LGTM. with nit


http://gwt-code-reviews.appspot.com/1427804/diff/1/user/test/com/google/gwt/user/client/ui/CustomScrollPanelTest.java
File user/test/com/google/gwt/user/client/ui/CustomScrollPanelTest.java
(right):

http://gwt-code-reviews.appspot.com/1427804/diff/1/user/test/com/google/gwt/user/client/ui/CustomScrollPanelTest.java#newcode27
user/test/com/google/gwt/user/client/ui/CustomScrollPanelTest.java:27:
public class CustomScrollPanelTest extends ScrollPanelTest {
There is no test for the handling of horizontal and vertical scrollbars
present at the same time (i.e. the corner gap).

http://gwt-code-reviews.appspot.com/1427804/

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


[gwt-contrib] Re: Create a utility class for checking assignability of types for use (issue1420808)

2011-04-22 Thread t . broyer

Sorry, I'm a bit late...


http://gwt-code-reviews.appspot.com/1420808/diff/6004/user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java
File user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java
(right):

http://gwt-code-reviews.appspot.com/1420808/diff/6004/user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java#newcode72
user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java:72: if
(paramType instanceof JPrimitiveType  argType instanceof
JPrimitiveType) {
Shouldn't it rather be paramType.isPrimitive() != null?

http://gwt-code-reviews.appspot.com/1420808/

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


[gwt-contrib] [google-web-toolkit] r10060 committed - First step of isolating a bunch of code that is used for generating...

2011-04-22 Thread codesite-noreply

Revision: 10060
Author:   j...@google.com
Date: Fri Apr 22 13:21:48 2011
Log:  First step of isolating a bunch of code that is used for  
generating

code, both within a GWT generator or as a separate build step for
building server-side implementations.

Also, this improves StringGenerator to produce String-valued
expressions like those before SafeHtml was added.

Public review at http://gwt-code-reviews.appspot.com/1422807

http://code.google.com/p/google-web-toolkit/source/detail?r=10060

Added:
 /trunk/user/src/com/google/gwt/codegen
 /trunk/user/src/com/google/gwt/codegen/rebind
 /trunk/user/src/com/google/gwt/codegen/rebind/package-info.java
 /trunk/user/src/com/google/gwt/codegen/server
 /trunk/user/src/com/google/gwt/codegen/server/PlainStringGenerator.java
 /trunk/user/src/com/google/gwt/codegen/server/SafeHtmlStringGenerator.java
 /trunk/user/src/com/google/gwt/codegen/server/StringGenerator.java
 /trunk/user/src/com/google/gwt/codegen/server/package-info.java
 /trunk/user/test/com/google/gwt/codegen
 /trunk/user/test/com/google/gwt/codegen/CodeGenSuite.java
 /trunk/user/test/com/google/gwt/codegen/server
 /trunk/user/test/com/google/gwt/codegen/server/StringGeneratorTest.java
Deleted:
 /trunk/user/src/com/google/gwt/i18n/rebind/StringGenerator.java
Modified:
  
/trunk/tools/cldr-import/src/com/google/gwt/tools/cldr/DateTimeFormatInfoProcessor.java

 /trunk/user/src/com/google/gwt/i18n/rebind/MessagesMethodCreator.java

===
--- /dev/null
+++ /trunk/user/src/com/google/gwt/codegen/rebind/package-info.java	Fri Apr  
22 13:21:48 2011

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

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

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under

+ * the License.
+ */
+
+/**
+ * Classes used by code generation, specific to GWT generators.
+ */
+@com.google.gwt.util.PreventSpuriousRebuilds
+package com.google.gwt.codegen.rebind;
===
--- /dev/null
+++ /trunk/user/src/com/google/gwt/codegen/server/PlainStringGenerator.java	 
Fri Apr 22 13:21:48 2011

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

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

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under

+ * the License.
+ */
+package com.google.gwt.codegen.server;
+
+/**
+ * Helper class to produce string expressions consisting of literals and
+ * computed values.
+ */
+class PlainStringGenerator extends StringGenerator {
+
+  private boolean firstExpression = true;
+
+  /**
+   * Initialize the StringGenerator with an output buffer.
+   *
+   * @param buf output buffer
+   */
+  PlainStringGenerator(StringBuilder buf) {
+super(buf);
+  }
+
+  @Override
+  protected void afterExpression(Type type) {
+firstExpression = false;
+  }
+
+  @Override
+  protected void beforeExpression(Type type) {
+if (firstExpression) {
+  if (type == Type.PRIMITIVE) {
+buf.append(\\ + );
+  }
+} else {
+  buf.append( + );
+}
+  }
+
+  @Override
+  protected void finishOutput() {
+if (firstExpression) {
+  buf.append(\\);
+}
+  }
+
+  @Override
+  protected void forceStringPrefix() {
+if (firstExpression) {
+  buf.append(\\ + );
+}
+  }
+
+  @Override
+  protected void forceStringSuffix() {
+  }
+}
===
--- /dev/null
+++  
/trunk/user/src/com/google/gwt/codegen/server/SafeHtmlStringGenerator.java	 
Fri Apr 22 13:21:48 2011

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

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

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under


[gwt-contrib] Fix cast normalizer to properly deal with multidimensional JSO arrays. (issue1428803)

2011-04-22 Thread cromwellian

Reviewers: scottb,

Description:
Fix cast normalizer to properly deal with multidimensional JSO arrays.


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

Affected files:
  M dev/core/src/com/google/gwt/dev/jjs/impl/CastNormalizer.java
  M user/test/com/google/gwt/dev/jjs/test/JsoTest.java


Index: dev/core/src/com/google/gwt/dev/jjs/impl/CastNormalizer.java
===
--- dev/core/src/com/google/gwt/dev/jjs/impl/CastNormalizer.java	(revision  
10059)
+++ dev/core/src/com/google/gwt/dev/jjs/impl/CastNormalizer.java	(working  
copy)

@@ -196,9 +196,16 @@
   if (type instanceof JArrayType  qType instanceof JArrayType) {
 JArrayType aType = (JArrayType) type;
 JArrayType aqType = (JArrayType) qType;
-return program.typeOracle.canTriviallyCast(type, qType)
-|| (program.isJavaScriptObject(aType.getLeafType())  program
-.isJavaScriptObject(aqType.getLeafType()));
+JType eType = aType.getElementType();
+JType eqType = aqType.getElementType();
+// recursively check element types that are not primitives
+if (eType instanceof JReferenceType  eqType instanceof  
JReferenceType) {

+  return canTriviallyCastJsoSemantics((JReferenceType) eType,
+  (JReferenceType) eqType);
+} else {
+  // else primitive type
+  return program.typeOracle.canTriviallyCast(eType, eqType);
+}
   }

   return program.typeOracle.canTriviallyCast(type, qType)
Index: user/test/com/google/gwt/dev/jjs/test/JsoTest.java
===
--- user/test/com/google/gwt/dev/jjs/test/JsoTest.java  (revision 10059)
+++ user/test/com/google/gwt/dev/jjs/test/JsoTest.java  (working copy)
@@ -379,7 +379,9 @@
   @SuppressWarnings(cast)
   public void testCastsArray() {
 JavaScriptObject[][] jso = new JavaScriptObject[0][0];
+Object x = jso;
 assertTrue(jso instanceof JavaScriptObject[][]);
+assertFalse(x instanceof JavaScriptObject[][][]);
 assertTrue(jso instanceof Foo[][]);
 assertTrue(jso instanceof Bar[][]);



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


[gwt-contrib] LazyPanel parser should be enabled only if useLazyWidgetBuilders is (issue1423806)

2011-04-22 Thread hermes

Reviewers: rjrjr, jat,

Description:
LazyPanel parser should be enabled only if useLazyWidgetBuilders is
enabled.


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

Affected files:
  M user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java


Index: user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
===
--- user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java	(revision  
10054)
+++ user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java	(working  
copy)

@@ -1144,7 +1144,9 @@
 addWidgetParser(HasAlignment);
 addWidgetParser(DateLabel);
 addWidgetParser(NumberLabel);
-addWidgetParser(LazyPanel);
+if (useLazyWidgetBuilders) {
+  addWidgetParser(LazyPanel);
+}
   }

   /**


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


[gwt-contrib] Re: Create a utility class for checking assignability of types for use (issue1420808)

2011-04-22 Thread jat


http://gwt-code-reviews.appspot.com/1420808/diff/6004/user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java
File user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java
(right):

http://gwt-code-reviews.appspot.com/1420808/diff/6004/user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java#newcode72
user/src/com/google/gwt/uibinder/rebind/TypeOracleUtils.java:72: if
(paramType instanceof JPrimitiveType  argType instanceof
JPrimitiveType) {
On 2011/04/22 20:28:54, tbroyer wrote:

Shouldn't it rather be paramType.isPrimitive() != null?


Since JPrimitiveType is an enum, you can't really have isPrimitive
return anything else, but yes it probably should just to be consistent
with the other is* methods.

http://gwt-code-reviews.appspot.com/1420808/

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


[gwt-contrib] [google-web-toolkit] r10062 committed - LazyPanel parser should be enabled only if useLazyWidgetBuilders is...

2011-04-22 Thread codesite-noreply

Revision: 10062
Author:   her...@google.com
Date: Fri Apr 22 14:55:03 2011
Log:  LazyPanel parser should be enabled only if useLazyWidgetBuilders  
is

enabled.

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

http://code.google.com/p/google-web-toolkit/source/detail?r=10062

Modified:
 /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java

===
--- /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java	Fri  
Apr 22 11:18:50 2011
+++ /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java	Fri  
Apr 22 14:55:03 2011

@@ -1144,7 +1144,9 @@
 addWidgetParser(HasAlignment);
 addWidgetParser(DateLabel);
 addWidgetParser(NumberLabel);
-addWidgetParser(LazyPanel);
+if (useLazyWidgetBuilders) {
+  addWidgetParser(LazyPanel);
+}
   }

   /**

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


[gwt-contrib] [google-web-toolkit] r10063 committed - Somehow this file didn't committed with the rest.

2011-04-22 Thread codesite-noreply

Revision: 10063
Author:   j...@google.com
Date: Fri Apr 22 15:15:13 2011
Log:  Somehow this file didn't committed with the rest.

http://code.google.com/p/google-web-toolkit/source/detail?r=10063

Modified:
 /trunk/user/test/com/google/gwt/i18n/shared/DateTimeFormatTestBase.java

===
--- /trunk/user/test/com/google/gwt/i18n/shared/DateTimeFormatTestBase.java	 
Fri Apr 22 14:49:48 2011
+++ /trunk/user/test/com/google/gwt/i18n/shared/DateTimeFormatTestBase.java	 
Fri Apr 22 15:15:13 2011

@@ -13,9 +13,10 @@
  * License for the specific language governing permissions and limitations  
under

  * the License.
  */
-package com.google.gwt.i18n.client;
-
-import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
+package com.google.gwt.i18n.shared;
+
+import com.google.gwt.i18n.client.Messages;
+import com.google.gwt.i18n.shared.DateTimeFormat.PredefinedFormat;
 import com.google.gwt.junit.client.GWTTestCase;

 import java.util.Date;
@@ -28,7 +29,7 @@
   /**
* The timezone used by any tests which use a fixed timezone.
*/
-  protected static final TimeZone TEST_TIMEZONE =  
TimeZone.createTimeZone(300);
+  protected static final TimeZone TEST_TIMEZONE =  
com.google.gwt.i18n.client.TimeZone.createTimeZone(300);


   /**
* Class for getting customized date/time formats.

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