gwt.user.server.rpc.RemoteServiceServlet.getThreadLocalRequest() returns null

2009-06-21 Thread kleinerroemer

Hi guys!

I've written a Servlet class looking like:

public class AccountServiceImpl extends RemoteServiceServlet
implements AccountService {


public void login(String email, String pwd) throws WrongLoginException
{
Account ac = accountdao.Login(email, pwd);
if( ac == null )
throw new WrongLoginException();
MySession.setAccount( getThreadLocalRequest(), ac);
}
}

In my session I simply do:

public static void setAccount( HttpServletRequest request, Account a )
{
request.getSession().setAttribute( "userid", a.getId() );
request.getSession().setAttribute( "isadmin", a.isAdmin() );
}


As my post says, getThreadLocalRequest always return null...

Has anybody got some ideas, because all related problems I found,
point out to a solution that looks like my code...

thanks in advance..

greets
--~--~-~--~~~---~--~~
You received 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: MenuBar & MenuBarImages

2009-06-21 Thread Cuetumayu

Ok, it looks really promising. Thank you very much!

Carlos

On Jun 19, 11:07 am, abhiram wuntakal  wrote:
> Do you want to try SmartGWT? it has many advanced widgets.
>
> U can have a look at the SmartGWT showcase 
> herehttp://www.smartclient.com/smartgwt/showcase/
>
> This should help
>
> Regards,
> Abhiram
>
> On Fri, Jun 19, 2009 at 12:53 PM, Cuetumayu  wrote:
>
> > Hello,
>
> > I am new comer to GWT so I would really appreciate some help from you.
> > I already have a MenuBar working but using just plain text for
> > identifying the menu options. Since this doesn't look too fancy, I
> > would like now to replace this texts by some images. I had a look to
> > the MenuBar.MenuBarImages interface but I don't really understand how
> > to proceed to associate a menu option with a certain image.
>
> > Can anybody paste me here an example?
>
> > Thank you very much in advance!
>
> > Carlos
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



No setTarget in FormPanel?

2009-06-21 Thread Blessed Geek

I am feeling intrigued why FormPanel
- has a getTarget method
- but not setTarget method

???!!!

Is this deficit due to another programming-style-paternalism or simply
an overlooked absent feature due to be rectified in a later released
later? Why can't I be allowed to change the target in the midst of the
game, or am I compelled to declare my handicap before teeing off?

How do I set target of a Form?
Should I attempt the convoluted route of squeezing its FormElement out
of a FormPanel?
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



did you forget to inherit a required module

2009-06-21 Thread bhanu

Hi,

I am creating a small application. In my application I have created
LoginScreen, and some other screen also. when the user login, it is
forwarded to other screen. My loginscreen
is in web.client.LoginScreen.java.This is the main class. In my
application I am using Controller and Model. So far it is working
fine. That means I could validate from the database,I could write into
database,etc.  Now the problem is I create one QueryHelper.java
in web.client.query package. So whenever the I tried to Call
QueryHelper in LoginScreen
it is showing error saying "did you forget to inherit a required
module?". But like that some other classes I have already made in
other packages and when I call that files it is working fine.  LIke
LoginController,LoginModel,etc. No problem.But when I create a new
QueryHelper it is showing error. I changed the package of queryhelper
and put into client folder. still this error is showing. This problem
happened suddenly. I tried many times. I couldnot figure out.

Please help me.

Thanks
bhanu lakshmi.
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



FireFox On Mac Hosted mode

2009-06-21 Thread Yousef.Ghandour

Hosted mode on Mac OS uses safari internally, can i change that to
FireFox.
--~--~-~--~~~---~--~~
You received 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: did you forget to inherit a required module

2009-06-21 Thread Blessed Geek

Hey bhanu, yours is the classic repeated question.

You created a new entry point by copying an existing entry point to
another folder?
But you did not copy the entry point's module inheritance definition,
right?

GWT works this way.
Say you have an Entry point module, examples.fish.Salmon
you would need a module definition file Salmon.gwt.xml
located at
{source dir}/examples/fish.

The gwt files for module Salmon would be found under {source dir}/
examples/fish/client.
The files that get generated into the web deployment folder will be
found under {source dir}/examples/fish/public.

Let's say you have an entry point login.java under
{source dir}/examples/fish/client/Login.java,
which requires to use a library module
mygwt/libs/Fishing

Then Salmon.gwt.xml should declare the entry point as
examples.fish.client.Login
and declare that it inherits
mygwt.libs.Fishing module.
All modules must also inherit the basic module
com.google.gwt.user.User.



 
 
 



Now if you copied examples/fish/client/Login.java
to examples/mammals/client/Login.java

You need to reconstruct your module file and rename it say,
examples/mammals/Elephant.gwt.xml, with the entry point changed:


 
 
 


You should use the eclipse plugin. But if you did, eclipse would not
inform you of any missing inheritance until you do a gwt-compile by
clicking on the little red gwt icon on the menu bar.

You cannot simply copy files around a gwt hierarchy by only renaming
their package namespace. You have to ensure that the gwt module files
are properly defined and the integrity of the inheritance hierarchy.
Otherwise, the oft familiar message would appear "did you forget to
inherit a required module?".

I think you should read up on the GWT intro or at least
http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html
.

~ good luck!

--~--~-~--~~~---~--~~
You received 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: did you forget to inherit a required module

2009-06-21 Thread bhanu

Hi thanks for the reply.  This is not repeated question sir. My
problem is I created a package web.client.db.QueryHelper.

IN that file I have written some queries which I need to get it from
the database and show in the combo box.
So what Ihave found the problem is I created QueryHelper.java and got
the results from database directly rather than using
RPC. So I got the error that "did you forget to inherit a required
module?". so that problm Now I am not getting. when I am creating some
some utilitiy classes, which I call in the front end side, I am
getting that error. How can I solve that issue?

thanks
bhanu

On Jun 21, 5:38 pm, Blessed Geek  wrote:
> Hey bhanu, yours is the classic repeated question.
>
> You created a new entry point by copying an existing entry point to
> another folder?
> But you did not copy the entry point's module inheritance definition,
> right?
>
> GWT works this way.
> Say you have an Entry point module, examples.fish.Salmon
> you would need a module definition file Salmon.gwt.xml
> located at
> {source dir}/examples/fish.
>
> The gwt files for module Salmon would be found under {source dir}/
> examples/fish/client.
> The files that get generated into the web deployment folder will be
> found under {source dir}/examples/fish/public.
>
> Let's say you have an entry point login.java under
> {source dir}/examples/fish/client/Login.java,
> which requires to use a library module
> mygwt/libs/Fishing
>
> Then Salmon.gwt.xml should declare the entry point as
> examples.fish.client.Login
> and declare that it inherits
> mygwt.libs.Fishing module.
> All modules must also inherit the basic module
> com.google.gwt.user.User.
>
> 
>  
>  
>  
> 
>
> Now if you copied examples/fish/client/Login.java
> to examples/mammals/client/Login.java
>
> You need to reconstruct your module file and rename it say,
> examples/mammals/Elephant.gwt.xml, with the entry point changed:
>
> 
>  
>  
>  
> 
>
> You should use the eclipse plugin. But if you did, eclipse would not
> inform you of any missing inheritance until you do a gwt-compile by
> clicking on the little red gwt icon on the menu bar.
>
> You cannot simply copy files around a gwt hierarchy by only renaming
> their package namespace. You have to ensure that the gwt module files
> are properly defined and the integrity of the inheritance hierarchy.
> Otherwise, the oft familiar message would appear "did you forget to
> inherit a required module?".
>
> I think you should read up on the GWT intro or at 
> leasthttp://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects
> .
>
> ~ good luck!
--~--~-~--~~~---~--~~
You received 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: did you forget to inherit a required module

2009-06-21 Thread Ian Bambury
You cannot make database queries from the client without using RPC or
RequestBuilder.

Ian

http://examples.roughian.com


2009/6/21 bhanu 

>
> Hi thanks for the reply.  This is not repeated question sir. My
> problem is I created a package web.client.db.QueryHelper.
>
> IN that file I have written some queries which I need to get it from
> the database and show in the combo box.
> So what Ihave found the problem is I created QueryHelper.java and got
> the results from database directly rather than using
> RPC. So I got the error that "did you forget to inherit a required
> module?". so that problm Now I am not getting. when I am creating some
> some utilitiy classes, which I call in the front end side, I am
> getting that error. How can I solve that issue?
>
> thanks
> bhanu
>
> On Jun 21, 5:38 pm, Blessed Geek  wrote:
> > Hey bhanu, yours is the classic repeated question.
> >
> > You created a new entry point by copying an existing entry point to
> > another folder?
> > But you did not copy the entry point's module inheritance definition,
> > right?
> >
> > GWT works this way.
> > Say you have an Entry point module, examples.fish.Salmon
> > you would need a module definition file Salmon.gwt.xml
> > located at
> > {source dir}/examples/fish.
> >
> > The gwt files for module Salmon would be found under {source dir}/
> > examples/fish/client.
> > The files that get generated into the web deployment folder will be
> > found under {source dir}/examples/fish/public.
> >
> > Let's say you have an entry point login.java under
> > {source dir}/examples/fish/client/Login.java,
> > which requires to use a library module
> > mygwt/libs/Fishing
> >
> > Then Salmon.gwt.xml should declare the entry point as
> > examples.fish.client.Login
> > and declare that it inherits
> > mygwt.libs.Fishing module.
> > All modules must also inherit the basic module
> > com.google.gwt.user.User.
> >
> > 
> >  
> >  
> >  
> > 
> >
> > Now if you copied examples/fish/client/Login.java
> > to examples/mammals/client/Login.java
> >
> > You need to reconstruct your module file and rename it say,
> > examples/mammals/Elephant.gwt.xml, with the entry point changed:
> >
> > 
> >  
> >  
> >  
> > 
> >
> > You should use the eclipse plugin. But if you did, eclipse would not
> > inform you of any missing inheritance until you do a gwt-compile by
> > clicking on the little red gwt icon on the menu bar.
> >
> > You cannot simply copy files around a gwt hierarchy by only renaming
> > their package namespace. You have to ensure that the gwt module files
> > are properly defined and the integrity of the inheritance hierarchy.
> > Otherwise, the oft familiar message would appear "did you forget to
> > inherit a required module?".
> >
> > I think you should read up on the GWT intro or at leasthttp://
> code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects
> > .
> >
> > ~ good luck!
> >
>

--~--~-~--~~~---~--~~
You received 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: Including my own GWT project

2009-06-21 Thread Ravi

Any help ?? :(

On Jun 20, 6:15 pm, ping2ravi  wrote:
> Hi All,
> I created one GWT(GWTCommon) project to include in another GWT project
> (MyViewer)
>
> my package struture of GWTCommon  is as follow
>
> com/next/common/GWTCommon.gwt.xml
> com/next/common/client/GWTCommon.java
> com/next/common/client/callback/DefaultAsyncCallback.java
> ...and ome more files.packages in  com/next/common/client/
>
> Package structure of MyViewer project is as follows
> com/next/viewer/MyViewer.gwt.xml
> com/next/viewer/client/MyViewer.java
> com/next/viewer/client/Somemorefiles.java
>
> content of  com/next/viewer/MyViewer.gwt.xml is
>
> 
>  EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro-
> source/core/src/gwt-module.dtd">
> 
>   
>   
>
>   
>   
> 
>
> Everything looks ok, but when i run it, i get following exception
>
> [ERROR] Line 45: No source code is available for type
> com.next.common.client.callback.DefaultAsyncCallback; did you
> forget to inherit a required module?
>
> I am inheriting this module as well as the jar file of GWTCommon
> project is in classpath.
>
> Can you see, what i am doing wrong here.
> please help.
>
> I am using Latest Google Eclipse plugin for GWT/GAE and GWT 1.6
>
> Ravi
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-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: maps-api Directions color

2009-06-21 Thread Enea

yes, it worked!
I had not looked in the deep the DirectionsCallBack and
DirectionResult api .
This is my solution:

DirectionsCallback callback=new DirectionsCallback(){
@Override
public void onFailure(int statusCode) {
Window.alert(""+statusCode);
}
@Override
public void onSuccess(DirectionResults result) {
Polyline poly=result.getPolyline();
PolyStyleOptions options=PolyStyleOptions.getInstance();
options.setColor("00D600");
poly.setStrokeStyle(options);
}

};

Directions.load("from: lugano to: zurich",new DirectionQueryOptions
(map),callback);


-




Thank you Eric.



On 21 Giu, 04:25, Eric Ayers  wrote:
> Ok.  It is more work to set it up and add the items to the map, but if you
> look at the DirectionsResult object and the corresponding classes to create
> a directions query, you'll see that there is an option to return the
> polyline object.  You can set the style on that object to change its color
> and then manually add it to the map.
>
>
>
> On Fri, Jun 19, 2009 at 1:55 PM, Enea  wrote:
>
> > Hi Eric,
> > thank you for your answare.
>
> > I 've tried what you tell me, but setting a style to a
> > DirectionsPanel ,only affects the Panel where the textual directions
> > are listed.
>
> > My purpose was another:
> > change the color of the tour on the map.
> > The default color is purple:
>
> > for example:
>
> >http://maps.google.com/maps?f=q&source=s_q&hl=it&geocode=&q=da+giubia...
>
> > if you open this map, you see that the color of the street to do, is
> > purple...
> > It's possible to change this color?
>
> > On 19 Giu, 13:33, Eric Ayers  wrote:
> > > I think you could do this with CSS.  Put a style on your DirectionsPanel
> > with
>
> > > directionsPanel1.setStyleName("directions1");
> > > directionsPanel2.setStyleName("directions2");
>
> > > .css file:
>
> > > .directions1 {
> > >   background-color: #eee;}
>
> > > .directions2 {
> > >   background-color: #fee;
>
> > > }
>
> > > Or, if you wanted to affect some elements specifically in a different
> > > way, you could use CSS descendent selectors:
>
> > > .directions1 td {
> > >   color: red;
>
> > > }
>
> > > .directions2 td {
> > >   color: green;
>
> > > }
>
> > > Look at the DOM using firebug or another tool to see which elements
> > > and classnames are are defined inside the Directions Panel.
>
> > > -Eric
>
> > > On Thu, Jun 18, 2009 at 7:03 PM, Enea wrote:
>
> > > > hi,
> > > > This is my first post here... :)
> > > > My question is if there is a way to change the color of Directions
> > > > shown on a Map with the gwt-maps api.
> > > > I have searched in the api but not found...
> > > > my problem is that i have to display more than one "tour", and it
> > > > would be nice to show these tours in different colors.
>
> > > > Thanks in advance :)
>
> > > > ---gwt|rocks---
>
> > > --
> > > Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://
> > code.google.com/webtoolkit/
>
> --
> Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://code.google.com/webtoolkit/
--~--~-~--~~~---~--~~
You received 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: No setTarget in FormPanel?

2009-06-21 Thread Thomas Broyer


On 21 juin, 13:41, Blessed Geek  wrote:
> I am feeling intrigued why FormPanel
> - has a getTarget method
> - but not setTarget method
>
> ???!!!
>
> Is this deficit due to another programming-style-paternalism or simply
> an overlooked absent feature due to be rectified in a later released
> later? Why can't I be allowed to change the target in the midst of the
> game, or am I compelled to declare my handicap before teeing off?

The thing is, if you do not create the FormPanel with a NamedFrame (or
naming the target), it creates a hiden IFrame for "AJAX-style" form
submission (I gues this is how most of us use FormPanel). It's not
clear to me how setTarget should behave in this case...

> How do I set target of a Form?
> Should I attempt the convoluted route of squeezing its FormElement out
> of a FormPanel?

Er, convoluted?
   FormElement.as(formPanel.getElement()).setTarget(newTarget);
or
   formPanel.getElement().cast().setTarget(newTarget);


--~--~-~--~~~---~--~~
You received 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: Gmail-like keyboard shortcuts possible?

2009-06-21 Thread Thomas Broyer


On 20 juin, 18:23, Manuel  wrote:
> What's the best way to implement Gmail-like keyboard shortcuts?
>
> I'd like to get all keypresses, except those in text boxes.
>
> I've searched the archives, and I can't find a good way to do this.

Two solutions immediately come to mind:
1. create a widget and add a keypress handler (addDomHandler, this is
a protected method so you have to inherit an existing Widget subclass:
SimplePanel, AbsolutePanel, etc.); you should get events thanks to
bubbling, but not events directed to text boxes because they "eat"
them (stopPropagation)
2. preview events (Event.addNativePreviewHandler); here you'd get
events before they get to their target, including text boxes, so you'd
have to check that the actual target is not a text box.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to remove horizontal scrollbar from ScrollPanel?

2009-06-21 Thread brett

One option would be to set the css style of the scrollpanel and
override the 'overflow' property.

=Brett


On Jun 18, 11:57 pm, Dimedrol  wrote:
> Hello All!
>
> I have a ScrollPanel with added a Grid inside.
> Say, how to remove horizontal scroller from this ScrollPanel?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-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: GeoXmlOverlay - Google Maps API

2009-06-21 Thread Enea
Are your client (browser) and server, on the same machine? I hope
yes...
Have you a firewall active that maybe blocks the 8080 port? It seems
to be a network problem.

On 19 Giu, 18:01, Thalles  wrote:
> Hi Guys,
>
> I have a problem with the GeoXmlOverlay function from the Google Maps
> API. I always get the failure message that the KML file couldn't be
> loaded.
>
> It works in general with the Google sample KML file from this 
> address:http://mapgadgets.googlepages.com/cta.kml. But as soon as I put the
> same file on my server, it doesn't work anymore. My own KML or KMZ
> files don't work either.
>
> Below is my code. Thanks in advance.
> Thalles
>
> CODE:
> -
>         toogleButtonKMLTracks.addClickHandler(new ClickHandler()
>                 {
>                         @Override
>                         public void onClick(ClickEvent event)
>                         {
>                                 if(toogleButtonKMLTracks.isDown())
>                                 {
>                                          
> GeoXmlOverlay.load("http://localhost:8080/KMLServlet/kml?
> mode=TrackOverview&kmlMode=kmz", new GeoXmlLoadCallback()
>                                          {
>                                                  
> //http://mapgadgets.googlepages.com/cta.kml
>                                                   @Override
>                                                   public void 
> onFailure(String url, Throwable e) {
>                                                     StringBuffer message = 
> new StringBuffer("KML File " +
> url
>                                                         + " failed to load");
>                                                     if (e != null) {
>                                                       
> message.append(e.toString());
>                                                     }
>                                                     
> Window.alert(message.toString());
>                                                   }
>
>                                                   @Override
>                                                   public void 
> onSuccess(String url, GeoXmlOverlay
> overlay)
>                                                   {
>                                                     geoXml = overlay;
>                                                     map.addOverlay(geoXml);
>                                                   }
>                                                 });
>                                 }
>                                 else
>                                 {
>                                         if(geoXml != null)
>                                         {
>                                                 map.removeOverlay(geoXml);
>                                         }
>                                 }
>
>                         }
>
>                 });
--~--~-~--~~~---~--~~
You received 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: No setTarget in FormPanel?

2009-06-21 Thread Blessed Geek

Is that what the as() method is for?

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: Sudden problem in Nebeans 6.5 + GWT plugin

2009-06-21 Thread Serega.Sheypak

Just remove  line: gwt/shell/jvmargs
from gwt-impl.xml

On 1 июн, 23:20, "serega.shey...@gmail.com" 
wrote:
> I was using GWFT+NB for a long time, but suddenly I got:
>
> attached JPDA debugger to localhost:tomcat_shared_memory_id
> init:
> debug-connect-gwt-shell:
> java.lang.NoClassDefFoundError: ${gwt/shell/jvmargs}
> Caused by: java.lang.ClassNotFoundException: ${gwt.shell.jvmargs}
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
> 276)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
> 319)
> Exception in thread "main"
> Exception in thread "main" C:\SVN\src\FStoreGWT\nbproject\build-
> gwt.xml:35: The following error occurred while executing this line:
> C:\SVN\src\FStoreGWT\nbproject\build-gwt.xml:51: Java returned: 1
> BUILD FAILED (total time: 34 seconds)
>
> It happens when I try to debug my project. What does it mean? Early I
> could do debug without any problem.
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



The @skip javadoc tag

2009-06-21 Thread Dave Ford

What does the @skip javadoc comment tag do?

I was browsing thru the svn source and saw the @skip javadoc tag. For
example:

http://google-web-toolkit.googlecode.com/svn/trunk/user/super/com/google/gwt/emul/java/lang/Number.java

I was thinking that it might be a way to say, don't translate this
method into javascript. If so, can we use it in our code?
--~--~-~--~~~---~--~~
You received 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 1.6 and mysql; hosted mode server restart issue

2009-06-21 Thread Dave Ford

I have a similar problem, but no fix yet. It really cancels out the
benefit of the new (in 1.6) super fast "restart server" button in
hosted mode,  because i *still* have to restart the entire shell ever
time i change server side code. Although, i am not getting any mysql
errors.

All i know is that, the "restart server" button does not seem to pick
up my changes to server-side code and i have restart the shell every
time.

On May 13, 3:49 pm, ec  wrote:
> I started a new project using gwt 1.6.4 in eclipse and added the mysql
> connector. I copied the mysql connector jar into the war/WEB_INF/lib
> directory. When I first run hosted mode the application works fine.
> However if I make code changes and then use theRestartServer button
> from Hosted Mode the server can no longer find the mysql connector and
> gives a "java.sql.SQLException: No suitable driver found for
> jdbc:mysql://localhost/"
>
> Anyone experienced this and found a fix?
>
> 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
-~--~~~~--~~--~--~---



Retrieving JSON Data tutorial bug

2009-06-21 Thread waf

Hi All !

It looks like there is a problem in "Retrieving JSON Data" GWT
tutorial.
The JsonStockData servlet that generates random stock data
appends extra comma sign after the last StockData object
[ {...}, {...}, {...}, ]
which results in javascript error on IE7 while processing data in

private void updateTable(StockPrice price)
{
if(!stocks.contains(price.getSymbol()))
return;
int row= stocks.indexOf(price.getSymbol())+1;
...
}

It seams that IE is creating extra array element, which in
this case is not a correct object.
Needless to say that breaks other things, for example
the "Last updated" label doesn't show.

So avoid this extra comma sign in JSON arrays.

--
WAF

--~--~-~--~~~---~--~~
You received 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 XML-based unit test runner compatible with junitreport Ant task

2009-06-21 Thread Baron

I was not able to find a unit test runner that output XML compatible
with the junitreport task and compatible with the way GWT likes to run
unit tests. So I created GWTTestRunner. It is a drop in replacement
for the textui.TestRunner with the addition of a --todir command line
option for writing the XML output. The XML schema is identical to the
XML generated by the Ant junit task xml formatter. Since I think this
may be of use to others I am including the source here. I have put the
source under the apache license so it should be all nice and
compatible with whatever you are doing with GWT. I'd appreciate
hearing how this works for folks and if anyone has improvements, post
to the group.

Cheers,
Baron

--

/*
 * Copyright 2009 C Thing Software
 *
 * 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.cthing.pia.test;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.apache.tools.ant.util.DOMElementWriter;
import org.apache.tools.ant.util.DateUtils;
import org.apache.tools.ant.util.FileUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Text;

import junit.framework.AssertionFailedError;
import junit.framework.Test;
import junit.framework.TestResult;
import junit.runner.BaseTestRunner;

/**
 * Test runner for use with GWT unit tests. This test runner produces
XML
 * output compatible with the junitreport Ant task. Configuration of
the
 * runner is done using Java properties.
 */
public class GWTTestRunner extends BaseTestRunner
{
/** Exit code for a successful test run. */
public static final int SUCCESS_EXIT = 0;
/** Exit code when one or more tests failed. */
public static final int FAILURE_EXIT = 1;
/** Exit code when a test has crashed due to an exception. */
public static final int EXCEPTION_EXIT = 2;

private static final String ELEM_TESTSUITE = "testsuite";
private static final String ELEM_TESTCASE = "testcase";
private static final String ELEM_ERROR = "error";
private static final String ELEM_FAILURE = "failure";

private static final String ATTR_NAME = "name";
private static final String ATTR_CLASSNAME = "classname";
private static final String ATTR_TIMESTAMP = "timestamp";
private static final String ATTR_HOSTNAME = "hostname";
private static final String ATTR_TESTS = "tests";
private static final String ATTR_ERRORS = "errors";
private static final String ATTR_FAILURES = "failures";
private static final String ATTR_TIME = "time";
private static final String ATTR_TYPE = "type";
private static final String ATTR_MESSAGE = "message";

private String toDir;
private TestResult testResult;
private TestDescriptor currentTest;
private Document doc;
private Element rootElement;


/**
 * Records information for a test case.
 */
private static final class TestDescriptor extends TestResult
{
private static final Pattern COMPOSITE_NAME_PATTERN =
Pattern.compile("(.+)\\((.+)\\)");

private String testCase;
private String testName;
private long testCaseStartTime;
private long testStartTime;
private Map errorMap;
private Map failureMap;

/**
 * Constructs a descriptor for the specified test.
 *
 * @param test  Test whose test case is to be monitored.
 */
public TestDescriptor(Test test)
{
this.testCaseStartTime = System.currentTimeMillis();

this.errorMap = new HashMap();
this.failureMap = new HashMap
();

Matcher m = COMPOSITE_NAME_PATTERN.matcher(test.toString
());
if (m.matches()) {
this.testName = m.group(1);
this.testCase = m.group(2);
}
}

/**
 * {...@inheritdoc}
 * @see junit.framework.TestResult#addError
(junit.framework.Test, java.lang.Throwable)
 */
@Override
public synchronized void addError(Test test, Throwable
throwable)
{
super.addError(test, throwable);
th

GWT vs WebObjects

2009-06-21 Thread Yevgeniy Motov

Hi All,

Anyone can point out the major differences between these two
frameworks? I am new to GWT and want to understand why should I use
GWT instead of WebObjects? :)

Thanks!!

-Yevgeniy

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



How to catch all the events of DOM with the help of GWT

2009-06-21 Thread sunny kapoor

Dear Members,

My apologies if I sound vague to you. I am just curious to know, is it
possible to catch all the event of DOM of an application? If yes then
how we can archive that ?
I am trying to do some processing in my event handler and then
delegate the event to main event handler in gwt.

Many Thanks
Sunny

--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



The requested URL was not allowed

2009-06-21 Thread waf

Hi All !

I try to follow GWT Getting Started Tutorial and everthing was fine
until the
3. Personalize the application with the User Service from
GWT and Google App Engine part.

Trying to use User Service on AppEngine deployed app I get

32.82.27.183 - - [20/Jun/2009:14:09:07 -0700] "POST /stockwatcher/
login HTTP/1.1" 500 113 "http://MYAPPID.appspot.com/stockwatcher/
F2BA1EC2336108C70EFD27BB520BF7D5.cache.html" "Mozilla/5.0 (Windows; U;
Windows NT 5.1; pl; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11,gzip
(gfe)" "MYAPPID.appspot.com"

javax.servlet.ServletContext log: Exception while dispatching incoming
RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract pl.waf.stockwatcher.client.LoginInfo
pl.waf.stockwatcher.client.LoginService.login(java.lang.String)' threw
an unexpected exception: java.lang.IllegalArgumentException: The
requested URL was not allowed: http://MYAPPID.appspot.com/
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure
(RPC.java:360)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
(RPC.java:546)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
(RemoteServiceServlet.java:166)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)

I have:

1. Login Service interface

package pl.waf.stockwatcher.client;

import com.google.gwt.user.client.rpc.RemoteService;

public interface LoginService extends RemoteService
{
public LoginInfo login(String requestUri);
}

2. LoginService implementation

package pl.waf.stockwatcher.server;

import pl.waf.stockwatcher.client.LoginInfo;
import pl.waf.stockwatcher.client.LoginService;

import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class LoginServiceImpl extends RemoteServiceServlet implements
LoginService {

@Override
public LoginInfo login(String requestUri)
{
UserService userService= UserServiceFactory.getUserService();
User user= userService.getCurrentUser();
LoginInfo loginInfo= new LoginInfo();

if(user!=null)
{
loginInfo.setLoggedIn(true);
loginInfo.setEmailAddress(user.getEmail());
loginInfo.setNickname(user.getNickname());

loginInfo.setLogoutUrl(userService.createLogoutURL(requestUri));
}
else
{
loginInfo.setLoggedIn(false);

loginInfo.setLoginUrl(userService.createLoginURL(requestUri));
}
return loginInfo;
}
}

3. and login service call

  LoginServiceAsync loginService= GWT.create(LoginService.class);
  loginService.login(GWT.getHostPageBaseURL(), new
AsyncCallback() {

@Override
public void onFailure(Throwable caught) {
handleError(caught);
}

@Override
public void onSuccess(LoginInfo result) {
loginInfo= result;
if(loginInfo.isLoggedIn())
loadStockWatcher();
else
loadLogin();
}
  });

Why is userService.createLoginURL(requestUri) failing with requested
URL not allowed?
Are there any restrictions on request URI?
Everything is working fine in the development environment.

--
Wlodek

--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Using project dependency in eclipse

2009-06-21 Thread Chandra

(I'm writing this post after searching through different post and yet
to find a solution to my problem!)

I added a (Non-GWT, but JAVA) project as a dependent for a GWT project
- the source is built successfully, but while running in hosted mode,
the GWT project could not locate the classes of the Non-GWT project
code.

And yes, I tried all options like adding a ',gwt.xml' file and adding
the  tag etc.

The code is very simple:

Non-GWT project
-
package com.chumma;

public class AddClass{
public int add(int a, int b){
return a+b;
}
}

GWT-Project (Added the previous project as a dependent and also added
entries in classpath of Run conf)
---
import com.person.client.GreetingService;
import com.chumma.AddClass;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

/**
 * The server side implementation of the RPC service.
 */
@SuppressWarnings("serial")
public class GreetingServiceImpl extends RemoteServiceServlet
implements GreetingService {

public String greetServer(int a, int b) {

AddClass myAddClass = new AddClass();
int c=myPerson.add(a,b);
System.out.println("c = " + c);
return Integer.toString(c);
}
}

I'm referencing the "AddClass" *ONLY* from the server code and thus,
the "AddClass" need not be compiled to Javascript.

Can someone please point to where I'm going wrong?

Chandra

--~--~-~--~~~---~--~~
You received 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 architecture MVP/EventBus (mentioned at Google I/O)

2009-06-21 Thread David Peterson

On Jun 20, 1:33 am, Ian Petersen  wrote:
> > My (limited) understanding of what Ray Ryan was saying (and what I
> > understand of MVP) is that the presenter is completely separated from the
> > DOM elements (in order to facilitate testing, and because the view is solely
> > responsible for the view so you can swap views in and out as you please).
>
> Your understanding of MVP is probably less limited than mine--I
> assumed it was a riff on MVC.  Anyway, couldn't you design an MVP
> framework to include "I'm done paying attention to changes" events,
> and use onUnload to trigger them when the presenter is using a widget
> and use some other means when it's using something besides a widget?
> Maybe we've drifted off into the weeds...

I'm also still wrapping my head around the presentation, but I agree-
Presenter objects are separate from the Widget hierarchy - the just
connect via the Widgets/interfaces exposed in the Display interface.

I think the way to have Presenter objects clean up after themselves
would be to have a Presenter superclass that registers itself with the
event bus to listen for 'Window Closing' events, and cleans itself up.
The main app would have an event listener for 'document.onUnload'
events that notifies the event bus and any Presenters can then tidy
up.

I'd love to see some code for the PlaceManager though...

David

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



Re: How to get tab Widget in a TabPanel?

2009-06-21 Thread Enea

I think that there are no method to do this, at the moment.
what you can have, is the html of the tab
with tabPanel.getTabBar().getTabHTML()
but this is not what you want...

Or you can make the greedy solution.

you rewrite your own TabPanel, starting from this:

http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/client/ui/TabPanel.java

in this class there are object from the class TabBar... you have to
rewrite the TabBar class, starting from this:

http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/client/ui/TabBar.java


rewrite the method " protected void insertTabWidget(Widget widget, int
beforeIndex)"


and add the widget to an ArrayList , for example...

then implement a new method..."public Widget getTabWidget(int index)"

and return the widget from the arrayList




good work :P








On 20 Giu, 01:47, Bonor  wrote:
> tabPanel.add( panelA, panelB);
>
> How do I get de widget panelB?
>
> tabPanel.getWidget(0) returns panelA, so how about panelB?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to get tab Widget in a TabPanel?

2009-06-21 Thread Enea

I think that there are no method to do this, at the moment.
what you can have, is the html of the tab
with tabPanel.getTabBar().getTabHTML()
but this is not what you want...

Or you can make the greedy solution.

you rewrite your own TabPanel, starting from this:

http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/client/ui/TabPanel.java

in this class there are object from the class TabBar... you have to
rewrite the TabBar class, starting from this:

http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/client/ui/TabBar.java


rewrite the method " protected void insertTabWidget(Widget widget, int
beforeIndex)"


and add the widget to an ArrayList , for example...

then implement a new method..."public Widget getTabWidget(int index)"

and return the widget from the arrayList




good work :P








On 20 Giu, 01:47, Bonor  wrote:
> tabPanel.add( panelA, panelB);
>
> How do I get de widget panelB?
>
> tabPanel.getWidget(0) returns panelA, so how about panelB?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: The @skip javadoc tag

2009-06-21 Thread gscholt

On Jun 21, 6:43 pm, Dave Ford  wrote:
> What does the @skip javadoc comment tag do?
>
> I was browsing thru the svn source and saw the @skip javadoc tag. For
> example:
>
> http://google-web-toolkit.googlecode.com/svn/trunk/user/super/com/goo...
>
> I was thinking that it might be a way to say, don't translate this
> method into javascript. If so, can we use it in our code?

It is related to the _documentation_, since it is a javadoc tag, not a
method annotation.
Since the methods with that javadoc tag are all methods on a JRE
emulation class that do not appear on the normal JRE class, I suspect
the @skip keeps the menthod from being listed on
http://code.google.com/webtoolkit/doc/1.6/RefJreEmulation.html

Gert
--~--~-~--~~~---~--~~
You received 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 1.6 and mysql; hosted mode server restart issue

2009-06-21 Thread Paul Robinson

There's always -noserver

Dave Ford wrote:
> I have a similar problem, but no fix yet. It really cancels out the
> benefit of the new (in 1.6) super fast "restart server" button in
> hosted mode,  because i *still* have to restart the entire shell ever
> time i change server side code. Although, i am not getting any mysql
> errors.
>
> All i know is that, the "restart server" button does not seem to pick
> up my changes to server-side code and i have restart the shell every
> time.
>
> On May 13, 3:49 pm, ec  wrote:
>   
>> I started a new project using gwt 1.6.4 in eclipse and added the mysql
>> connector. I copied the mysql connector jar into the war/WEB_INF/lib
>> directory. When I first run hosted mode the application works fine.
>> However if I make code changes and then use theRestartServer button
>> from Hosted Mode the server can no longer find the mysql connector and
>> gives a "java.sql.SQLException: No suitable driver found for
>> jdbc:mysql://localhost/"
>>
>> Anyone experienced this and found a fix?
>>
>> 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
-~--~~~~--~~--~--~---



Project structure and MVP

2009-06-21 Thread hojberg

Hi Guys,

So i am very new to GWT, i come from the Rails world.

I find it kinda hard to figure out where to put new files like views
and models and how it is all connected via the entrypoint thing.

in rails i had my app folder structure with folders for model, views
and controllers so i had no problem figuring out where to put what.

What i really am saying is that i need some kind of real world best
practises sample app, do you know of any? (or can you explain to me
how i would go about setting up my project structure)

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: Project structure and MVP

2009-06-21 Thread Ian Bambury
As per another thread, have a look at this
http://code.google.com/events/io/sessions/GoogleWebToolkitBestPractices.html

Once you've got the hang of it, feel free to come back and explain it to the
rest of us :-)

Ian

http://examples.roughian.com


2009/6/21 hojberg 

>
> Hi Guys,
>
> So i am very new to GWT, i come from the Rails world.
>
> I find it kinda hard to figure out where to put new files like views
> and models and how it is all connected via the entrypoint thing.
>
> in rails i had my app folder structure with folders for model, views
> and controllers so i had no problem figuring out where to put what.
>
> What i really am saying is that i need some kind of real world best
> practises sample app, do you know of any? (or can you explain to me
> how i would go about setting up my project structure)
>
> 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: Including my own GWT project

2009-06-21 Thread Carl Pritchett

The jar needs to be on both your project and launch config classpath.
Have you added the jar to the launch config classpath?

-Carl

On Jun 21, 11:35 pm, Ravi  wrote:
> Any help ?? :(
>
> On Jun 20, 6:15 pm, ping2ravi  wrote:
>
> > Hi All,
> > I created one GWT(GWTCommon) project to include in another GWT project
> > (MyViewer)
>
> > my package struture of GWTCommon  is as follow
>
> > com/next/common/GWTCommon.gwt.xml
> > com/next/common/client/GWTCommon.java
> > com/next/common/client/callback/DefaultAsyncCallback.java
> > ...and ome more files.packages in  com/next/common/client/
>
> > Package structure of MyViewer project is as follows
> > com/next/viewer/MyViewer.gwt.xml
> > com/next/viewer/client/MyViewer.java
> > com/next/viewer/client/Somemorefiles.java
>
> > content of  com/next/viewer/MyViewer.gwt.xml is
>
> > 
> >  > EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro-
> > source/core/src/gwt-module.dtd">
> > 
> >   
> >   
>
> >   
> >   
> > 
>
> > Everything looks ok, but when i run it, i get following exception
>
> > [ERROR] Line 45: No source code is available for type
> > com.next.common.client.callback.DefaultAsyncCallback; did you
> > forget to inherit a required module?
>
> > I am inheriting this module as well as the jar file of GWTCommon
> > project is in classpath.
>
> > Can you see, what i am doing wrong here.
> > please help.
>
> > I am using Latest Google Eclipse plugin for GWT/GAE and GWT 1.6
>
> > Ravi
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-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
-~--~~~~--~~--~--~---



Accent Agnostic SuggestOracle / SuggestBox

2009-06-21 Thread Simon Botting

Is there a standard way of doing this, for example if the user types in:
Jose
or
José

Then all suggestions with "José" would appear regardless of whether
the an "e" or an "é" was used on the last letter.

The MultiWordSuggestOracle would seem perfect for adapting to this
were it not for the fact that its internals are all private / friendly

Any err... suggestions, or should I do a clean implementation for this
requirement.

Cheers
Simon

--~--~-~--~~~---~--~~
You received 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: GeoXmlOverlay - Google Maps API

2009-06-21 Thread Eric Ayers
Hello Thales,

Unfortunately, the problem is in your localhost URLs.  Because these
classes require Google's servers to do their job, the GeoXmlOverlay
classes require that the resources you are loading be visible from the
internet.

-Eric.

On Fri, Jun 19, 2009 at 12:01 PM, Thalles wrote:
>
> Hi Guys,
>
> I have a problem with the GeoXmlOverlay function from the Google Maps
> API. I always get the failure message that the KML file couldn't be
> loaded.
>
> It works in general with the Google sample KML file from this address:
> http://mapgadgets.googlepages.com/cta.kml. But as soon as I put the
> same file on my server, it doesn't work anymore. My own KML or KMZ
> files don't work either.
>
> Below is my code. Thanks in advance.
> Thalles
>
> CODE:
> -
>        toogleButtonKMLTracks.addClickHandler(new ClickHandler()
>                {
>                       �...@override
>                        public void onClick(ClickEvent event)
>                        {
>                                if(toogleButtonKMLTracks.isDown())
>                                {
>                                         
> GeoXmlOverlay.load("http://localhost:8080/KMLServlet/kml?
> mode=TrackOverview&kmlMode=kmz", new GeoXmlLoadCallback()
>                                         {
>                                                 
> //http://mapgadgets.googlepages.com/cta.kml
>                                                 �...@override
>                                                  public void onFailure(String 
> url, Throwable e) {
>                                                    StringBuffer message = new 
> StringBuffer("KML File " +
> url
>                                                        + " failed to load");
>                                                    if (e != null) {
>                                                      
> message.append(e.toString());
>                                                    }
>                                                    
> Window.alert(message.toString());
>                                                  }
>
>                                                 �...@override
>                                                  public void onSuccess(String 
> url, GeoXmlOverlay
> overlay)
>                                                  {
>                                                    geoXml = overlay;
>                                                    map.addOverlay(geoXml);
>                                                  }
>                                                });
>                                }
>                                else
>                                {
>                                        if(geoXml != null)
>                                        {
>                                                map.removeOverlay(geoXml);
>                                        }
>                                }
>
>                        }
>
>                });
>
> >
>



-- 
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

--~--~-~--~~~---~--~~
You received 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: PagingScrollTable: little left-right arrow image

2009-06-21 Thread mdwarne

It seems to adjust the width of all the columns to fill the table when
the total of all column widths are too short too fill the width of the
table. I'm not sure what else it does.

I have been removing it from my tables, using  the DOM.  I wish there
was an api to get to it and hide it or remove it, since I think it is
confusing to users.

Mike.

On Jun 20, 8:24 pm, hezjing  wrote:
> Hi
> While working on the PagingScrollTable, there is this little left-right
> arrow image shown on the screen (see attached).
>
> Do you have any idea what is this?
>
> --
>
> Hez
>
>  left-right-arrow.bmp
> 3KViewDownload
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



PresentationModel/ValueModel framework (as opposed to MVP)

2009-06-21 Thread Andrew Pietsch

Hi all,

I've been watching some of the Google IO presentations and have been
learning a lot.  One thing I'm missing from my Swing background is a
nice PresentationModel/ValueModel framework (ala JGoodies binding and
SpringRichClient forms).  ValueModels can do some pretty cool things
using converters/functions/multiplexers etc and can come into their
own when the value model is extended to model "fields" with enabled,
visible, and editable states.  When using this approach the view
classes end up containing only layout and focus ordering code.  All
the functional behaviour is defined by the model (and any associated
Actions/Commands).  I've coded a such a framework more than once
before (for various crazy reasons (c:) and don't really want to do it
all again if I can avoid it so I'm interested to know if anyone else
is pursuing this line?

I've attached some basic usage scenarios of how I'd like to use such a
framework.  In the example FieldModel extends HasValue and would
add bound properties for visible, enabled and editable.

// create ourselves a form model and add some fields to it.  Some get
their values from beans, some from other fields and some just exist on
the form.

public MyFormModel extends FormModel {

 // field bound to a valuemodel (we would need to use deferred
binding to create value models for bean properties)
   // api -> fieldOfType(T.class).boundTo(HasValue).create();
   FieldModel firstName = fieldOfType(String.class).boundTo
(firstNameFakedReflectionThingy).create();
   FieldModel gender = fieldOfType(Gender.class).boundTo
(genderFakedReflectionThingy).create();

   // converting to and from other values, user can enter either field
and the other updates automagically.
   // api -> fieldOfType(T.class).convertedFrom(HasValue).using
(Converter).create();
   FieldModel dollars = fieldOfType(Double.class).convertedFrom
(centsField).using(new DollarsToCentsConverter()).create();

   // calculated values
   // api -> fieldOfType(T.class).caculatedFrom(HasValue...).using
(Function);
   FieldModel netWorth = fieldOfType
(Double.class).calculatedFrom(dollarsInWallet,
dollarsUnderMattress).using(Functions.sum()).create();

   // value holder (i.e. a form only value that isn't stored anywhere)
   FieldModel showSecretStashLocation = fieldOfType
(Boolean.class).create();
}

The model becomes more powerful when you add bindings to the enaled/
visible state based on other fields (or values) within the form.  I'd
previously achieved this in Swing using a simple ANTLR based language
embedd in strings (eek), but I always hated the lack of type saftey
and code completiong so I figured the guice inspired builder style api
would probably do the trick.  I.e. to enable a field based on the
value of another field you'd go...

   // Note: the field(..) method returns a FieldConditionBuilder
   // api -> enable(field).when(Condition)
   enable(secretStashAmount).when(field(showSecretStashLocation).value
().is(true))

Then when the field showSecretStashLocation changes, the
secretStashAmount would enable and disable automagically.  And
similarly...
   disable(...).when(...)
   show(...).when(...)
etc.


A similar approach could also be used for validation, although this
widens the api somewhat and you end up having to define interfaces
ValidationResult, IndexedValidationResult and what not.

   // Add some validation...
   // api -> validate(FieldModel).using(Validator).when
(Condition)
   validate(shippingAddress).using(shippingAddressValidator).when(field
(shipToDifferentAddress).value().is(true))

Then once you form model is complete you need to bind you field models
to your form.  Previously when developing this in Swing I've used
explicit binding classes (similar the Karsten Lentzsch of JGoodies
fame), but they are a huge pain to create and maintain.  I'm think the
HasValue interface on GWT widgets should simplify this enormously.

// bring in the bind methods..
import static WidgetBinder.bind;

public MyForm extends Composite {
   // it would be really nice with UIBinder..
   @UiField TextBox firstNameTextBox;
   @UiField RadioButton maleRadioButton;
   @UiField RadioButton femaleRadioButton;
   @UiField CheckBox showSecretStashCheckBox;

   public MyForm(MyFormModel model) {
  // do any the UI binder stuff...
  ...

  // now bind our widgets to our model.
  bind(model.firstName).to(firstNameTextBox);

  // bind radio buttons to specific values...
  bind(model.gender).withValue(Gender.MALE).to(maleRadioButton);
  bind(model.gender).withValue(Gender.FEMALE).to
(femaleRadioButton);

  bind(model.showSecretStash).to(showSecretStashCheckBox);

  // we can also use field models directly to control other parts
of the UI.
  model.showSecretStash.addValueChangeHandler(new
ValueChangeHandler() {
  public void onValueChange(ValueChangeEvent event) {
 secretStashWidget.setVisible(event.getValue());
  }
  }
   }
}

Cheers
Andrew
--~--~

Re: integrate GWT gui with spring framework

2009-06-21 Thread Sledged

I recently dealt with a similar issue.  In my case I wanted to create
a js gui while still being able to support scriptless browsers.
(Additionally, I wanted to make the application accessible via SOAP.)

Since you already have a spring controller, the most readily available
option of which I can think is to use your JSP(s) to convert the model
into JSON.  The GWT API supports JSON, and it shouldn't require you to
change any server-side code.

If you choose to use GWT's RPC, I can't think of a way to access the
spring controller's model, but you can continue to use it to support
scriptless client-side environments.  However, you can have the
controller use the GWT RPC interface and server-side implementation
class to retrieve the model using DI, which is what I did.
(Additionally, I annotated the interface to be a web service, so the
interface and it's implementation are pulling triple duty.)

On Jun 18, 5:46 pm, bhumij  wrote:
> your reply really makes sense. since I want to change entire gui to
> GWT, there
> is no need to use VIEW aspects. However, How can I access the classes
> or objects added in controller class.
> I have ready made spring mvc application. Is it possible to simply
> modify the existing controller to gwtcontroller.
>
> thanks in advace
>
> On Jun 17, 8:04 pm, Arthur Kalmenson  wrote:
>
> > You can still use Spring MVC with GWT, but if your entire UI is going
> > to be written in GWT you won't be using the View and Model aspect of
> > Spring MVC. I just use it for the servlet dispatcher to direct
> > requests to the appropriate controller which implements the GWT
> > RemoteService. If you search the group you'll find lots of information
> > on how to integrate GWT with Spring MVC.
>
> > --
> > Arthur Kalmenson
>
> > On Tue, Jun 16, 2009 at 9:23 PM, bhumij wrote:
>
> > > I have developed java-spring application. its gui is developed using
> > > javascript and 3rd party lib like YUI. Now I need to use GWT for GUI.
> > > I want to use GWT for only GUI developing purpose. I have no idea how
> > > i can integrate it into existing spring framework. View classes of
> > > spring frame works are responsible to generate GUI with using YUI.
> > > since GWT generates .js files itself. i am clueless in this
> > > integration with spring 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
-~--~~~~--~~--~--~---



Re: docs discrepancy ???

2009-06-21 Thread Robert Lehr


Pardon me if I am missing something.  But I do not see how your
comments address the apparent contradiction in the docs.

-robert

On Jun 20, 7:23 am, Ian Bambury  wrote:
> Transitional means 'transitional'. It differs depending on the html version.
> '4.01 Transitional' means 'contains all HTML elements and attributes,
> including presentational and deprecated elements (like font). Framesets are
> not allowed.'
>
> But...
>
> 
>
> ...will trigger quirks mode in newer browsers and older browsers just have
> quirks anyway. Although not the same quirks as each other, of course.
>
> Personally, I use
>
>  'http://www.w3.org/TR/html4/loose.dtd'>
>
> which will give you the 4.01 Transitional behaviour mentioned above in
> almost all browsers - all the important ones, anyway.
>
>
> 2009/6/20 Robert Lehr 
>
>
>
> > FYI, there appears to be a discrepancy in the docs w/rt to the doc
> > type specifying
> > "Transitional" denotes "Standards" mode or "Quirks" mode.
>
> > Which does it denote ?  Note the following from GWT docs.
>
> > Fromhttp://code.google.com/webtoolkit/tutorials/1.6/create.html-
>
> >        To provide better cross-browser compatibility, GWT sets the
> > doctype declaration to HTML 4.01 Transitional. This sets the rendering
> > engine to "Standards Mode". If you remove this line, the page will be
> > rendered in "Quirks Mode", ...
>
> > So - TRANSITIONAL denotes STANDARDS mode.
>
> > From the comments in the "host page" auto-gen'ed by webAppCreator -
>
> >         > EN">
> >        
> >        
> >        
> >        
> >        
> >        
>
> > Or - does TRANSITIONAL denote QUIRKS mode ?
>
> > -robert
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Page navigations in GWT

2009-06-21 Thread Sowjanya Yerramneni
 Hi,

I am a struts developer totally new to GWT EXT.
Could anyone explain how page navigations happen in GWT an how can we pass
params between pages?
I am trying to develop a web application where we have a login page, search
page and search results page.
Please help.
-- 
-Regards,
Sowjanya.

--~--~-~--~~~---~--~~
You received 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 + OpenID - experiences?

2009-06-21 Thread markww

Hi,

I spent some time figuring out if OpenID would work well with my GWT
app, not sure if anyone else has tried. If I understand correctly,
when a user gets to my app, I need to ask them to sign in with an
OpenID provider (google, yahoo, facebook, etc).

This is a bit problematic because the providers will either require a
redirect to their own sign-in page, or a popup asking for user login
information. Does anyone else find that to be user-unfriendly?

On the plus side, it only has to be done once, I can save a session
cookie afterwards so I don't have to keep prompting them with every
visit to my site - but this is how a do-it-yourself login would work
anyway.

Anyone have experience with OpenID + GWT? There's a write up of one
possible way to integrate it here:

http://chaoticjava.com/posts/using-openid-within-gwt/

but the redirects / popups are making me lean towards not doing it,
even though it would be nice to save my users from yet another
username/password combo.

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: Accent Agnostic SuggestOracle / SuggestBox

2009-06-21 Thread gscholt

On Jun 22, 1:59 am, Simon Botting  wrote:
> Is there a standard way of doing this, for example if the user types in:
> Jose
> or
> José
>
> Then all suggestions with "José" would appear regardless of whether
> the an "e" or an "é" was used on the last letter.
>
> The MultiWordSuggestOracle would seem perfect for adapting to this
> were it not for the fact that its internals are all private / friendly
>
> Any err... suggestions, or should I do a clean implementation for this
> requirement.

I find it strange that it's not an easily extendable class myself, but
yes, you'll need to implement an oracle yourself.
You can just copy the MultiWordSuggestOracle code and adapt it I guess
(guessing, not read the copyright notice actually)
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---