Strange problem since switching to GWT 1.5

2008-09-28 Thread Paul van Hoven

I moved my current project to GWT 1.5. While on 1.4 I had no problems
I encounter some strange problems using GWT 1.5. I already had a
problem that I was able to repair by recreating the project and copy
and pasting my old stuff into the newly created project. After that it
worked. I think that this was a problem that refered to GWT 1.5.

Now I'm facing a another problem, and I think it is also a GWT 1.5
specific problem, that makes absolutly no sense to me.

I created some objects:
package kiretose.server.universal;

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

@javax.persistence.Entity
@javax.persistence.Table( name=ForumTopics )
public class TopicMetaInfo implements IsSerializable {
...here come Constructors, variables, setter/getter

Note that the annotations refer to Hibernate.
The object acutally is fine. I have some other objects that are quite
similar. They also implement IsSerializable.

Now when I try to run my app I get some error messages that are not
plausible to me:

[TRACE] Compiling Java source files in module 'kiretose.Index'
   [TRACE] Removing units with errors
  [ERROR] Errors in 'path/to/project/kiretose/src/kiretose/client/
forum/TopicWidget.java'
 [ERROR] Line 12: No source code is available for type
kiretose.server.universal.TopicMetaInfo; did you forget to inherit a
required module?


If I look into TopicWidget.java

public class TopicWidget extends SimplePanel implements
AsyncCallbackObject,ClickListener {
TopicMetaInfo[] topicMetaInfos; //this is line 12

I get a whole bunch of error message of this type that I am not able
to understand. My app actually runs without problems. Maybee somebody
knows what is going on here?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Best practices

2008-09-28 Thread tyler

Hi,

I would also be interested in seeing a set of best practices for
writing the client-side portion of GWT apps.  In the mean time, try
the -style PRETTY parameter to your compiler.   Looking at the
generated JavaScript might give you some insight into how you might
improve your java code.

Tyler


On Sep 25, 3:44 am, Stefan [EMAIL PROTECTED] wrote:
 Hi,

 Does anyone know any good resources for Best practices when writing
 GWT apps? Questions I would like to have answered:

 * How to I write high-performing apps? I know that the compiler helps
 out, but how do I write code that helps the compiler to minify/
 optimize my app?
 * How does static and final assignments affect the performance of
 apps?

 Thanks in advance!
 Stefan

--~--~-~--~~~---~--~~
You received 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: google-web-toolkit-incubator policy

2008-09-28 Thread darkman97

Incubator is so experimental widget, and sometimes are done major
refactoring (critical changes).

Althought I'm happy using it at same time sometimes is so complicated
to make changes between versions, because updated information on wiki
not correspons sometimes with updated classes libraries, javadoc seems
it's ok on that way.

Any changelog it'll be necessarry to make upgrades more easilly.

On Sep 26, 10:45 pm, Isaac Truett [EMAIL PROTECTED] wrote:
 I haven't seen a roadmap as such. But as an interested observer and
 user of Incubator components, I can tell you that they are actively
 developed and supported. They're also really useful. It's a much more
 fluid environment than the main GWT project which means you can get
 faster evolution of components, but it also means more frequent and
 severe breaking changes. There's a gen2 movement underway in the
 Incubator which includes re-working a lot of the existing Incubator
 components as well as an entirely new event system that looks very
 promising. I would encourage you to try out the Incubator. Just keep
 in mind that it's still a work in progress.

 - Isaac

 On Thu, Sep 18, 2008 at 4:33 AM, Sylvain [EMAIL PROTECTED] wrote:

  I would like to use 2 components included in your incubator toolkit
  ( FastTree and Tables with cell editors ). Can I have a road map to
  know when and if these components will be included in the future GWT
  official release?
  These 2 components were already in the last incubator 1.4 and were not
  included in the new GWT release 1.5.
  Could you please give more visiblity to your roadmap on 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Google Maps problem

2008-09-28 Thread Eric Ayers
Knowing the mechanism involved, I'm pretty sure its the same, but I'll sort
through all that on Monday and follow up.

On Sun, Sep 28, 2008 at 1:29 AM, Alexey Frishman
[EMAIL PROTECTED]wrote:


 Hi, Eric
 Thanks for quick response!

 Should I raise a new issue or join existing one? It seems to me that
 my problem is similar, but not the same as in issue No 156.

 On Sep 28, 2:25 am, Eric Ayers [EMAIL PROTECTED] wrote:
  Hi Alexey,
  I don't think you are doing anything wrong.  This sounds like the same
  problem as issue 156 to me:
 
  http://code.google.com/p/gwt-google-apis/issues/detail?id=156
 
  I thought it was fixed in 1.0 RC1, but apparently not when the info
 window
  is used with a Marker class.
 
  Please start the issue if you want to keep track of your progress.
  -Eric.
 
  On Sat, Sep 27, 2008 at 1:17 PM, Alexey Frishman
  [EMAIL PROTECTED]wrote:
 
 
 
 
 
   Hi
 
   I use GWT Google Maps API and I have next problem.
 
   I have click handler on each marker on my map. This handler opens info
   window and creates Grid subclass widget inside it with some info.
 
   The problem is that after clicking several times on different markers
   and seeing appropriate info windows, I close next window and after
   this all next windows are empty. So the widget inside all new windows
   is not created or is created in wrong way...
 
   That is the method in the click handler:
 
  public void onClick(MarkerClickEvent event) {
  Marker marker = event.getSender();
  map.getInfoWindow().open(marker, new
 InfoWindowContent(new
   MapObjectInfo(data)));
  map.setCenter(marker.getLatLng());
  }
 
   Here MapObjectInfo is subclass of the Grid Widget with some basic
   initialization stuff.
 
   Please advise me, if I do something wrong. May be this eats much
   memory in Javascript, but I don't want to make RPC call every time I
   open window on the marker. I want a group of markers be on client side
   with all info for info window.
 
  --
  Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://
 code.google.com/webtoolkit/
 



-- 
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Strange problem since switching to GWT 1.5

2008-09-28 Thread Paul van Hoven

I moved some of the objects into my client package. But still I get
these strange messages:

[TRACE] Compiling Java source files in module 'kiretose.Index'
 [TRACE] Removing invalidated units
  [WARN] Compilation unit 'path/to/project/kiretose/src/
kiretose/client/forum/TopicWidget.java' is removed due to invalid
reference(s):
  [WARN] path/to/project/kiretose/src/kiretose/client/
TopicMetaInfo.java

Note that the TopicWidget is located in the client.forum package.
Another problem I encounter: If I try to create a custom Widget called
ForumWidget which is located in the client.forum package I get another
error message:

[TRACE] Finding entry point classes
 [ERROR] Unable to find type 'kiretose.client.Index'
   [ERROR] Hint: Previous compiler errors may have made this
type unavailable
   [ERROR] Hint: Check the inheritance chain from your module;
it may not be inheriting a required module or a module may not be
adding its source path entries properly
[ERROR] Failure to load module 'kiretose.Index'

I think there are some problems with the packages. But I do not
understand it because it is simply the same structured as I use in GWT
1.4. With the previous version I had absolutly no problems.



On 28 Sep., 12:45, Paul van Hoven [EMAIL PROTECTED]
wrote:
 Thanks for the answer. How do I tell GWT to also look into the
 server.universal package by default?

 On 28 Sep., 11:27, Thomas Broyer [EMAIL PROTECTED] wrote:

  On 28 sep, 11:01, Paul van Hoven [EMAIL PROTECTED]
  wrote:

   I created some objects:
   package kiretose.server.universal;

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

   @javax.persistence.Entity
   @javax.persistence.Table( name=ForumTopics )
   public class TopicMetaInfo implements IsSerializable {
   ...here come Constructors, variables, setter/getter

   Note that the annotations refer to Hibernate.
   The object acutally is fine. I have some other objects that are quite
   similar. They also implement IsSerializable.

   Now when I try to run my app I get some error messages that are not
   plausible to me:

   [TRACE] Compiling Java source files in module 'kiretose.Index'
      [TRACE] Removing units with errors
         [ERROR] Errors in 'path/to/project/kiretose/src/kiretose/client/
   forum/TopicWidget.java'
            [ERROR] Line 12: No source code is available for type
   kiretose.server.universal.TopicMetaInfo; did you forget to inherit a
   required module?

   If I look into TopicWidget.java

   public class TopicWidget extends SimplePanel implements
   AsyncCallbackObject,ClickListener {
           TopicMetaInfo[] topicMetaInfos; //this is line 12

   I get a whole bunch of error message of this type that I am not able
   to understand. My app actually runs without problems. Maybee somebody
   knows what is going on here?

  Your TopicMetaInfo is in a .server.* package; GWT looks at client/
  packages only (defaulting to client.* when not specified); that
  might be why it doesn't find TopicMetaInfo's source 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: * No source code is available for type java.io.BufferedWriter; did you forget to inherit a required module?*

2008-09-28 Thread Adam T

Too add to Lothar's comment, you can find which Java classes you can
use on server side by referring here:
http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5s=google-web-toolkit-doc-1-5t=RefJreEmulation

BufferedWriter and FileWriter are not included for the reasons already
stated.

//A

On 27 Sep, 11:53, Manish Kumar [EMAIL PROTECTED] wrote:
 Hi everybody,

 Thanks all of you for providing continuos support to each other.

 I am trying to write a file on GWT Client ( inside the method
 onModuleLoad )using BufferedWriter and FileWriter.

 The problem is that It is compiled successfuly but on the run time it gives
 :

 * No source code is available for type java.io.BufferedWriter; did you
 forget to inherit a required module?*
 * No source code is available for type java.io.FileWriter; did you forget to
 inherit a required module?*
 * No source code is available for type java.io.IOException; did you forget
 to inherit a required module?*

 These seem a bit sily errors as I might not have included some required
 module or jar file,But troubling me a lot.

 I am using eclipse IDE and added all the jars to avoid any compilation
 error.

 And also is there any certian way to add module/lib/classpath for the same.

 Usually I use *configure Build Path* and manual edit of  gwt.xml.

 Does this make any difference?

 Can anybody please help me out to simulate which is the required for the
 same?

 Thanking in advance.

 Regards
 Manish
--~--~-~--~~~---~--~~
You received 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Server Side File Saving

2008-09-28 Thread Ned Racine

I'm not to familiar with the fitting content type, you maybe show me
a clip of sample code?  Does this then return the file as a bytestream
or something? Also, because this new servlet I will have made will
only be reference with some servlet mapping in the web.xml file, will
the still work in hosted mode?

As for using the RPC servlet, I don't see how doGet solves my
problem.  How is it fundamentally different form the doPost method
used the the RPC? And I what I need to know is even if i did use
either of these methods, on a high level, how does the file get passed
from the server to the client?  I would feel comfortable diving right
into either these without at least having a vague understanding of
what was happening.

On Sep 27, 5:10 pm, Lothar Kimmeringer [EMAIL PROTECTED] wrote:
 Ned Racine schrieb:

  I also want to graph the
  results, and my original intention was to just save a .png of the
  graph in the public folder, but this is where I get hung up.  I cannot
  get a reference to the public folder path, which I need for the client
  to see the file.

 Another way would be to call a servlet that is returning the picture
 with fitting content-type. The servlet can be placed at the same
 place where you RPC-servlet resides (adding it to the web.xml and
 the GWT.xml-file for hosted mode).

 You can also implement it in the RPC-servlet by implementing
 doGet (the RPC-mechanism works with POST) reducing the number
 of servlets needed for your application.

  I have done the exact same thing using Apache Struts
  before, but now that I'm using GWT I can't figure this out.  Ideally I
  could find a solution where this would work in both web and hosted
  mode, but web mode would be the more important of the two obviously.

 The technique I described works in both modes and I use it here
 for the download of SQL-results as CSV-files and other stuff.

 Regards, Lothar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Google Maps problem

2008-09-28 Thread Alexey Frishman

Eric, thanks once more for your attention.
I've already created an issue 
http://code.google.com/p/gwt-google-apis/issues/detail?id=181,
just to be sure  it will be noticed by you (or somebody else?) and to
keep track how it is going.

One more question: will this fix be available in the trunk before next
release? Or you use another branches for fixed issues?

On Sep 28, 2:20 pm, Eric Ayers [EMAIL PROTECTED] wrote:
 Knowing the mechanism involved, I'm pretty sure its the same, but I'll sort
 through all that on Monday and follow up.

 On Sun, Sep 28, 2008 at 1:29 AM, Alexey Frishman
 [EMAIL PROTECTED]wrote:





  Hi, Eric
  Thanks for quick response!

  Should I raise a new issue or join existing one? It seems to me that
  my problem is similar, but not the same as in issue No 156.

  On Sep 28, 2:25 am, Eric Ayers [EMAIL PROTECTED] wrote:
   Hi Alexey,
   I don't think you are doing anything wrong.  This sounds like the same
   problem as issue 156 to me:

  http://code.google.com/p/gwt-google-apis/issues/detail?id=156

   I thought it was fixed in 1.0 RC1, but apparently not when the info
  window
   is used with a Marker class.

   Please start the issue if you want to keep track of your progress.
   -Eric.

   On Sat, Sep 27, 2008 at 1:17 PM, Alexey Frishman
   [EMAIL PROTECTED]wrote:

Hi

I use GWT Google Maps API and I have next problem.

I have click handler on each marker on my map. This handler opens info
window and creates Grid subclass widget inside it with some info.

The problem is that after clicking several times on different markers
and seeing appropriate info windows, I close next window and after
this all next windows are empty. So the widget inside all new windows
is not created or is created in wrong way...

That is the method in the click handler:

       public void onClick(MarkerClickEvent event) {
               Marker marker = event.getSender();
               map.getInfoWindow().open(marker, new
  InfoWindowContent(new
MapObjectInfo(data)));
               map.setCenter(marker.getLatLng());
       }

Here MapObjectInfo is subclass of the Grid Widget with some basic
initialization stuff.

Please advise me, if I do something wrong. May be this eats much
memory in Javascript, but I don't want to make RPC call every time I
open window on the marker. I want a group of markers be on client side
with all info for info window.

   --
   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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Strange issue with Date class

2008-09-28 Thread Xandrios

Ouf, looks like I did not get enough sleep last night. Thanks alot!

On 28 sep, 19:25, Paul Robinson [EMAIL PROTECTED] wrote:
 Date uses zero-based integers for the month, so January is 0 and August
 is 7.

 getDay() returns the day of the week, with 2 being Tuesday. You probably
 wanted getDate()

 An alternative way would be to use com.google.gwt.i18n.client.DateTimeFormat

 Paul

 Xandrios wrote:
  Hi,

  I have noticed a strange problem with the Date class. Example:

  Date date = record.getAsDate(field);
  String dateString = (date.getMonth()+/+date.getDay()+/+
  (date.getYear()+1900)
  + / +date.getTime()+ / +date.toString());

  dateString now returns the following:

  7/2/2010 / 128078640 / Tue Aug 03 00:00:00 CEST 2010

  The timestamp and toString values are correct. However the
  date.getMonth() and date.getDay() are not.

  Does anybody have an idea what could be wrong here? Should I use
  another method to get the date as mm/dd/yyy string?

  I'm using GWT 1.5 by the way.

  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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Draw circle with gwt-maps library

2008-09-28 Thread Samuel

I did it ! :)

With Polygon.. it's a bit long, but It's work...
I use the JS example in : http://maps.forum.nu/gm_sensitive_circle2.html

With GWT it is :

public void doDrawCircle(LatLng center, double radius) {

LatLng[] circlePoints = new LatLng[361];
Polygon circle;

double PI = 3.1415;

double d = radius / 6378.8; // radians

double lat1 = (PI / 180) * center.getLatitude(); // radians
double lng1 = (PI / 180) * center.getLongitude(); // radians

for (int a = 0; a  361; a++) {
double tc = (PI / 180) * a;
double y = Math.asin(Math.sin(lat1) * Math.cos(d) + 
Math.cos(lat1)
* Math.sin(d) * Math.cos(tc));
double dlng = Math.atan2(Math.sin(tc) * Math.sin(d)
* Math.cos(lat1), Math.cos(d) - 
Math.sin(lat1)
* Math.sin(y));
double x = ((lng1 - dlng + PI) % (2 * PI)) - PI; // MOD 
function
LatLng point = LatLng.newInstance(y * (180 / PI), x * 
(180 / PI));
circlePoints[a] = point;
}

circle = new Polygon(circlePoints, #FF, 1, 1.0, 
#FF, .
7);
map.addOverlay(circle);
}

Thanks eric for Week-end support ;)

Samuel

On 28 sep, 00:47, Eric Ayers [EMAIL PROTECTED] wrote:
 Actually, I was referring to the Maps API when I said I couldn't find a way
 to do it.



 On Sat, Sep 27, 2008 at 10:58 AM, Samuel [EMAIL PROTECTED] wrote:

  Thanks eric,

  I'm sure it's possible with Maps API, but with the gwt-maps API I
  can't find solution.

  Maybe it's a good solution to use image...
  But I need use getBounds().containsLatLng(..) to known if a point is
  in this circle. I'm not sure it's work with a picture...

  Samuel

  On 27 sep, 15:24, Eric Ayers [EMAIL PROTECTED] wrote:
   Samuel,

   You might want to go search the Maps API google group for this one. I
  don't
   see an obvious way to make one (like a GCircle or GEllipse class).

   The geodesic polyline support uses a segmented line to represent an arc.
   You could do that by creating a lot of points out for a Polygon.

   Another way you could do this is to create an image of a circle and then
   make a GroundOverlay out of it.  It would look a bit different from a
   Polyline or Polygon.

   -Eric.

   On Sat, Sep 27, 2008 at 3:58 AM, Samuel [EMAIL PROTECTED] wrote:

Hi,

I have a very simple question :)
How draw a circle in a maps with gwt-maps library ?
Have you got an example ? (I do Polygon but I can't make circle :( )

Thanks

Samuel

   --
   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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Strange issue with Date class

2008-09-28 Thread Paul Robinson

Date uses zero-based integers for the month, so January is 0 and August
is 7.

getDay() returns the day of the week, with 2 being Tuesday. You probably
wanted getDate()

An alternative way would be to use com.google.gwt.i18n.client.DateTimeFormat

Paul

Xandrios wrote:
 Hi,

 I have noticed a strange problem with the Date class. Example:

 Date date = record.getAsDate(field);
 String dateString = (date.getMonth()+/+date.getDay()+/+
 (date.getYear()+1900)
 + / +date.getTime()+ / +date.toString());

 dateString now returns the following:

 7/2/2010 / 128078640 / Tue Aug 03 00:00:00 CEST 2010

 The timestamp and toString values are correct. However the
 date.getMonth() and date.getDay() are not.

 Does anybody have an idea what could be wrong here? Should I use
 another method to get the date as mm/dd/yyy string?

 I'm using GWT 1.5 by the way.

 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



datepicker

2008-09-28 Thread Ananda Rao

Hi,

i need your help...please

i want to create a date picker .but dont know how.

1) i have download the gwt-incubator.jar but dont know how to add this
to my existing project in the eclips.
2) 
http://code.google.com/p/google-web-toolkit-incubator/wiki/MakingIncubatorBetter
. i have read this insrtuction but did not get anything.
3) i have downloade a sample code from the below link
http://code.google.com/docreader/#p=google-web-toolkit-incubators=google-web-toolkit-incubatort=DatePicker
but dont know how to execut this.

an any one tell me how to run this code...

Thanks
Anand

--~--~-~--~~~---~--~~
You received 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Form submitted twice?

2008-09-28 Thread marcelstoer

I used the code provided as an example in
http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/FormPanel.html
to build a form panel.

However, the form seems to get submitted twice as the
Window.alert(The text box must not be empty); is executed twice. Any
ideas as for why this happens?

Regards,
Marcel
--~--~-~--~~~---~--~~
You received 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Google Maps problem

2008-09-28 Thread Eric Ayers
Hi Alexey,
I will be making these fixes in the release branch svn/releases/maps/1.0,
and periodically merging the fixes back into the trunk.

On Sun, Sep 28, 2008 at 1:25 PM, Alexey Frishman
[EMAIL PROTECTED]wrote:


 Eric, thanks once more for your attention.
 I've already created an issue
 http://code.google.com/p/gwt-google-apis/issues/detail?id=181,
 just to be sure  it will be noticed by you (or somebody else?) and to
 keep track how it is going.

 One more question: will this fix be available in the trunk before next
 release? Or you use another branches for fixed issues?

 On Sep 28, 2:20 pm, Eric Ayers [EMAIL PROTECTED] wrote:
  Knowing the mechanism involved, I'm pretty sure its the same, but I'll
 sort
  through all that on Monday and follow up.
 
  On Sun, Sep 28, 2008 at 1:29 AM, Alexey Frishman
  [EMAIL PROTECTED]wrote:
 
 
 
 
 
   Hi, Eric
   Thanks for quick response!
 
   Should I raise a new issue or join existing one? It seems to me that
   my problem is similar, but not the same as in issue No 156.
 
   On Sep 28, 2:25 am, Eric Ayers [EMAIL PROTECTED] wrote:
Hi Alexey,
I don't think you are doing anything wrong.  This sounds like the
 same
problem as issue 156 to me:
 
   http://code.google.com/p/gwt-google-apis/issues/detail?id=156
 
I thought it was fixed in 1.0 RC1, but apparently not when the info
   window
is used with a Marker class.
 
Please start the issue if you want to keep track of your progress.
-Eric.
 
On Sat, Sep 27, 2008 at 1:17 PM, Alexey Frishman
[EMAIL PROTECTED]wrote:
 
 Hi
 
 I use GWT Google Maps API and I have next problem.
 
 I have click handler on each marker on my map. This handler opens
 info
 window and creates Grid subclass widget inside it with some info.
 
 The problem is that after clicking several times on different
 markers
 and seeing appropriate info windows, I close next window and after
 this all next windows are empty. So the widget inside all new
 windows
 is not created or is created in wrong way...
 
 That is the method in the click handler:
 
public void onClick(MarkerClickEvent event) {
Marker marker = event.getSender();
map.getInfoWindow().open(marker, new
   InfoWindowContent(new
 MapObjectInfo(data)));
map.setCenter(marker.getLatLng());
}
 
 Here MapObjectInfo is subclass of the Grid Widget with some basic
 initialization stuff.
 
 Please advise me, if I do something wrong. May be this eats much
 memory in Javascript, but I don't want to make RPC call every time
 I
 open window on the marker. I want a group of markers be on client
 side
 with all info for info window.
 
--
Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://
   code.google.com/webtoolkit/
 
  --
  Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://
 code.google.com/webtoolkit/
 



-- 
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Server Side File Saving

2008-09-28 Thread Lothar Kimmeringer

Ned Racine schrieb:
 I'm not to familiar with the fitting content type, you maybe show me
 a clip of sample code?

public class MyServlet extends HttpServlet{
  public void doGet(HttpServletRequest req, HttpServletResponse resp)
  throws ServletException, java.io.IOException{
byte[] data = getTheFileData(req);
resp.setContentType(image/jpeg);
resp.getOutputStream().write(data);
  }
}

getTheFileData(req) is an imaginary method that is getting the
image-data as byte-array. This can be done by reading it from
a created file (that is deleted after that) or you create the
image dynamically, etc.

I pass req to that method, because in HttpServletRequest
you have all the informations about the request, e.g.
the Cookies, the query-string, pathinfo, etc.

 Does this then return the file as a bytestream
 or something?

More or less. To enable the browser to interpret the byte-
data as image, you have to set the content-type header.

 Also, because this new servlet I will have made will
 only be reference with some servlet mapping in the web.xml file, will
 the still work in hosted mode?

No, you have to add a servlet-path-entry in your project's
gwt.xml-file.

 As for using the RPC servlet, I don't see how doGet solves my
 problem.  How is it fundamentally different form the doPost method
 used the the RPC?

It means, that you can also avoid creating a second servlet but
put in the doGet-method inside your RemoteServiceServlet. Because
a GET-request will lead to the execution of the doGet-method you
don't need to worry that you break something because all the
regular RPC-request are handled by the doPost-method.

But there is no reason, why you don't overwrite doPost as
well. You just have to call super.doPost(...) to let the
RemoteServiceServlet do its job. I use this for example for
file-uploading, i.e. I check if the request is a result of
a started file-upload and - if it's not - call super.doPost.

 And I what I need to know is even if i did use
 either of these methods, on a high level, how does the file get passed
 from the server to the client?

See above.

 I would feel comfortable diving right
 into either these without at least having a vague understanding of
 what was happening.

You can read about the servlet-API (that is used here) e.g.
at http://java.sun.com/products/servlet/2.2/javadoc/
for the low-level-information (aka Javadocs). There are
also tutorials out there, e.g.
http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/


Regards, Lothar

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



ArrayIndexOutOfBoundsException with ant compilation

2008-09-28 Thread Qian Qiao

Hi,

I've run into a very funny problem here, I've got an skeleton project
which I generated with applicationCreator, I then wrote a ant target:

target name=gwt-compile
  java classname=com.google.gwt.dev.GWTCompiler
fork=yes
failonerror=true
classpath=${src};${java.class.path};$
{classpath.compile}
jvmarg value=-Xmx256M /
arg value=-logLevel /
arg value=ALL /
arg value=-out /
arg file=${www} /
arg value=${gwt.module.id} /
  /java
/target

The above target gives me this error:
Exception in thread main java.lang.ArrayIndexOutOfBoundsException:
-2
 [java] at
org.eclipse.jdt.internal.compiler.parser.Parser.concatExpressionLists(Parser.java:
1185)
 [java] at
org.eclipse.jdt.internal.compiler.parser.Parser.consumeDimWithOrWithOutExprs(Parser.java:
2694)
 [java] at
org.eclipse.jdt.internal.compiler.parser.Parser.consumeRule(Parser.java:
5681)
 [java] at
org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:
9020)
 [java] at
org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:
9251)
 [java] at
org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:
9208)
 [java] at
org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:
7864)
 [java] at
org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:
587)
 [java] at
org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:
357)
 [java] at
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:371)
 [java] at
com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:277)
 [java] at
com.google.gwt.dev.javac.JdtCompiler.compile(JdtCompiler.java:193)
 [java] at
com.google.gwt.dev.javac.CompilationState.compile(CompilationState.java:
115)
 [java] at
com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:327)
 [java] at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:
564)
 [java] at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:
554)
 [java] at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:
214)

However, If I compile it with the shellscript generated by
applicationCreator which is basically the same command, it compiles
fine.

I'm probably missing something trivial, but can anybody point me in
the right direction?

Thanks in advance.

-- Joe

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



How to use any external java API in GWT application

2008-09-28 Thread Manish Kumar

Hi,
i am new to this GWT, i searched the net also for my problem but didnt
got any solution.

In my gwt application there is a textbox. i m calling weblogic APIs to
get some value from weblogic server, and i want to put that value in
that gwt textbox. But it seems like it is not possible in gwt..is
it.. !!!
i have put weblogic.jar file in the gwt application classpath.

please help me to do this.


Thanx,
Manish Kumar

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



GWT with struts

2008-09-28 Thread sruj

Hi
we have a project which uses struts 1.2 . and now started using
GWT ..for security we want GWT to call struts action.is it possible?
if so how?

thanks in advance
sruj

--~--~-~--~~~---~--~~
You received 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How Google Moderator (GWT) connect to App Engine?

2008-09-28 Thread Gudgee

or http://code.google.com/p/gae-json-rest/

On Sep 29, 2:05 am, van der maar [EMAIL PROTECTED] wrote:
 maybe it is usinghttp://code.google.com/p/python-gwt-rpc/

 On Sep 26, 7:04 pm, Gudgee [EMAIL PROTECTED] wrote:

  seehttp://moderator.appspot.com
  Do you know how to google developer used?
--~--~-~--~~~---~--~~
You received 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to use any external java API in GWT application

2008-09-28 Thread Kroc

A Gwt application is compiled into javascript and run on client
browser, then it isn't possible to directly call any external java API
(well, you can if that api is also compiled into javascript).

Instead, your GWT application have to call a server service which call
your API. To do that you can use any kind of request (see HTTPRequest
class) but it's by far easier to use a GWT RPC call.

Vincent

On 29 sep, 06:56, Manish Kumar [EMAIL PROTECTED] wrote:
 Hi,
 i am new to this GWT, i searched the net also for my problem but didnt
 got any solution.

 In my gwt application there is a textbox. i m calling weblogic APIs to
 get some value from weblogic server, and i want to put that value in
 that gwt textbox. But it seems like it is not possible in gwt..is
 it.. !!!
 i have put weblogic.jar file in the gwt application classpath.

 please help me to do this.

 Thanx,
 Manish Kumar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Background color for DecoratedTabPanel

2008-09-28 Thread Shri

Hi,
I am not able to change the background color of DecoratedTabPanel tab
baritems. I tried to use background attribute in - .gwt-
DecoratedTabPanel .gwt-TabBarItem but it doesn't work. Please help me
on this issue.

Thanks,
Shridhar
--~--~-~--~~~---~--~~
You received 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



[gwt-contrib] Re: gwt compiler issue in 1.5 branch

2008-09-28 Thread Scott Blum
w00t!

On Sat, Sep 27, 2008 at 8:16 PM, Cameron Braid [EMAIL PROTECTED] wrote:

 Sorry, my mistake.  I had an old jar on the classpath.

 r3683 compiles just fine.

 Thanks for pointing this out.

 Regards

 Cameron



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