Re: DialogBox Width Problem in v.1.6.4

2009-06-15 Thread Dalla

Hi Ed,

Are you building you´re project from a Google Web Application Project?
If this is the case, check your .css in the \war folder. There is a
setting in there which affects the Dialog Box width if I recall
correctly.

On 15 Juni, 05:30, Ed  wrote:
> Hi,
> After upgrading to v.1.6.4 from v.1.5.3 using the GWT plugin for
> Eclipse, the width of my dialog box changed. In the previous version,
> the child widget (absolute panel, width 300) is displayed exactly
> inside the dialog box, but now the right border of the dialog box
> extends about 100px beyond the right border of the child widget and
> overlays the nearby widgets. Without any changes in the code, I find
> this behavior strange.  Anybody has similar experiences? Thanks.
> -Ed
--~--~-~--~~~---~--~~
You received 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: Eclipse is not stopping on breakpoints in GWTTest. Why?

2009-06-15 Thread Paul Robinson

Check your version of the JDK:
http://code.google.com/p/google-web-toolkit/issues/detail?id=3724

Igor Moochnick wrote:
> Can;t figure out why Eclipse (during debug) is not stopping on
> breakpoints both in hosted and web modes.
>
> I've checked that I have all the reqired configuration, all the source
> folders are included on the class path.
>
> Any suggestions?
>
> BTW: Eclipse stopping on all the breakpoints during normal debug of
> the module/project itself.
> >
>
>   

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



OK to host multiple GWT applications/clients on one page?

2009-06-15 Thread peterk

Hey all,

This might seem like an unusual  use-case, but I'm wondering if it is
OK to host multiple, independent GWT applications on a single HTML
page? i.e. to embed two -no-cache.js files from seperate gwt apps in
one page?

I have done a little testing, I have two trivial gwt clients hosted in
a single page at the moment, and they seem to work fine. But will this
hold up with more complex apps, or are their gotchas I should look out
for?

Thanks for any insight!
--~--~-~--~~~---~--~~
You received 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: OK to host multiple GWT applications/clients on one page?

2009-06-15 Thread David

Hi,

There used to be issue in GWT 1.4 but I think those issues have all
been fixed in 1.5.

David

On Mon, Jun 15, 2009 at 9:50 AM, peterk wrote:
>
> Hey all,
>
> This might seem like an unusual  use-case, but I'm wondering if it is
> OK to host multiple, independent GWT applications on a single HTML
> page? i.e. to embed two -no-cache.js files from seperate gwt apps in
> one page?
>
> I have done a little testing, I have two trivial gwt clients hosted in
> a single page at the moment, and they seem to work fine. But will this
> hold up with more complex apps, or are their gotchas I should look out
> for?
>
> Thanks for any insight!
> >
>

--~--~-~--~~~---~--~~
You received 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: history does not work propertly

2009-06-15 Thread Joe Cole

Your doctype has to be set correctly for history to work in IE. What
is your doctype set to?

It should be:


On Jun 15, 2:02 am, Gabriel Gutierrez  wrote:
> Does anyone knows why history does not ork propertly on IE ?
>
> I have this on my .html
>
> 
>
> and on my java code
>
> History.addValueChangeHandler(this);
> String initToken = History.getToken();
> if (initToken.length() == 0) {
>         History.newItem("index");}
>
> History.fireCurrentHistoryState();
>
> So in firefox works fine, but on IE it goes to the server requestiong
> the same page, it should not do that, or at least it shouldn't be so
> obvious, cuz my page goes blank and the it appears again with the new
> changes, how can i avoid this?.
>
> Regards,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Introducing GWTUML, a GWT UML Drawer.

2009-06-15 Thread mounier.flor...@gmail.com

Hello everyone !

I would like to introduce to you the open source project I've been
working on these past 6 months : GWTUML.

This is an UML drawer that uses of course gwt and aims to be a light
and fast one. For now all the code is client side but nothing but time
prevents it to become client-server.

To use it : right-click opens a contextual menu with all sorts of
commands here, [h] brings hotkeys list and double click edits items.

Any comments, suggestions and critics would be really appreciated.
(Sequence diagram is in a very early statge !)

Demo on Google app engine : http://1.latest.gwtuml.appspot.com/GWTUMLDrawer.html

Google code site : http://code.google.com/p/gwtuml/

Greetings.
Florian
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Java 5 enums losing property values

2009-06-15 Thread ped

We are using GWT 1.5.2 and I'm having a problem with a Java 5 enum. In
general, they have worked fine since we upgraded to 1.5.2, but I
recently tried to add a property to one of my enume, and I do not see
the correct value of the property in my GWT code.
I have an enum (OperatingSystemType) that represents an OS with values
like WinXP, Linux, etc... I have a GWT version of this enum called
OperatingSystemTypeGWT. I generate the GWT version from the other
version as the code below shows.

OperatingSystemTypeGWT osTypeGWT =
OperatingSystemTypeGWT.valueOfDisplayValue(operatingSystemType.toString
());
osTypeGWT.setWindows(OperatingSystemType.isWindows
(operatingSystemType));

I log the value of the isWindows boolean before returning it to my GWT
code, and as soon as I receive it in my GWT code. In every case, the
value is correct before I return it, but it is always false (I believe
that's the default value of a boolean) in my GWT code.

I modified the container class that holds the reference to the enum in
the same manner (adding an isWindows property and method) and that
works fine - my GWT code sees the correct value of the boolean. This
leads me to believe that the generated javascript is handling enums
differently than concrete classes.

Any help or insight is appreciated...

Below is (essentially) the enum:

public enum OperatingSystemTypeGWT
implements  com.google.gwt.user.client.rpc.IsSerializable
{
UNKNOWN("Unknown"),
WINDOWS_XP("Windows XP"),
WINDOWS_VISTA("Windows Vista"),
LINUX("Linux");

private boolean propertyisWindows;

public boolean isWindows()
{
return propertyisWindows;
}

public void setWindows(boolean propertyisWindows)
{
 this.propertyisWindows = propertyisWindows;
}

private String displayValue;
private OperatingSystemTypeGWT(String displayValue)
{
this.displayValue = displayValue;
}

@Override
public String toString()
{
return displayValue;
}

public static OperatingSystemTypeGWT valueOfDisplayValue(String
displayValue)
{
for (OperatingSystemTypeGWT type : values())
{
if (type.displayValue.equals(displayValue))
{
return type;
}
}
return null;
}
private static final String[] VALUES = new String[]{UNKNOWN.toString
(), WINDOWS_XP.toString(), WINDOWS_VISTA.toString(), LINUX.toString
()};
}

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



Get local war path programmatically? Or how to read a config file!

2009-06-15 Thread ronald

Hi everybody,

I want my server classes to find out the local path of their war
directory (like "c:\tomcat\webapps\myapp-war\") programmatically.
First of all, this is to get them read a config file, but also to
allow them to write files into subdirectories (like images).

Here's how I got it work in hosted mode:

1: ClassLoader cl = ClassLoader.getSystemClassLoader();
2: configFileURL = cl.getResource("myConfig.properties");
3: props.load(new FileInputStream(new File(configFileURL.getPath(;

The "myConfig.properties" file is inside of the "\myapp-war\WEB-INF
\classes\"  directory.

But as soon as I deploy the war directory to Tomcat, the file won't be
found (line 2 delivers null)
I believe I've tried all of this group's suggestions on this topic, so
I'm really desperate right now :(

Thanks
Ronald

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



sizing ListBoxes inside container

2009-06-15 Thread otismo

I want to create a layout with 3 listboxes that are 20%, 20%, and 60%
of the page height.

I tried:
ui = new VerticalPanel();
ui.setStyleName("test");
ui.setBorderWidth(3);
ui.setHeight("100%");
ui.setWidth("100%");
ListBox box1 = new ListBox();
box1.addItem("item1");
box1.setHeight("20%");
ui.add(box1);
ui.setCellHeight(box1, "20%");
ListBox box2 = new ListBox();
ui.add(box2);
ui.setCellHeight(box2, "20%");
ListBox box3 = new ListBox();
ui.add(box3);
ui.setCellHeight(box3, "60%");

The above code renders a table with the proper sizing, but the list
boxes don't expand to fill their surrounding cells.

I've also tried styling the list boxes with:
.gwt-ListBox {
width: 100%;
height: 100%;
}

The width setting works but not the height.  Is there any way to get
the height setting to work?  I know I can set the visible count on the
list box, but I want the list box to resize dynamically.

What I want can be done with css as follows:


  item 1




  item 2




  item 3



What am I doing wrong?  Thanks for any tips!

Peter

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



Unexpected behviour on server down or violation of same-origin policy in hosted mode

2009-06-15 Thread dikappa

Hi.

I'm testing the http request builder in hosted mode, trying to access
a server that is down or beyond SOP.

When I access a server which is actually down (ie http://localhost:),
or one that is beyond SOP (ie http://www.example.com),
onResponseReceived is fired, and response.getStatusCode() returns 0.

It works as expected in firefox: an exception is thrown and no
onResponseReceived nor onError are fired.

Is this the expected behaviour?

As a side note: I'm doing this on mac, I tried it before on windows
and I'm pretty sure it was working as expected.

Thanks.

Source code:

public class Test_same_origin_policy implements EntryPoint {
public void onModuleLoad() {
final String url = "http://www.example.com/";;
RequestBuilder builder = new RequestBuilder(RequestBuilder.POST,
URL.encode(url));

try {

builder.sendRequest(null, new RequestCallback() {

public void onError(Request request, Throwable 
exception) {

}

   public void onResponseReceived(Request request,
Response response) {

}
  });
}
catch (RequestException e) {
}
}
}


--~--~-~--~~~---~--~~
You received 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 Java-to-JavaScript compiler

2009-06-15 Thread Neeraj Lal
Hi,

Could somebody please give me links/pointers to GWT's Java-JavaScript
compiler?

I'm interested in understanding the Architecture, Front End and BackEnd of
the GWT's Java-to-JavaScript compiler?
How is the language translation done? What does the translation engine work?

Thanks
Neeraj

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



Rpxnow.com and GWT

2009-06-15 Thread joop23

Hello,

how would I integrate using Rpxnow.com with GWT?

thank you.

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



Re: Introducing GWTUML, a GWT UML Drawer.

2009-06-15 Thread walterc

very nice!

On Jun 15, 4:54 pm, "mounier.flor...@gmail.com"
 wrote:
> Hello everyone !
>
> I would like to introduce to you the open source project I've been
> working on these past 6 months : GWTUML.
>
> This is an UML drawer that uses of course gwt and aims to be a light
> and fast one. For now all the code is client side but nothing but time
> prevents it to become client-server.
>
> To use it : right-click opens a contextual menu with all sorts of
> commands here, [h] brings hotkeys list and double click edits items.
>
> Any comments, suggestions and critics would be really appreciated.
> (Sequence diagram is in a very early statge !)
>
> Demo on Google app engine 
> :http://1.latest.gwtuml.appspot.com/GWTUMLDrawer.html
>
> Google code site :http://code.google.com/p/gwtuml/
>
> Greetings.
> Florian
--~--~-~--~~~---~--~~
You received 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: Java 5 enums losing property values

2009-06-15 Thread Paul Robinson

(1) You have an unused private static final VALUES
(2) You don't need to make an enum implement IsSerializable for GWT to
serialize it
(3) Why don't you pass an extra boolean argument to your enum
constructor that says whether it is windows?
(4) Why do you have separate enums for use in GWT and not in GWT? Why
not the same code?
(5) Is it possible your is windows property is getting lost because
nothing calls setWindows() on the enum instances that are used in the
GWT code? I believe enums are serialized by sending the enum name on the
wire and nothing else since enum instances are expected to be immutable.

HTH,
Paul

ped wrote:
> We are using GWT 1.5.2 and I'm having a problem with a Java 5 enum. In
> general, they have worked fine since we upgraded to 1.5.2, but I
> recently tried to add a property to one of my enume, and I do not see
> the correct value of the property in my GWT code.
> I have an enum (OperatingSystemType) that represents an OS with values
> like WinXP, Linux, etc... I have a GWT version of this enum called
> OperatingSystemTypeGWT. I generate the GWT version from the other
> version as the code below shows.
>
> OperatingSystemTypeGWT osTypeGWT =
> OperatingSystemTypeGWT.valueOfDisplayValue(operatingSystemType.toString
> ());
> osTypeGWT.setWindows(OperatingSystemType.isWindows
> (operatingSystemType));
>
> I log the value of the isWindows boolean before returning it to my GWT
> code, and as soon as I receive it in my GWT code. In every case, the
> value is correct before I return it, but it is always false (I believe
> that's the default value of a boolean) in my GWT code.
>
> I modified the container class that holds the reference to the enum in
> the same manner (adding an isWindows property and method) and that
> works fine - my GWT code sees the correct value of the boolean. This
> leads me to believe that the generated javascript is handling enums
> differently than concrete classes.
>
> Any help or insight is appreciated...
>
> Below is (essentially) the enum:
>
> public enum OperatingSystemTypeGWT
>   implements  com.google.gwt.user.client.rpc.IsSerializable
> {
>   UNKNOWN("Unknown"),
>   WINDOWS_XP("Windows XP"),
>   WINDOWS_VISTA("Windows Vista"),
>   LINUX("Linux");
>
>   private boolean propertyisWindows;
>
>   public boolean isWindows()
>   {
>   return propertyisWindows;
>   }
>
>   public void setWindows(boolean propertyisWindows)
>   {
>this.propertyisWindows = propertyisWindows;
>   }
>
>   private String displayValue;
>   private OperatingSystemTypeGWT(String displayValue)
>   {
>   this.displayValue = displayValue;
>   }
>
>   @Override
>   public String toString()
>   {
>   return displayValue;
>   }
>
>   public static OperatingSystemTypeGWT valueOfDisplayValue(String
> displayValue)
>   {
>   for (OperatingSystemTypeGWT type : values())
>   {
>   if (type.displayValue.equals(displayValue))
>   {
>   return type;
>   }
>   }
>   return null;
>   }
>   private static final String[] VALUES = new String[]{UNKNOWN.toString
> (), WINDOWS_XP.toString(), WINDOWS_VISTA.toString(), LINUX.toString
> ()};
> }
>
> >
>
>   

--~--~-~--~~~---~--~~
You received 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: Get local war path programmatically? Or how to read a config file!

2009-06-15 Thread Kousik Rajendran
Hi,

There are two ways to do that.
One is by simply

*File file = new File("");
file.getAbsolutePath();*
in the code where u need will give u the war file path.

Or what u can do is Add a servlet in you program. and while adding it the
web.xml u add a property 1.

override the methidpublic void init() throws ServletException
{
//set the server directory name to a static variable.
SharedConstants.serverDir = *getServletContext().getRealPath(""); *
}

On Sun, Jun 14, 2009 at 10:36 PM, ronald wrote:

>
> Hi everybody,
>
> I want my server classes to find out the local path of their war
> directory (like "c:\tomcat\webapps\myapp-war\") programmatically.
> First of all, this is to get them read a config file, but also to
> allow them to write files into subdirectories (like images).
>
> Here's how I got it work in hosted mode:
>
> 1: ClassLoader cl = ClassLoader.getSystemClassLoader();
> 2: configFileURL = cl.getResource("myConfig.properties");
> 3: props.load(new FileInputStream(new File(configFileURL.getPath(;
>
> The "myConfig.properties" file is inside of the "\myapp-war\WEB-INF
> \classes\"  directory.
>
> But as soon as I deploy the war directory to Tomcat, the file won't be
> found (line 2 delivers null)
> I believe I've tried all of this group's suggestions on this topic, so
> I'm really desperate right now :(
>
> Thanks
> Ronald
>
> >
>


-- 
With Regards,
Kousik Rajendran,
9894136913,
http://www.cybersiddhas.com

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



Thanks

2009-06-15 Thread CALIMERO
Please take in account my request for unsubscription to your group.
Thank you for your services.



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



onModuleLoad is not called when there is an image tag with name "body"

2009-06-15 Thread Arnold

Having an image tag in the host page with its name attribute = "body"
cause the onModuleLoad not to be called.

The module onLoad contains nothing but:
Window.alert("[Empty]");

The host page contains an image tag with name ="body" like so:


This happens in hosted mode (and IE in web mode).

With Firefox and Chrome, the onModuleLoad gets called. But, using the
Web Application Starter Project that create project wizard generates,
the page loads fine, but the "Send" button gets disabled but does
nothing; as if the RPC call never comes back.

Could this be a bug? Or do I miss something trivial?

I am using GWT 1.6.4 on Vista.
--~--~-~--~~~---~--~~
You received 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 implement GWT interfaces in javascript

2009-06-15 Thread iuri matias

--

On Jun 13, 12:59 pm, iuri matias  wrote:
> correction in the code supplied:
>
>  -
>
>  package com.mypackage;
>
>  public interface MyCallback {
>
>       public void onResponseReceived(String text);
>
>  }
>
>  
>
>  package com.mypackage;
>
>  public class MyClass {
>          public static String send(String text,MyCallback callback) {
>                  callback.onResponseReceived(text);
>                  return "";
>          }
>
>          private native void publish() /*-{
>              $wnd.send = @com.mypackage.MyClass::send(Ljava/lang/
> String;com/mypackage/MyCallback;);
>          }-*/;
>
>  }
>
>  
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Wishlist - Data Oriented Grid

2009-06-15 Thread Salvin

I really feel that Gwt should contain a Data-oriented-grid

It should be nothing but a simple table with the following features:

1. Seperate css classes @ header , table cells
2. Sorting of loaded data (pagination may hinder this)
3. Resizing of Columns (maybe use cookies to remember values)
4. Reordering of columns (H i would love this)
5. Filtering of data.
6. Export as a CSV (not sure whether this can be done only @ client or
requires server intervention)
7. Pagination
8. Ability to edit contents.

This is not originally my idea, i got it looking at 
http://www.activewidgets.com/grid/
but i honestly feel that by including such component, the gwt
experience would be better.


Another feature : Resizable container
(A container that can be resized by dragging any of its corners. This
container may/may not be a popup)

I do have a lot of ideas that i can contribute to make GWT a lot
better, I am not that experienced in coding (not yet :) )

Keep up the good work
Salvin Francis

www.salvin.in
--~--~-~--~~~---~--~~
You received 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: Image not appearing for ImgButton in SmartGWT

2009-06-15 Thread abhiram wuntakal
Hi Sanjiv,

  Thanks for that link. I have posted that query at that forum. Please let
me know if u have a solution for that problem of mine.

thanks,
Abhiram

On Sat, Jun 13, 2009 at 9:58 PM, Sanjiv Jivan wrote:

> Hi Abhiram,Please post your question on the SmartGWT forum :
> http://forums.smartclient.com/forumdisplay.php?f=14 along with details /
> relevant code and we'll be happy to assist.
>
> Sanjiv
>
>
> On Sat, Jun 13, 2009 at 10:35 AM, abhiram  wrote:
>
>>
>> Hi all,
>>
>>  Just wanted to know if there is any image type restrictions for the
>> images that we use as Icons for Buttons in ImgButton in SmartGWT?
>>
>>  I am trying a sample project but am not seeing the image on the
>> button.
>>
>> regards,
>> Abhiram
>>
>>
>
> >
>

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



Event Handling in 1.6: set up multiple widgets to listen to a specific event

2009-06-15 Thread mabogie

Hi,

I have the following situation:
Composite Widget A, with somewhere in it's children's children's ...
children a Button z.

Composite widget B, with a composite widget T, instance 1: a
flextable.

Composite widget C, with another instance of composite widget T,
instance 2.

I want T1 an T2 to update when Button z is clicked.

How should I build it?

Thank you in advance!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-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: onModuleLoad is not called when there is an image tag with name "body"

2009-06-15 Thread Thomas Broyer



On 15 juin, 13:29, Arnold  wrote:
> Having an image tag in the host page with its name attribute = "body"
> cause the onModuleLoad not to be called.
>
> The module onLoad contains nothing but:
> Window.alert("[Empty]");
>
> The host page contains an image tag with name ="body" like so:
> 
>
> This happens in hosted mode (and IE in web mode).
>
> With Firefox and Chrome, the onModuleLoad gets called. But, using the
> Web Application Starter Project that create project wizard generates,
> the page loads fine, but the "Send" button gets disabled but does
> nothing; as if the RPC call never comes back.
>
> Could this be a bug? Or do I miss something trivial?
>
> I am using GWT 1.6.4 on Vista.

I believe this is a side-effect of creating named accessors
(properties) on document for any "named" element; i.e. document.body
(the  element of the document) is overwritten/overridden by
document.images.body (the  named "body").

There are similar issues with  and their elements (if you have a
, form.action might return this  instead of
the value of the  attribute).

This is an issue in browsers; GWT can hardly do something against
this.

Eventually, instead of document.body, GWT could use
document.getElementsByTagName("body")[0] but it's far better (imo) to
"fix" your page (which would break many other JS scripts, not just GWT-
generated ones) than to use document.getElementsByTagName instead of
document.body (which could lead to bad results too in some weird
cases:
   var body = document.createElement("body");
   var head = document.getElementsByTagName("head")[0];
   head.appendChild(body);
   // here, I believe (not tested) that document.body hasn't changed,
but document.getElementsByTagName("body") has (document.body suddenly
became the second element of the list)

YMMV
--~--~-~--~~~---~--~~
You received 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: Event Handling in 1.6: set up multiple widgets to listen to a specific event

2009-06-15 Thread Thomas Broyer



On 15 juin, 15:31, mabogie  wrote:
> Hi,
>
> I have the following situation:
> Composite Widget A, with somewhere in it's children's children's ...
> children a Button z.
>
> Composite widget B, with a composite widget T, instance 1: a
> flextable.
>
> Composite widget C, with another instance of composite widget T,
> instance 2.
>
> I want T1 an T2 to update when Button z is clicked.
>
> How should I build it?

Use an event bus ;-)
http://code.google.com/events/io/sessions/GoogleWebToolkitBestPractices.html

(or have your Composite A and/or any of its children's children's ...
children expose an event --ClickEvent, ChangeEvent,
SomeHomeMadeLogicalEvent, etc.-- and have Composite B and Composite C
register a handler on A)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-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: Cross Domain with window.name

2009-06-15 Thread Chris

I quick followup.  It appears the code (modified for IE) works on IE
6.  The trouble I am having is with FireFox 3.0.10.

Does any know if the code should work with FF3?  Is there some
restricted access to window.name on FF?

Thanks,
Chris

On Jun 14, 4:25 am, Chris  wrote:
> I am trying to get a cross domain solution working using Ray
> Cromwell's solution.  Has anyone gotten this to work with GWT 1.6?
> Any samples out there showing how it is supposed to be wired up.
>
> I can't seem to get the post result to be available in the
> application.  When the FormPanel creates the iframe, it is
> automatically setting the window.name of the iframe.  No matter what I
> try (see below) the only value I am getting in my:
> form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler(){
>    public void onSubmitComplete(SubmitCompleteEvent event){
>       Window.alert("return:" + event.getResults());
>    }
>
> });
>
> Is the preset iframe window.name.  Something like FormaPanel_1.
>
> I've tried having the servlet on the cross domain return variations
> of:
> ...
> ...
> ...
>
> Any ideas on what I could be doing wrong?
>
> The two reference articles I have been 
> using:http://timepedia.blogspot.com/2008/07/cross-domain-formpanel-submissi...http://development.lombardi.com/?p=611
>
> Thanks,
> Chris.
>
> My sample code:
>
> public class Zwidget2 implements EntryPoint{
>    FormPanel form;
>    public void onModuleLoad(){
>       final Button sendButton = new Button("Send To Cross Domain");
>
>       RootPanel.get("btn4").add(sendButton);
>
>       class MySendHandler implements ClickHandler{
>          public void onClick(ClickEvent event){
>             if(form != null) {
>                RootPanel.get("form1").remove(form);
>             }
>             form = new FormPanel();
>
>             form.setAction("http://crossdomain.com/zwidget2/greet2";);
>             form.setMethod(FormPanel.METHOD_POST);
>
>             Hidden h = new Hidden();
>             h.setValue(variable());
>             h.setName("inputvalue");
>             form.add(h);
>
>             form.addSubmitHandler(new FormPanel.SubmitHandler(){
>                public void onSubmit(SubmitEvent event){
>                   Window.alert("submit form with value[" + variable()
> + "] to url[" + form.getAction() + "]");
>                }
>             });
>             form.addSubmitCompleteHandler(new
> FormPanel.SubmitCompleteHandler(){
>                public void onSubmitComplete(SubmitCompleteEvent event)
> {
>                   Window.alert("return:" + event.getResults());
>                }
>             });
>
>             RootPanel.get("form1").add(form); //form needs to be
> attached to send
>
>             DeferredCommand.addCommand(new Command(){
>                public void execute(){
>                   Window.alert("submit");
>                   form.submit();
>                }
>             });
>          }
>       }
>
>       sendButton.addClickHandler(new MySendHandler());
>    }
>
>    public native String variable()/*-{
>       return $wnd.__myVariable; //set by another javascript script
>    }-*/;
>
> }
>
>
--~--~-~--~~~---~--~~
You received 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: onModuleLoad is not called when there is an image tag with name "body"

2009-06-15 Thread Arnold

That says it all.

Your last example works ... well, works to illustrate your point by
messing things up.

And  seems to has the same side effect as the
image tag.

Thanks for the enlightenment.

Arnold.

On Jun 15, 5:00 pm, Thomas Broyer  wrote:
> On 15 juin, 13:29, Arnold  wrote:
>
>
>
> > Having an image tag in the host page with its name attribute = "body"
> > cause the onModuleLoad not to be called.
>
> > The module onLoad contains nothing but:
> > Window.alert("[Empty]");
>
> > The host page contains an image tag with name ="body" like so:
> > 
>
> > This happens in hosted mode (and IE in web mode).
>
> > With Firefox and Chrome, the onModuleLoad gets called. But, using the
> > Web Application Starter Project that create project wizard generates,
> > the page loads fine, but the "Send" button gets disabled but does
> > nothing; as if the RPC call never comes back.
>
> > Could this be a bug? Or do I miss something trivial?
>
> > I am using GWT 1.6.4 on Vista.
>
> I believe this is a side-effect of creating named accessors
> (properties) on document for any "named" element; i.e. document.body
> (the  element of the document) is overwritten/overridden by
> document.images.body (the  named "body").
>
> There are similar issues with  and their elements (if you have a
> , form.action might return this  instead of
> the value of the  attribute).
>
> This is an issue in browsers; GWT can hardly do something against
> this.
>
> Eventually, instead of document.body, GWT could use
> document.getElementsByTagName("body")[0] but it's far better (imo) to
> "fix" your page (which would break many other JS scripts, not just GWT-
> generated ones) than to use document.getElementsByTagName instead of
> document.body (which could lead to bad results too in some weird
> cases:
>    var body = document.createElement("body");
>    var head = document.getElementsByTagName("head")[0];
>    head.appendChild(body);
>    // here, I believe (not tested) that document.body hasn't changed,
> but document.getElementsByTagName("body") has (document.body suddenly
> became the second element of the list)
>
> YMMV
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Mouseover/mouseout event on GRID/FLEX TABLE

2009-06-15 Thread ping2ravi

Hi All,
I have a small requirment of highlighting a row of grid when mouseover
it and make it normal when it goes out.
I am not able to implement this. Can anyone help please. all
suggestions will be welcome
I dont want to use GWT-EXT or some other kind of project, as this
project is for Google APP Engine where file limit is just 1000 and
such projects increase the file count a lot.

Thanks in advance.
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: Java 5 enums losing property values

2009-06-15 Thread ped

> (1) You have an unused private static final VALUES
It is used - I didn't show it

> (2) You don't need to make an enum implement IsSerializable for GWT to
> serialize it
Didn't realize that

> (3) Why don't you pass an extra boolean argument to your enum
> constructor that says whether it is windows?
I think that will be the solution...

> (4) Why do you have separate enums for use in GWT and not in GWT? Why
> not the same code?
Historical reasons from GWT pre-1.5 that did not support enums

> (5) Is it possible your is windows property is getting lost because
> nothing calls setWindows() on the enum instances that are used in the
> GWT code? I believe enums are serialized by sending the enum name on the
> wire and nothing else since enum instances are expected to be immutable.
I believe this is the issue - I added this note to try to get
confirmation on my suspicions.

Thanks for your help,


On Jun 15, 5:48 am, Paul Robinson  wrote:
> (1) You have an unused private static final VALUES
> (2) You don't need to make an enum implement IsSerializable for GWT to
> serialize it
> (3) Why don't you pass an extra boolean argument to your enum
> constructor that says whether it is windows?
> (4) Why do you have separate enums for use in GWT and not in GWT? Why
> not the same code?
> (5) Is it possible your is windows property is getting lost because
> nothing calls setWindows() on the enum instances that are used in the
> GWT code? I believe enums are serialized by sending the enum name on the
> wire and nothing else since enum instances are expected to be immutable.
>
> HTH,
> Paul
>
> ped wrote:
> > We are using GWT 1.5.2 and I'm having a problem with a Java 5 enum. In
> > general, they have worked fine since we upgraded to 1.5.2, but I
> > recently tried to add a property to one of my enume, and I do not see
> > the correct value of the property in my GWT code.
> > I have an enum (OperatingSystemType) that represents an OS with values
> > like WinXP, Linux, etc... I have a GWT version of this enum called
> > OperatingSystemTypeGWT. I generate the GWT version from the other
> > version as the code below shows.
>
> >         OperatingSystemTypeGWT osTypeGWT =
> > OperatingSystemTypeGWT.valueOfDisplayValue(operatingSystemType.toString
> > ());
> >         osTypeGWT.setWindows(OperatingSystemType.isWindows
> > (operatingSystemType));
>
> > I log the value of the isWindows boolean before returning it to my GWT
> > code, and as soon as I receive it in my GWT code. In every case, the
> > value is correct before I return it, but it is always false (I believe
> > that's the default value of a boolean) in my GWT code.
>
> > I modified the container class that holds the reference to the enum in
> > the same manner (adding an isWindows property and method) and that
> > works fine - my GWT code sees the correct value of the boolean. This
> > leads me to believe that the generated javascript is handling enums
> > differently than concrete classes.
>
> > Any help or insight is appreciated...
>
> > Below is (essentially) the enum:
>
> > public enum OperatingSystemTypeGWT
> >    implements  com.google.gwt.user.client.rpc.IsSerializable
> > {
> >    UNKNOWN("Unknown"),
> >    WINDOWS_XP("Windows XP"),
> >    WINDOWS_VISTA("Windows Vista"),
> >    LINUX("Linux");
>
> >    private boolean propertyisWindows;
>
> >    public boolean isWindows()
> >    {
> >            return propertyisWindows;
> >    }
>
> >    public void setWindows(boolean propertyisWindows)
> >    {
> >             this.propertyisWindows = propertyisWindows;
> >    }
>
> >    private String displayValue;
> >    private OperatingSystemTypeGWT(String displayValue)
> >    {
> >            this.displayValue = displayValue;
> >    }
>
> >   �...@override
> >    public String toString()
> >    {
> >            return displayValue;
> >    }
>
> >    public static OperatingSystemTypeGWT valueOfDisplayValue(String
> > displayValue)
> >    {
> >            for (OperatingSystemTypeGWT type : values())
> >            {
> >                    if (type.displayValue.equals(displayValue))
> >                    {
> >                            return type;
> >                    }
> >            }
> >            return null;
> >    }
> >    private static final String[] VALUES = new String[]{UNKNOWN.toString
> > (), WINDOWS_XP.toString(), WINDOWS_VISTA.toString(), LINUX.toString
> > ()};
> > }
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Overriding default CurrencyData.properties in GWT 1.5

2009-06-15 Thread StephenSmith

Hi all

I'm trying to internationalise monetary values in GWT 1.5, and am
struggling with overriding currency symbols in the default locale.

For example, in CurrencyData.properties (which I assume is the file
used by the default locale - or does it use the hardcoded JavaScript
in the CurrencyList java file by default) the UK currency symbol is
defined as "UK£". I want to use "£" instead.

After reading the GWT I18N guide at
http://code.google.com/webtoolkit/doc/1.6/DevGuideI18nAndA11y.html#DevGuideStaticStringInternationalization,
I have added the following to my module XML file:



And I have created a file called CurrencyData_en.properties in the
same directory as my module XML file containing:

GBP = GBP|£

This solution doesn't work, but I'm not sure why. Is it because I have
put my CurrencyData_en.properties file in the wrong directory? If so,
where should it be located? Or is my solution entirely wrong? The GWT
I18N docs don't seem to mention how to override existing I18N
properties...

Searching through the GWT Group archive, I see that Jose asked a very
similar question on 13th Nov 2008 (http://groups.google.com/group/
Google-Web-Toolkit/browse_thread/thread/1a26c4ad93de622/
e2cf6abad54df4fb?lnk=gst&q=currencydata#e2cf6abad54df4fb), but it
doesn't seem as though anyone answered his question.

Thanks in advance

Stephen Smith

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



RPC MySQL problem

2009-06-15 Thread Roger

Hello everyone,

I am trying to connect a MySQL database to a simple GWT application. I
build a simple application from scratch using the eclipse plugin. This
application runs correctly.

I changed the GreetingServiceImpl.java file as follow. And there is no
way to run it correctly. Following the code you can find a copie from
the console output.

I run a copy of this class outside GWT, and it runs correctly.
Directly with java command line and within eclipse.

The library mysql-connector-java-5.1.7-bin.jar is in the classpath and
in the reference libraries of the eclipse project.

package test.server;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import test.client.GreetingService;
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(String input) {
testConnection();
String serverInfo = getServletContext().getServerInfo();
String userAgent = 
getThreadLocalRequest().getHeader("User-Agent");
return "Hello, " + input + "!I am running " + serverInfo
+ ".It looks like you are using:" + 
userAgent;

}
private void testConnection() {

Connection conn = null;
Statement stmt = null;
ResultSet rs = null;

try {

/*  Register the driver
The following Class.forName() statement is not necessary if 
using
Java SE 6 (1.6) or later */

Class.forName("com.mysql.jdbc.Driver").newInstance();

try {

/* Get a connection to the database */
conn = DriverManager.getConnection("jdbc:mysql://
localhost:3306/testbase?" + "user=usertestbase&password=pass");

try {

stmt = conn.createStatement();

/* Execute the query */
rs = stmt.executeQuery("SELECT * FROM table1");

/* The following 3 lines are for finding out the
size of the result set */
rs.last();
int rowCount = rs.getRow();
rs.beforeFirst();

System.out.println("Retrieved " + rowCount + " row
(s).\n");

System.out.println("CityName\n");

/* Retrieve the data from the result set */
while (rs.next()) {
String name = rs.getString("name");
System.out.println(name);
}

} finally {
/* Release the resources */
if (rs != null) {
try {
rs.close();
} catch (SQLException sqlEx) {
   System.out.println("SQLException: " +
sqlEx.getMessage());
}
rs = null;
}

if (stmt != null) {
try {
stmt.close();
} catch (SQLException sqlEx) {
   System.out.println("SQLException: " +
sqlEx.getMessage());
}

stmt = null;
}

if (conn != null) {
try {
conn.close();
} catch (SQLException sqlEx) {
   // Ignore
}

conn = null;
}

}

} catch (SQLException ex) {
System.out.println("SQLException: " + ex.getMessage
());
System.out.println("SQLState: " + ex.getSQLState());
System.out.println("VendorError: " + ex.getErrorCode
());
}

} catch (Exception ex) {
System.out.println("Exception: " + ex.getMessage
());
}

}
}

The server is running at http://localhost:8080/
15 juin 2009 12:09:06
com.google.appengine.tools.development.ApiProxyLocalImpl log
SEVERE: [1245067746141000] javax.servlet.ServletContext log: Exception
while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract java.lang.String
test.client.GreetingService.greetServer(java.lang.String)' threw an
unexpected exception: java.lang.ExceptionInInitializerError
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
(RemoteServi

Re: Mouseover/mouseout event on GRID/FLEX TABLE

2009-06-15 Thread Hiedi

This is basically how I did it:

1) Create a RowListener interface
2) Create a RowListenerCollection
3) Create an implementation of RowListener
4) Add your rowListener to the table you care about -- the table
should know what its styles are and have a contract for hovering and
resetting its own styles that the rowListener can call -- that way you
can use the same listeners every where but the styles are controlled
by your dataTable.
5) Lastly -- your table needs to implement onBrowserEvent and figure
out what row its supposed to be acting on.


import java.util.EventListener;

public interface RowListener extends EventListener {

void onMouseLeave(int row);

void onMouseEnter(int row);

void onMouseOver(int row);

}


import java.util.ArrayList;

public class RowListenerCollection extends ArrayList {

private static final long serialVersionUID = 1L;


public void fireMouseEnterEvent(int row) {
for (RowListener listener : this) {
listener.onMouseEnter(row);
}
}

public void fireMouseOverEvent(int row) {
for (RowListener listener : this) {
listener.onMouseOver(row);
}
}

public void fireMouseLeaveEvent(int row) {
for (RowListener listener : this) {
listener.onMouseLeave(row);
}
}

}

import com.google.gwt.user.client.ui.SourcesTableEvents;
import com.google.gwt.user.client.ui.TableListener;

public class RowHighlighter implements TableListener, RowListener {

private DataTable table = null;

public RowHighlighter(DataTable table) {

this.table = table;
}

public void onCellClicked(SourcesTableEvents sender, int row, int
cell) {

if (sender == table) {
table.selectRow(row);
}
}

public void onMouseEnter(int row) {

if (table.getLastSelectedRow() != row) {
table.hoverRow(row);
}

}

public void onMouseLeave(int row) {
if (table.getLastSelectedRow() != row) {
table.resetRowStyle(row);
}

}

public void onMouseOver(int row) {
// TODO Auto-generated method stub

}

}


mport com.google.gwt.user.client.ui.Widget;

public interface DataTable {

public abstract void highlightRow(int row);

public abstract void hoverRow(int row);

public abstract void resetRowStyle(int row);

public abstract void resetTableStyle();

public abstract int getLastSelectedRow();

public abstract void setLastSelectedRow(int row);

public abstract int getRowCount();

public abstract int getCellCount(int row);

public abstract Widget getWidget(int row, int col);

public abstract void selectRow(int row);

}



public void onBrowserEvent(Event event) {

// Find out which row.
Element td = getEventTargetCell(event);
if (td == null) {
return;
}
Element tr = DOM.getParent
((com.google.gwt.user.client.Element) td);
Element body = DOM.getParent(tr);
int row = DOM.getChildIndex(body, tr);

switch (DOM.eventGetType(event)) {

case Event.ONMOUSEOVER:
// Only fire the mouseEnter event if it's coming from
outside this
// widget.
Element from = DOM.eventGetFromElement(event);
if (from == null || !DOM.isOrHasChild(tr, from)) {
rowListeners.fireMouseEnterEvent(row);
}
break;
case Event.ONMOUSEOUT:
// Only fire the mouseLeave event if it's actually leaving
this
// widget.
Element to = DOM.eventGetToElement(event);
if (to == null || !DOM.isOrHasChild(tr, to)) {
rowListeners.fireMouseLeaveEvent(row);
}
break;

default: {
// Do nothing
}

super.onBrowserEvent(event);
}
}

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



Minor error in GWT toolkit documentation

2009-06-15 Thread arcy

In http://code.google.com/webtoolkit/doc/1.6/DevGuideServerCommunication.html
there is an explanation of the basic RPC mechanisms, which I
appreciate.  At one point, however, it says that an application's
service implementation will extend "RemoteServletServelet"; I'm pretty
sure it means "RemoteServiceServlet".

This is no big deal, but if someone could correct it, it might save a
few hours of heartburn for some newbie struggling through all the
classes and interfaces one has to get familiar with to do this sort of
thing.

The docs are great!  If there a link to use for sending such
correction suggestions, I'd happily use it instead of the forums...

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



Images won't load from full pathname in FireFox

2009-06-15 Thread Steven

The example code below works for IE but not FireFox. (I'm using GWT
1.6.4).  Is there a consistent, programatic way I can load image files
with URI pathnames into FireFox and IE? (My application involves
manipulating images).

public void onModuleLoad() {

Image image = new Image("file:///squirlSaber.jpg");
RootPanel.get("imageView").add(image);

}

Kind Regards,
Steven

--~--~-~--~~~---~--~~
You received 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: Eclipse - debugging gwt app

2009-06-15 Thread Alex

I had the same problem with breakpoints in Eclipse debugging GWT
application.

In my case, it was definitely problem with JDK 1.6.0_14. When I
switched to 1.6.0_11 everything was fine and my breakpoints weren't
ignored anymore.

--~--~-~--~~~---~--~~
You received 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: Images won't load from full pathname in FireFox

2009-06-15 Thread Rajneesh Aggarwal
Why don't you try ImageBundle?
http://code.google.com/p/google-web-toolkit/wiki/ImageBundleDesign

Thanks,
Rajneesh

On Mon, Jun 15, 2009 at 10:19 PM, Steven  wrote:

>
> The example code below works for IE but not FireFox. (I'm using GWT
> 1.6.4).  Is there a consistent, programatic way I can load image files
> with URI pathnames into FireFox and IE? (My application involves
> manipulating images).
>
>public void onModuleLoad() {
>
>Image image = new Image("file:///squirlSaber.jpg");
>RootPanel.get("imageView").add(image);
>
>}
>
> Kind Regards,
> Steven
>
> >
>

--~--~-~--~~~---~--~~
You received 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+ Gmaps doesnt work in firefox

2009-06-15 Thread G

Never mind. I was able to resolve the issue.
The problem was in the hosted browser response.getText() corresponds
to response.getText().trim() where in IE, Firefox, Safari etc it
doesn't do trim.

My app now works like a charm.



On Jun 14, 9:03 pm, G  wrote:
> Eric -
>
> Thanks for your quick response (that too on a Sunday) :-)
> I was now able to locate where it is causing exception in firefox but
> not in hosted mode.
>
> I am using the RequestBuilder class to create the POST request to
> another servlet and parse the response. The problem is in the hosted
> mode, when (in the snippet below) onResponseReceived() gets called and
> the getStatusCode is 200, the response.getStatusText() is "OK" in case
> of firefox and IE instead of actual data which I see in the hosted
> mode.
>
> Any thoughts ??
>
> RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url);
>
>                 try {
>                         Request request = builder.sendRequest(null, new 
> RequestCallback() {
>                                 public void onError(Request request, 
> Throwable exception) {
>                                         Window.alert("Couldn't retrieve 
> data");
>                                 }
>
>                                 public void onResponseReceived(Request 
> request,
>                                                 Response response) {
>                                         if (200 == response.getStatusCode()) {
>                                                 // 
> Window.alert(response.getText());
>                                                 try {
>                                                         // to some processing
>                                                 }
>                                                 catch (Exception ex) {
>                                                         
> Window.alert("Exception in retrieving data ("+
> response.getStatusText() + ")");
>                                                 }
>
>                                         } else {
>                                                 Window.alert("Couldn't 
> retrieve data ("
>                                                                 + 
> response.getStatusText() + ")");
>                                         }
>                                 }
>                         });
>                 } catch (RequestException e) {
>                 }
>
> On Jun 14, 8:43 pm, Eric Ayers  wrote:
>
> > Hosted mode catches most but not all errors.  The best thing to do is
> > to try to narrow down the error.  Try adding try/catch blocks around
> > the code to help isolate it.
>
> > On Sun, Jun 14, 2009 at 9:22 PM, G wrote:
>
> > > Hello -
>
> > > I am using GWT 1.5.3 and Gwt-maps1.0.4. My apps works perfectly fine
> > > in the hosted mode (when launched from GetMap-shell.cmd). But, when I
> > > click on "Compile & Browse", it opens up in firefox doesn't work.
>
> > > My application sets the marker position at regular intervals
> > > (depending on current lat/lon information). It thus calls google-maps
> > > api at regular intervals. In hosted mode its perfect but in firefox it
> > > seems it is not making *ANY* calls to google (I checked with firebug).
>
> > > Also, I have Tomcat 6.0 and tried to deploy my app. on that. Tomcat is
> > > running on port 8080.
>
> > > When I launch the hosted browser and point to my app. deployed on
> > > tomcat (@ 8080), it works perfectly fine but from firefox doesn't.
>
> > > It thus seems to be related to browser but I just cant figure out
> > > where and dont know how...
>
> > > I dont get any error on Firefox / Opera. But on IE 6 I see the
> > > following:
>
> > > Line:260
> > > Char:83
> > > Error: Exception thrown and not caught
> > > Code: 0
> > > URL:http://localhost:8080/GetMap/3D95..3317.cache.html
>
> > --
> > 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
-~--~~~~--~~--~--~---



Integrate GWT 1.6 into Struts 2.x

2009-06-15 Thread Kady

How do I integrate a GWT 1.6 module created(in eclipse) into a Struts
2.1 application? In other words, I want to integrate the war directory
created by the GWT module into the struts structure. So how do I place
the files and do the necessary edits?

Thank you,
Kaushik
--~--~-~--~~~---~--~~
You received 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: Images won't load from full pathname in FireFox

2009-06-15 Thread Steven

On Jun 15, 1:02 pm, Rajneesh Aggarwal 
wrote:
> Why don't you try ImageBundle?

Thanks for your quick reply. The end user dynamically queries for
these images (they don't exist at startup time, so compile-time
bundling won't work). Any other ideas would be greatly appreciated.

Thanks,
Steven
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Jumping screens

2009-06-15 Thread Erron

Hi,

I've been looking into this issue for some time and still haven't
found the cause.  We have a financial application that displays a
listing of accounts on one screen. When the user clicks on a link, it
displays a hidden tab with the detailed information for that account.
The problem is that when they click on the link (example link,
myapp.html#transHistory_E2) , the page scrolls down slightly, enough
to hide the header of the site. BTW, this appears to be an IE only
issue

My first suspect was the history token was the same as an anchor on
the page, but I have not found any case of this.


Any other ideas?



--~--~-~--~~~---~--~~
You received 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: MVC question

2009-06-15 Thread Dalla

Any MVC / GWT experts out there? :-)

On 14 Juni, 14:09, Dalla  wrote:
> Hi all!
>
> I´ve been working pretty much with MVC in Struts 2, but it´s a pretty
> different story using MVC, so I have a question.
>
> From what I´ve read, It´s pretty much:
>
> On user input, View calls Controller.
> Controller updates Model.
> Model fires event, which is observed by the View. View updates based
> on fired events.
>
> I´m wondering if it´s possible for the View to update itself without
> breaking the MVC pattern?
>
> For example, let´s say that I have a composite Widget containing a
> FlexTable inside a scrollpanel, with a list of objects, showing just
> one or two properties for each object.
> When the user clicks on a row in the flex table, I want to show a
> dialog box containing all the details about the clicked object.
>
> In this case there would be no reason to update the model now would
> there? So there would be no reason to call the controller?
> Would it be OK to let my flex table implement the HasSelectionHandlers
> interface and have the widget implement SelectionHandler,
> telling the widget to show a dialog box when the SelectionEvent is
> fired?
>
> Or would this be breaking the MVC pattern?
--~--~-~--~~~---~--~~
You received 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: OK to host multiple GWT applications/clients on one page?

2009-06-15 Thread peterk

Cheers David. I'll take it that it's OK :)

Thanks,

On Jun 15, 9:00 am, David  wrote:
> Hi,
>
> There used to be issue in GWT 1.4 but I think those issues have all
> been fixed in 1.5.
>
> David
>
> On Mon, Jun 15, 2009 at 9:50 AM, peterk wrote:
>
> > Hey all,
>
> > This might seem like an unusual  use-case, but I'm wondering if it is
> > OK to host multiple, independent GWT applications on a single HTML
> > page? i.e. to embed two -no-cache.js files from seperate gwt apps in
> > one page?
>
> > I have done a little testing, I have two trivial gwt clients hosted in
> > a single page at the moment, and they seem to work fine. But will this
> > hold up with more complex apps, or are their gotchas I should look out
> > for?
>
> > Thanks for any insight!
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Common GWT Modules In JAR File Problems.

2009-06-15 Thread gazarcher

Hello All,

I had a largish Web app with several GWT modules in different
packages.  These modules shared common code which I put into a
separate module, also in it's own package.  As simple as I can
describe it, it looked a bit like this:

// Modules specific to the app:

MyPackage.MyApp.GWTModuleA
MyPackage.MyApp.GWTModuleB
MyPackage.MyApp.GWTModuleC

// A common module that could be used in other apps:

MyPackage.common.GWTModuleD

// Common module containing code and resources used by any GWT module:

MyPackage.common.gwt.Common

Each of these modules contained their own module XML file (of course),
CSS file, HTML file and images.  Each module, even the Common one, had
it's own entry point.  Each module defined at least one servlet --
which were all also configured in the app's web.xml file.

The Common module included an entry for .

All of the modules, A through D, inherited the Common module.  For
example, GWTModuleA could use styles defined in Common's common.css
file, as well as inheriting widget classes.

When I complied everything (using IntelliJ IDEA), the output from
compiling normal Java source into class files and compiling GWT Java
source into JavaScript all were put into one folder where a WAR file
was also built.  The relevant folders in the output were:

// Normal class files into the usual places:

WEB-INF/classes/MyPackage.MyApp.SubPackageA/*.class
WEB-INF/classes/MyPackage.MyApp.SubPackageB/*.class
etc.

// GWT JavaScript and resource files:

MyPackage.MyApp.GWTModuleA/*.js
MyPackage.MyApp.GWTModuleA/*.rpc
MyPackage.MyApp.GWTModuleA/*.png
MyPackage.MyApp.GWTModuleA/images/ -- From the Common module
MyPackage.MyApp.GWTModuleA/common.css -- From the Common module
MyPackage.MyApp.GWTModuleA/GWTModuleA.css
MyPackage.MyApp.GWTModuleA/GWTModuleA.html

(and similarly for modules B, C and D *and* Common)

This all went together very nicely and worked and SO FAR SO GOOD!

Then I proceeded to break it :-)

I wanted to put my Common module into it's own JAR file so that my Web
app and other Web apps we are developing could use it.  Here's what I
did (amongst several things that didn't work, and trying to cut the
long story short...):

1) I created a new "Common" Intellij IDEA project and moved my common
modules, MyPackage.common.GWTModuleD and MyPackage.common.gwt.Common,
from my Web app project into it.

2) In the "Common" project, I compiled everything.  The normal Java
class files went into their respective folders, i.e.:

// Regular Java classes:

MyPackage/common/SubPackageA/*.class
MyPackage/common/SubPackageB/*.class

// GWT modules, their classes and resources, i.e., CSS, HTML, etc. and
the module XML file:

MyPackage.common.GWTModuleD/*
MyPackage.common.gwt.Common/*

and GWT's JavaScript output, all went into a separate folder (let's
say I don't need this for now).

NOTE: During the compilation of the GWT class files, I was *also*
careful to copy their Java source files into the same folders (a
requirement when building JAR files for shared GWT modules).

3) I created a JAR file from the classes, sources and resource files
in step #2.

4) I imported this new JAR file into my original Web app project, now
sans all the common code I moved into the new "Common" project.

5) I successfully compiled my Web app project and deployed the
resulting WAR file as before.

The Web app appeared to work, *except* in my GWT modules, that used
common code before, were all missing the styling and images from my
Common module.  Also, the GWTModuleD common module was not there at
all.

So, what did I do wrong? What am I missing?  Here are my assumptions,
of which some are presumably totally incorrect:

a) When I compiled my Web app project with my Common GWT JAR file, GWT
found the class files in the JAR and so any widgets I built in the Web
app were inheriting the functionality of the common widget code.  This
did appear to happen without problem.

b) When GWT was compiling my Web app GWT modules, it was using the
source files to create the JavaScript files under their
MyPackage.MyApp.GWTModule[ABC] folders, copying any resource files
from their original location in the project.  This also appeared to
occur without a problem.

c) When GWT was compiling my Web app GWT modules in the project I
thought it should have seen they were inheriting my
MyPackage.common.gwt.Common module in the imported JAR file.  I
thought it should have taken the source files from the JAR to create
the JavaScript and copy the resource files from the JAR into a
MyPackage.common.gwt.Common folder *and* copy files like CSS and
images into the MyPackage.MyApp.GWTModule[ABC] folders of modules
inheriting the Common module.  This DID NOT happen.

d) More problematic, perhaps, is that MyPackage.common.GWTModuleD was
totally ignored, because I had no way of telling GWT to extract it's
source and resource files from the JAR file to create the
MyPackage.common.GWTModuleD folder with it's JavaScript and associated
resource files.  The only 

Gwt Linker - onLoad and how to use gwt in the host page

2009-06-15 Thread pmonestie

Hi,
I often export some of my gwt code as a Javascript library (using
timepedia exporter) so that my host page can use it as a 'simple' Js
library.
In the past I had issues waiting for the gwt module to load and I
always ended up writing a loop using setTimeout to wait for my gwt
module to startup.
Something like:
var loadCallbacks=[];
document.onload=gwtWait();
  function gwtWait(){
   if (typeof my_module== "undefined"){
setTimeout("gwtWait()", 500);
return;
   }
   for (i=0;ihttp://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



getInteger problem when trying to run hosted mode.

2009-06-15 Thread Joel Paulsson

Hi!

I run gwt as a plug-in to Eclipse and i have no errors in Eclipse, but
when i run the program to hosted mode i get this error in the
AppEngine Server:

[ERROR] Line 53: The method getInteger(String) is undefined for the
type Integer

If i comment that line it works great, but using getInteger is pretty
vital for me in this application so i need it to work. Can anyone help
me understand why i get this error when i don't have any compilation
errors and maybe find a soloution?

/Joel

--~--~-~--~~~---~--~~
You received 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: Wishlist - Data Oriented Grid

2009-06-15 Thread Suri

Hi Salvin,
Is this what you're looking for?
http://code.google.com/docreader/#p=google-web-toolkit-incubator&s=google-web-toolkit-incubator&t=PagingScrollTable

Its one of the products currently in the google-incubator code. I
actually used it to support a module of a project I had recently
worked on. It has a slight learning curve but once you get the hang of
it, it looks to be very powerful. I would reccomend it over many other
off the shelf products there e.g. ext-js because
1) its easier to understand (at least for me, i still don't think i
would understand what ext-js was doing with their grids)
2) you're dealing mostly with Java code and so less of the JS
headache
3) the CSS and all is entirely customizable by us and I also went and
extended a bit of the incubator classes to help my case. e.g. I did
not like that the pagination images were a bundle and preferred if
they were left separate, also making the job of my graphic designed
easy, so I went ahead and extended the functionality to overwrite the
images, and it did not seem difficult either.

I hope this becomes a standard widget soon. I'm sure many more people
would really appreciate its strength.

They do not have the export functionality yet but other than that, I
think almost all your wish list has been covered? :)

Suri

On Jun 15, 8:20 am, Salvin  wrote:
> I really feel that Gwt should contain a Data-oriented-grid
>
> It should be nothing but a simple table with the following features:
>
> 1. Seperate css classes @ header , table cells
> 2. Sorting of loaded data (pagination may hinder this)
> 3. Resizing of Columns (maybe use cookies to remember values)
> 4. Reordering of columns (H i would love this)
> 5. Filtering of data.
> 6. Export as a CSV (not sure whether this can be done only @ client or
> requires server intervention)
> 7. Pagination
> 8. Ability to edit contents.
>
> This is not originally my idea, i got it looking 
> athttp://www.activewidgets.com/grid/
> but i honestly feel that by including such component, the gwt
> experience would be better.
>
> Another feature : Resizable container
> (A container that can be resized by dragging any of its corners. This
> container may/may not be a popup)
>
> I do have a lot of ideas that i can contribute to make GWT a lot
> better, I am not that experienced in coding (not yet :) )
>
> Keep up the good work
> Salvin Francis
>
> www.salvin.in

--~--~-~--~~~---~--~~
You received 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: Images won't load from full pathname in FireFox

2009-06-15 Thread Steven

BTW, after an image query I'm getting the image's URI and was planning
to load the image file directly into the brower. Alternatively I can
load it into a servlet and use GWT RCP to move it into the browser.
The image files are 100K and up. Would using the servlet like this be
generally advisable over loading directly into the browser?
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Rocket-gwt Viewport alternative

2009-06-15 Thread lhoracek

Is there any alternative to the Viewport widget from rocket-gwt
package working with 1.6? I need loading of tiles of custom map, the
best would be with overlay or something working like that, no need for
zoor, just showing tiled image

--~--~-~--~~~---~--~~
You received 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: Jumping screens

2009-06-15 Thread flyingb...@gmail.com

screen jumps lot of time is the case of hidden boxes. I had jumping
screen problem and set tons of styles of hidden value to prevent it..

On Jun 15, 1:27 pm, Erron  wrote:
> Hi,
>
> I've been looking into this issue for some time and still haven't
> found the cause.  We have a financial application that displays a
> listing of accounts on one screen. When the user clicks on a link, it
> displays a hidden tab with the detailed information for that account.
> The problem is that when they click on the link (example link,
> myapp.html#transHistory_E2) , the page scrolls down slightly, enough
> to hide the header of the site. BTW, this appears to be an IE only
> issue
>
> My first suspect was the history token was the same as an anchor on
> the page, but I have not found any case of this.
>
> Any other ideas?
--~--~-~--~~~---~--~~
You received 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: Reference to interface in another project

2009-06-15 Thread bdemchak

Hi, Isaac and Rajeev and everyone else ...

I got a good result by following this advice, though with a few bumps.
I'm posting a (hopefully) good accounting here so that this post can
be helpful to others.

As originally described, I was trying to create a project that
contains common constants in a .java file. I expected other projects
to "import static ..." to get to the constants.

To do this, I created a GWT project and then adjusted it. I added a
 directive to the Definitions.gwt.xml file, and I removed
unneeded client, server, and Public directories. As a result, my
Definitions project directory and the referencing project looks as
show below.

PALMS_Definitions
   +bin
   +src
   +org
   +paceproject
   +palms
   +definitions
   +schema
ClassDefinitions.java
Definitions.gwt.xml
.classpath
.project

The ClassDefinitions.java file contains the common constants.

The Definitions.gwt.xml file contains:





I assume that the gwt-user.jar is already available to the project via
the .classpath file.

For completeness, my .classpath file has:








My .project file has:


PALMS_Definitions





com.swtdesigner.gwt.GWTBuilder




org.eclipse.jdt.core.javabuilder





org.eclipse.jdt.core.javanature
com.swtdesigner.gwt.GWTNature



As for the project that references this project, the Projects tab in
the Build Path dialog most have PALMS_Definitions added in.

Once all of this is true (and, maybe, the projects are all rebuilt),
there should be no more source errors deriving from the GWT
compilation.


On Jun 7, 11:52 am, Rajeev Dayal  wrote:
> Hi Barry,
> Issac is correct. Please try out his approach, and post back on this thread
> if you have any other questions or problems.
>
> Rajeev
>
> On Fri, Jun 5, 2009 at 5:03 PM, Isaac Truett  wrote:
> > Everything you use on the client has to be part of a GWT module. Just
> > create a module definition (*.gwt.xml) with  pointing to your
> > interfaces. Inherit that module in your app, and you're set.
>
> > On Tue, Jun 2, 2009 at 5:04 PM, Barry  wrote:
>
> >> Hi --
>
> >> I have seen a lot of posts referring to variants of this problem, but
> >> haven't seen a resolution to this specific situation ... and I'm
> >> afraid I'm not making headway. This seems very simple, but if I can't
> >> do it, please let me know.
>
> >> I'm running Eclipse 3.4.2 with GWT 1.5.2. I have a perfectly fine GWT
> >> project that I'd like to have reference constants defined in an
> >> Interface in another project (which itself contains only Interfaces).
> >> Eclipse seems fine with this, as long as I use Build Path to identify
> >> the external project in the Projects tab.
>
> >> GWT, though, gives the error
> >> "org.paceproject.palms.schema.XSDDefinitions can not be found in
> >> source packages. 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."
>
> >> From other posts, it seems like GWT is trying to tell me it's going to
> >> have trouble loading the external project at runtime.
>
> >> All I'm using this external project for is to provide definitions
> >> common to all of my applications (including my GWT application).
>
> >> Is there a particular way I should be defining my external project
> >> (i.e., the one that contains
> >> org.paceproject.palms.schema.XSDDefinitions)? Or is there something
> >> particular I should be doing to my GWT project's gwt.xml file??
>
> >> Or should I be trying to import symbols common to multiple projects in
> >> a completely different way??
>
> >> Thanks for any help/advice you can give me.
>
> >> (FYI, the offending import in my GWT project is import static
> >> org.paceproject.palms.schema.XSDDefinitions.*; and the Interface in
> >> the external project is
>
> >> package org.paceproject.palms.schema;
>
> >> public interface XSDDefinitions {
>
> >>        public static final String XSD_String = "xsd:string";
> >> }
--~--~-~--~~~---~--~~
You received 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: Mouseover/mouseout event on GRID/FLEX TABLE

2009-06-15 Thread Kelo

Heidi,

   Your code was based on old event's model, you should write this one
on 1.6.4. Check this out 
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/0b3158d9e7e2d21a#

On 15 jun, 14:24, Hiedi  wrote:
> This is basically how I did it:
>
> 1) Create a RowListener interface
> 2) Create a RowListenerCollection
> 3) Create an implementation of RowListener
> 4) Add your rowListener to the table you care about -- the table
> should know what its styles are and have a contract for hovering and
> resetting its own styles that the rowListener can call -- that way you
> can use the same listeners every where but the styles are controlled
> by your dataTable.
> 5) Lastly -- your table needs to implement onBrowserEvent and figure
> out what row its supposed to be acting on.
>
> import java.util.EventListener;
>
> public interface RowListener extends EventListener {
>
>     void onMouseLeave(int row);
>
>     void onMouseEnter(int row);
>
>     void onMouseOver(int row);
>
> }
>
> import java.util.ArrayList;
>
> public class RowListenerCollection extends ArrayList {
>
>     private static final long serialVersionUID = 1L;
>
>     public void fireMouseEnterEvent(int row) {
>         for (RowListener listener : this) {
>             listener.onMouseEnter(row);
>         }
>     }
>
>     public void fireMouseOverEvent(int row) {
>         for (RowListener listener : this) {
>             listener.onMouseOver(row);
>         }
>     }
>
>     public void fireMouseLeaveEvent(int row) {
>         for (RowListener listener : this) {
>             listener.onMouseLeave(row);
>         }
>     }
>
> }
>
> import com.google.gwt.user.client.ui.SourcesTableEvents;
> import com.google.gwt.user.client.ui.TableListener;
>
> public class RowHighlighter implements TableListener, RowListener {
>
>     private DataTable table = null;
>
>     public RowHighlighter(DataTable table) {
>
>         this.table = table;
>     }
>
>     public void onCellClicked(SourcesTableEvents sender, int row, int
> cell) {
>
>         if (sender == table) {
>             table.selectRow(row);
>         }
>     }
>
>     public void onMouseEnter(int row) {
>
>         if (table.getLastSelectedRow() != row) {
>             table.hoverRow(row);
>         }
>
>     }
>
>     public void onMouseLeave(int row) {
>         if (table.getLastSelectedRow() != row) {
>             table.resetRowStyle(row);
>         }
>
>     }
>
>     public void onMouseOver(int row) {
>         // TODO Auto-generated method stub
>
>     }
>
> }
>
> mport com.google.gwt.user.client.ui.Widget;
>
> public interface DataTable {
>
>     public abstract void highlightRow(int row);
>
>     public abstract void hoverRow(int row);
>
>     public abstract void resetRowStyle(int row);
>
>     public abstract void resetTableStyle();
>
>     public abstract int getLastSelectedRow();
>
>     public abstract void setLastSelectedRow(int row);
>
>     public abstract int getRowCount();
>
>     public abstract int getCellCount(int row);
>
>     public abstract Widget getWidget(int row, int col);
>
>     public abstract void selectRow(int row);
>
> }
>
> 
>
>     public void onBrowserEvent(Event event) {
>
>         // Find out which row.
>         Element td = getEventTargetCell(event);
>         if (td == null) {
>             return;
>         }
>         Element tr = DOM.getParent
> ((com.google.gwt.user.client.Element) td);
>         Element body = DOM.getParent(tr);
>         int row = DOM.getChildIndex(body, tr);
>
>         switch (DOM.eventGetType(event)) {
>
>         case Event.ONMOUSEOVER:
>             // Only fire the mouseEnter event if it's coming from
> outside this
>             // widget.
>             Element from = DOM.eventGetFromElement(event);
>             if (from == null || !DOM.isOrHasChild(tr, from)) {
>                 rowListeners.fireMouseEnterEvent(row);
>             }
>             break;
>         case Event.ONMOUSEOUT:
>             // Only fire the mouseLeave event if it's actually leaving
> this
>             // widget.
>             Element to = DOM.eventGetToElement(event);
>             if (to == null || !DOM.isOrHasChild(tr, to)) {
>                 rowListeners.fireMouseLeaveEvent(row);
>             }
>             break;
>
>         default: {
>             // Do nothing
>         }
>
>             super.onBrowserEvent(event);
>         }
>     }
--~--~-~--~~~---~--~~
You received 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: MVC question

2009-06-15 Thread Ian Bambury
Not an expert, but in lieu of one...
If the view already has the data and is just 'unhiding' it (via a hidden
area or a popup) then you are not breaking the pattern any more than if the
user scrolls down to a bit of the screen they can't see..
Where you would be breaking MVC would be where you need to update the model
but display the new data directly, e.g. if you have a popup to input a new
name, stick it on the screen, and fire off an update instead of firing off
an update and having the model alert the view as the the change in data. In
this case, if the update fails, the screen data is wrong. In the first case,
the displayed data is correct as of the time the data was sent from the
server.

Having said that, getting data you may not need just so you can display it
if required is not (generally) a good idea in an Ajax app. Although
sometimes it might be :-)

Generally, you would go and get it as required. E.g. if you have a search
for documents and in the search results you just show the title, you
wouldn't want to have every document's content available 'just in case' the
user wanted to see it. OTOH, you might have a list of multiple choice
questions where you show the correct answers at the click of a button, in
which case having that data available makes sense.

In the latter case, the answers aren't going to change so the 'updatedness'
isn't an issue. If you were showing a list of stocks and shares and clicking
on a line showed recent history, you'd want it as up-to-date as possible, of
course.

Ian

http://examples.roughian.com


2009/6/15 Dalla 

>
> Any MVC / GWT experts out there? :-)
>
> On 14 Juni, 14:09, Dalla  wrote:
> > Hi all!
> >
> > I´ve been working pretty much with MVC in Struts 2, but it´s a pretty
> > different story using MVC, so I have a question.
> >
> > From what I´ve read, It´s pretty much:
> >
> > On user input, View calls Controller.
> > Controller updates Model.
> > Model fires event, which is observed by the View. View updates based
> > on fired events.
> >
> > I´m wondering if it´s possible for the View to update itself without
> > breaking the MVC pattern?
> >
> > For example, let´s say that I have a composite Widget containing a
> > FlexTable inside a scrollpanel, with a list of objects, showing just
> > one or two properties for each object.
> > When the user clicks on a row in the flex table, I want to show a
> > dialog box containing all the details about the clicked object.
> >
> > In this case there would be no reason to update the model now would
> > there? So there would be no reason to call the controller?
> > Would it be OK to let my flex table implement the HasSelectionHandlers
> > interface and have the widget implement SelectionHandler,
> > telling the widget to show a dialog box when the SelectionEvent is
> > fired?
> >
> > Or would this be breaking the MVC pattern?
> >
>

--~--~-~--~~~---~--~~
You received 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 can I add a MouseOutHandler to a FlexTable cell?

2009-06-15 Thread Dean S. Jones

Thanks for the example - I have to support 1.5 and 1.6 - so I am still
coding to the old event model...

But it's nice to see looking inside HandlerManager that they defer
editing of the "handler list" while the event it firing.

--~--~-~--~~~---~--~~
You received 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: MVC question

2009-06-15 Thread Adligo

Hi Dalla,

   There are quite a few variations on MVC, I my opinion GWT  is best
implemented using A MVC variation similar to swing. First consider
this article;
http://www.javaworld.com/jw-04-1998/jw-04-howto.html?page=1

Often the whole MVC Framework (dealing with a button component in the
above example) is packaged into a Component (Widget).  For instance
look at the GWT Button Class
http://google-web-toolkit.googlecode.com/svn/trunk/user/src/com/google/gwt/user/client/ui/

Do you see a ButtonModel or ButtonController in the GWT code (.java
files)?
No

Does this mean the GWT Buttons violate the MVC pattern?
No

This means that the developer who wrote this code decided to package
the MVC concept as a single Component or Widget.

The MVC variation that you describe below seems to what I call the
Active Model variation.  Personally I don't use this but use the
Passive Model variation which is more similar to most Struts (and
Spring) MVC applications.  Where the model classes are just a pojo
(often something like a Hibernate entity).

My main dislike of Active Models is due to all of the extra Observible
code and some memory leaks that I have had to chase down in my career
which were caused by the listners hanging on to references that should
have been removed (because they were no longer used) .

So the debate in a GWT project really comes down to the question;
When is breaking out the code into Models, Views and Controller(s)
better than keeping them together as a component?

So heres my opinion on that;
Models, almost always break out models into classes except when the
model will not be used outside of the component or widget.  I argue
that pojos make the best models and your probably already doing this
for something like Hibernate.
Or in other words;
If the model is used by more than one class (Person entity model)
break it out.
If the model is only needed to maintain the component keep it in
(Button Model).

Views(Panels (according to the Ivar Jacobson deffinition), Composites
according to the GWT defennition).
I think most of the time it makes sense to keep the control code
packaged with the component.   Also for control code packaged this
way, I believe it only makes sense for this control code to manage or
control things inside or under of the scope of the component.  For
things that are not in the scope of the component, the Observable
pattern should be used, which may (and often does) lead to one Panel
(View) controlling another Panel (View).
  So when should the control code not be placed in the ui (View,
Panel)?
When the control logic is no longer scoped to a view.

So to finally answer your question.
I think it would be fine to have your Composite(I think u called this
a flex table) implement HasSelectionHandlers and show a dialog with
the details, as this is all with in the scope of your Component

And finally;
I do think breaking out code into MVC classes is justified in GWT, for
instance when the control code can configured in a manor for reuse.

Here is a Example;
http://zeuhl.adligo.com/gwt_util_demo_v3_1/GwtDemo.html?show_log=true

source
http://cvs.adligo.org/viewvc/gwt_util_demo/

In this MVC framework I use the Mediator pattern for a Singleton I
call the Controller.   You may find this similar to the
ControllerServlet in Struts or the DispatcherServlet in Spring.

http://cvs.adligo.org/viewvc/gwt_util/src/org/adligo/gwt/util/client/I_Controller.java?view=markup
http://cvs.adligo.org/viewvc/gwt_util/src/org/adligo/gwt/util/client/Controller.java?view=markup

 This class then has two maps of Observers;
One map mediates communication to the control logic (I_Listener's)
view -> sends event -> controller mediates to -> I_Listener
The other mediates communication from the control logic (I_Listener's)
view<- calls setFoo() <- I_Listener  <- controller mediates to <-
I_Listener

So whats a good rule of thumb?
Break out your Control code for RPC calls.

It will help you to reuse your Panels (Views, Composites, Widgets).
It will allow you to reuse your RPC callback instances.  It will give
you more maintainable code, which will adapt to changing requirements
faster.  Also it will allow you to change out your code to enable
client side caching if you need it.  exc...

Cheers,
Scott



On Jun 15, 4:02 pm, Dalla  wrote:
> Any MVC / GWT experts out there? :-)
>
> On 14 Juni, 14:09, Dalla  wrote:
>
> > Hi all!
>
> > I´ve been working pretty much with MVC in Struts 2, but it´s a pretty
> > different story using MVC, so I have a question.
>
> > From what I´ve read, It´s pretty much:
>
> > On user input, View calls Controller.
> > Controller updates Model.
> > Model fires event, which is observed by the View. View updates based
> > on fired events.
>
> > I´m wondering if it´s possible for the View to update itself without
> > breaking the MVC pattern?
>
> > For example, let´s say that I have a composite Widget containing a
> > FlexTable inside a scrollpanel, with a list of objects, showing just
> > on

cannot debug in eclipse :(

2009-06-15 Thread gwt-newbie

Vista 64-bit
JRE 1.7 (also tried JRE 1.6 and 1.5)
Installed Eclipse 3.4 Ganymede for Java Development (also tried 3.4
Ganymede for Java EE dev; and 3.5 Galileo for Java EE)
Installed GWT and AppEngine Eclipse Plugins from inside Eclipse from
the Google Update Site for Eclipse 3.4

Created New Project using Google Web Application Project - Name:
Test2; Package: com.myname.gwt.test2
Set breakpoint in
com.myname.gwt.test2.server.GreetingServiceImpl.greetServer
Set breakpoint in
com.myname.gwt.test2.client.Test2$MyHandler.sendNameToServer
(also tried a breakpoint in onModuleLoad)

Using the dropdown on the Debug button, I navigated to Debug
Configurations, then to Web Application, then to Test2 under Web
Applications, then pressed the Debug button at the lower right of the
dialog.

Two windows pop up, one with Jetty, and the other with the browser.
Clicking on the Send button in the browser window retrieves a
successful response from the server.

But no breakpoints are hit :(

I see the list of threads, and suspending them and stepping works, but
they are way too far up in the server stack to chase down to the
application code.

I am an experienced developer but I have barely used Eclipse.

--~--~-~--~~~---~--~~
You received 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: Images won't load from full pathname in FireFox

2009-06-15 Thread Dean S. Jones

You can't use a file:: URI to load an image ( that would attempt to
load it from the machine the browser is on ), you can in theory load
an image from bytes via RPC ( tho it's not worth the highly incredible
ugliness of hackery to do that )

You can sorta write images to the filesystem and serve them, if you
can somehow map the folder into your document root, but writing to
your WebRoot in a J2EE container is a very bad idea.

So, your pretty much left with a Servlet.

On Jun 15, 5:57 pm, Steven  wrote:
> BTW, after an image query I'm getting the image's URI and was planning
> to load the image file directly into the brower. Alternatively I can
> load it into a servlet and use GWT RCP to move it into the browser.
> The image files are 100K and up. Would using the servlet like this be
> generally advisable over loading directly into the browser?
--~--~-~--~~~---~--~~
You received 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: cannot debug in eclipse :(

2009-06-15 Thread Miguel Méndez
The only issue that I'm aware of is this one:
http://code.google.com/p/google-web-toolkit/issues/detail?id=3724 .  Does
that sound like the problem that you are experiencing?

On Mon, Jun 15, 2009 at 7:10 PM, gwt-newbie  wrote:

>
> Vista 64-bit
> JRE 1.7 (also tried JRE 1.6 and 1.5)
> Installed Eclipse 3.4 Ganymede for Java Development (also tried 3.4
> Ganymede for Java EE dev; and 3.5 Galileo for Java EE)
> Installed GWT and AppEngine Eclipse Plugins from inside Eclipse from
> the Google Update Site for Eclipse 3.4
>
> Created New Project using Google Web Application Project - Name:
> Test2; Package: com.myname.gwt.test2
> Set breakpoint in
> com.myname.gwt.test2.server.GreetingServiceImpl.greetServer
> Set breakpoint in
> com.myname.gwt.test2.client.Test2$MyHandler.sendNameToServer
> (also tried a breakpoint in onModuleLoad)
>
> Using the dropdown on the Debug button, I navigated to Debug
> Configurations, then to Web Application, then to Test2 under Web
> Applications, then pressed the Debug button at the lower right of the
> dialog.
>
> Two windows pop up, one with Jetty, and the other with the browser.
> Clicking on the Send button in the browser window retrieves a
> successful response from the server.
>
> But no breakpoints are hit :(
>
> I see the list of threads, and suspending them and stepping works, but
> they are way too far up in the server stack to chase down to the
> application code.
>
> I am an experienced developer but I have barely used Eclipse.
>
> >
>


-- 
Miguel

--~--~-~--~~~---~--~~
You received 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: MVC question

2009-06-15 Thread Daniel Wellman

This talk from the Google I/O 2009 conference has a lot of good advice
about building GWT applications (as presented by Ray Ryan):
http://code.google.com/events/io/sessions/GoogleWebToolkitBestPractices.html

Ray advocates an alternative to Model-View-Controller called Model-
View-Presenter (MVP).  It's particularly useful for testing your
application, since most of the logic gets pulled away from the Widget
classes and instead moved onto Presenter (or Controller) classes.

I've written up an article which describes how I have written GWT
applications using the MVP pattern.  Since the article came out, GWT
1.6 was released, which has the HandlerManager that Ray mentions -- if
I was starting an application today, I'd use that.
http://blog.danielwellman.com/2008/11/test-first-gwt-article-in-november-2008-better-software-magazine.html

Hope these resources are helpful -- there's a whole lot of information
about MVP and MVC out there.  I think above all else it's important to
experiment a little and see what works for you.  I know when I started
I got overwhelmed by all the various different definitions -- it's
best to pick one and try it for a bit and see what makes sense for
your application.

Cheers,
dan
--~--~-~--~~~---~--~~
You received 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: DialogBox Width Problem in v.1.6.4

2009-06-15 Thread Ed

You are absolutely right, Dalla.  Thanks for your suggestion.  It is
now rendering properly.
-Ed

On Jun 15, 12:02 am, Dalla  wrote:
> Hi Ed,
>
> Are you building you´re project from a Google Web Application Project?
> If this is the case, check your .css in the \war folder. There is a
> setting in there which affects the Dialog Box width if I recall
> correctly.
>
> On 15 Juni, 05:30, Ed  wrote:
>
> > Hi,
> > After upgrading to v.1.6.4 from v.1.5.3 using the GWT plugin for
> > Eclipse, the width of my dialog box changed. In the previous version,
> > the child widget (absolute panel, width 300) is displayed exactly
> > inside the dialog box, but now the right border of the dialog box
> > extends about 100px beyond the right border of the child widget and
> > overlays the nearby widgets. Without any changes in the code, I find
> > this behavior strange.  Anybody has similar experiences? Thanks.
> > -Ed
--~--~-~--~~~---~--~~
You received 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: cannot debug in eclipse :(

2009-06-15 Thread gwt-newbie

Firstly, yes, it sounds related, although at a first-cousin level
rather than a sibling bug.

Secondly, boy GWT debugging is fragile!! The guide really needs to
emphasize that, although not in those exact words. Please consider
that: (a) I spent an entire day wondering what I might have been doing
wrong; (b) I downloaded THREE versions of JDK (one was already
installed); THREE versions of Eclipse; and juggled various
permutations.

What quickly led me to a resolution, after nearly a full day of
struggling, was the knowledge from your last post (thanks) that
debugging GWT may have issues probably due to its sophistication /
complexity.

Once I knew that there were issues, I first removed Eclipse from the
picture and tried to debug from the command-line debugger. Then I
brought in Eclipse. Until then I was wondering what checkbox in
Eclipse I had forgotten to check. [This was a mildly traumatic
experience because I do not use any IDE, and this was my most
determined attempt to finally try (pun unintended) using Eclipse.
Sigh!]

Ok, I'll end the rant and state my findings. These are not
authoritative but might serve as a motivation for further
investigation:

1. jdk1.5.0_19-32bit -- didn't work
2. jdk1.6.0_12-64bit -- didn't work
3. jdk1.7.0-32bit -- didn't work
  Setting a Client-side Method Breakpoint in command-line JDB (no
Eclipse) FAILED:
  Got a null pointer exception from somewhere in com.sun.*
stack
4. jdk1.6.0_13-32bit -- worked but with a catch
5. Eclipse 3.5 Galileo RC4 + jdk1.6.0_13-32bit -- worked with the
following catch (the same catch referred to above):
  Setting a Client-side Method Breakpoint in Eclipse FAILS
  Setting a Client-side Line Breakpoint in Eclipse works
  Setting a Server-side Method Breakpoint in Eclipse works
  Setting a Client-side Method Breakpoint in command-line JDB (no
Eclipse) WORKS(!)

I would suggest two things for the GWT folks:
  1. Please test debugging with the latest GA releases of both JDK and
Eclipse (and update the post-GWT-release guide accordingly)
  2. Please let people know that there may be issues, some could be
very subtle such as a Method breakpoint vs. a Line breakpoint.  (The
current GWT guide is rather sing-song (cavalier) about debugging which
makes the developer attack the problem as if s/he might be making an
Eclipse config error, rather than doing a faster problem isolation by
first simplifying the picture.

Thanks & Cheers!

On Jun 15, 6:28 pm, Miguel Méndez  wrote:
> The only issue that I'm aware of is this 
> one:http://code.google.com/p/google-web-toolkit/issues/detail?id=3724.  Does
> that sound like the problem that you are experiencing?

--~--~-~--~~~---~--~~
You received 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: cannot debug in eclipse :(

2009-06-15 Thread gwt-newbie

Firstly, yes, it sounds related, although at a first-cousin level
rather than a sibling bug.

Secondly, boy GWT debugging is fragile!! The guide really needs to
emphasize that, although not in those exact words. Please consider
that: (a) I spent an entire day wondering what I might have been doing
wrong; (b) I downloaded THREE versions of JDK (one was already
installed); THREE versions of Eclipse; and juggled various
permutations.

What quickly led me to a resolution, after nearly a full day of
struggling, was the knowledge from your last post (thanks) that
debugging GWT may have issues probably due to its sophistication /
complexity.

Once I knew that there were issues, I first removed Eclipse from the
picture and tried to debug from the command-line debugger. Then I
brought in Eclipse. Until then I was wondering what checkbox in
Eclipse I had forgotten to check. [This was a mildly traumatic
experience because I do not use any IDE, and this was my most
determined attempt to finally try (pun unintended) using Eclipse.
Sigh!]

Ok, I'll end the rant and state my findings. These are not
authoritative but might serve as a motivation for further
investigation:

1. jdk1.5.0_19-32bit -- didn't work
2. jdk1.6.0_12-64bit -- didn't work
3. jdk1.7.0-32bit -- didn't work
  Setting a Client-side Method Breakpoint in command-line JDB (no
Eclipse) FAILED:
  Got a null pointer exception from somewhere in com.sun.*
stack
4. jdk1.6.0_13-32bit -- worked but with a catch
5. Eclipse 3.5 Galileo RC4 + jdk1.6.0_13-32bit -- worked with the
following catch (the same catch referred to above):
  Setting a Client-side Method Breakpoint in Eclipse FAILS
  Setting a Client-side Line Breakpoint in Eclipse works
  Setting a Server-side Method Breakpoint in Eclipse works
  Setting a Client-side Method Breakpoint in command-line JDB (no
Eclipse) WORKS(!)

I would suggest two things for the GWT folks:
  1. Please test debugging with the latest GA releases of both JDK and
Eclipse (and update the post-GWT-release guide accordingly)
  2. Please let people know that there may be issues, some could be
very subtle such as a Method breakpoint vs. a Line breakpoint.  (The
current GWT guide is rather sing-song (cavalier) about debugging which
makes the developer attack the problem as if s/he might be making an
Eclipse config error, rather than doing a faster problem isolation by
first simplifying the picture.

Thanks & Cheers!

On Jun 15, 6:28 pm, Miguel Méndez  wrote:
> The only issue that I'm aware of is this 
> one:http://code.google.com/p/google-web-toolkit/issues/detail?id=3724.  Does
> that sound like the problem that you are experiencing?

--~--~-~--~~~---~--~~
You received 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: Preventing JavaScript Injection cient/server side solutions

2009-06-15 Thread tamsler

Here is an update on my current approach. I have created a servlet
filter that inspects each request. I use a HttpServletRequestWrapper
to get the request body. The filter checks the request's content type
for the "text/x-gwt-rpc" string and then does a regular expression
check on the request body to detect html script tags.

Best,
-- Thomas

On Jun 11, 4:18 pm, tamsler  wrote:
> I am trying to figure out what the best way is to handle JavaScript
> injection cases. Since any client side input validation handling
> doesn't truly prevent one from injecting JS such as using tools like
> Firebug to re-post RPC calls etc.
>
> I am wondering if anybody has attempted to intercept JS injection on
> the server side by "scanning" RPC calls . I could imagine using a
> servlet filter to do this or or some other way.
>
> Any ideas/feeback is greatly appreciated.
>
> Best,
> -- Thomas Amsler
--~--~-~--~~~---~--~~
You received 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: Preventing JavaScript Injection cient/server side solutions

2009-06-15 Thread Dean S. Jones

Such checks can be "routine" if you are using proper "server side"
validation of input. I have written several such frameworks, which
work on "generic RPC Models"... hence the validation can be routine
and generic.

This, as I have pointed out before, is one of the dangers of using
"Domain Objects" for RPC, and trusting the client that your Domain
Objects are not ... contaminated... before you use an O/R mapper and
just persist them.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-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: Preventing JavaScript Injection cient/server side solutions

2009-06-15 Thread Thomas Amsler

Are any of your "frameworks, which work on generic RPC Models" available to use?

Best,
-- Thomas




On Mon, Jun 15, 2009 at 9:32 PM, Dean S. Jones wrote:
>
> Such checks can be "routine" if you are using proper "server side"
> validation of input. I have written several such frameworks, which
> work on "generic RPC Models"... hence the validation can be routine
> and generic.
>
> This, as I have pointed out before, is one of the dangers of using
> "Domain Objects" for RPC, and trusting the client that your Domain
> Objects are not ... contaminated... before you use an O/R mapper and
> just persist them.
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-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: Preventing JavaScript Injection cient/server side solutions

2009-06-15 Thread tamsler

In my opinion, the optimal solution would enable a validation
framework on top of the RPC infrastructure so that user can declare
the validation/filter properties. Following an  AOP approach to deal
with such concerns.
-- Thomas

On Jun 15, 9:32 pm, "Dean S. Jones"  wrote:
> Such checks can be "routine" if you are using proper "server side"
> validation of input. I have written several such frameworks, which
> work on "generic RPC Models"... hence the validation can be routine
> and generic.
>
> This, as I have pointed out before, is one of the dangers of using
> "Domain Objects" for RPC, and trusting the client that your Domain
> Objects are not ... contaminated... before you use an O/R mapper and
> just persist them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-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: Preventing JavaScript Injection cient/server side solutions

2009-06-15 Thread Dean S. Jones

no, but they are not hard to replicate - they rely generally on
patterns like SDO http://en.wikipedia.org/wiki/Service_Data_Objects ,
which can
be trivial to validate, and reasonably easy to bridge to O/R
frameworks. They are also much easier to bridge to client side MVC/PVC
patterns,
without requiring special toolkits to do "data-binding", etc.

On Jun 16, 12:37 am, Thomas Amsler  wrote:
> Are any of your "frameworks, which work on generic RPC Models" available to 
> use?
>
> Best,
> -- Thomas
>
>
>
> On Mon, Jun 15, 2009 at 9:32 PM, Dean S. Jones wrote:
>
> > Such checks can be "routine" if you are using proper "server side"
> > validation of input. I have written several such frameworks, which
> > work on "generic RPC Models"... hence the validation can be routine
> > and generic.
>
> > This, as I have pointed out before, is one of the dangers of using
> > "Domain Objects" for RPC, and trusting the client that your Domain
> > Objects are not ... contaminated... before you use an O/R mapper and
> > just persist them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-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: Preventing JavaScript Injection cient/server side solutions

2009-06-15 Thread Dean S. Jones

The problem here is that you can only "validate" post-de-
serialization, and then you have to have knowledge of the DTO type(via
reflection/AOP monkey business per type ), which gets complicated
FAST.

My best approach was to validate in the "Generic Model" to Domain
Object Mapper ( BOTH directions ). Afterall, someone by some other
means could
subvert your database and inject JS into the tables.

On Jun 16, 12:48 am, tamsler  wrote:
> In my opinion, the optimal solution would enable a validation
> framework on top of the RPC infrastructure so that user can declare
> the validation/filter properties. Following an  AOP approach to deal
> with such concerns.
> -- Thomas

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



Compiled version of 2.0

2009-06-15 Thread Ramas

Hello,

I'd like to try 2.0, to help and fill the bugs, however, I'm on Win
machine, without C/C++ compiler (for required tools) and cannot build
the trunk myself. Could trunk be auto-build each day and put in some
repository, too ?
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



is there a way to getText of all fields in an application?

2009-06-15 Thread zujee

Hi all,
I want to getText of all fields in a page and want to setText with
another. Please help me how can I do that, rather than manually
getting the text. Exampl code might help me more.

thanks in advance
zuje
--~--~-~--~~~---~--~~
You received 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: getInteger problem when trying to run hosted mode.

2009-06-15 Thread Dean S. Jones

Integer.getInteger("name") gets an integer from System properties.

it is ( roughly ) equal to:

Integer.parseInt(System.getProperty("name"));

So, in the GAE, what is the definition if System.getProperty() ??? You
have no method or means of setting them, you don't know the properties
of the Runtime Environment

Thus, it is useless to ask... and the method is not provided.



On Jun 15, 5:00 pm, Joel Paulsson  wrote:
> Hi!
>
> I run gwt as a plug-in to Eclipse and i have no errors in Eclipse, but
> when i run the program to hosted mode i get this error in the
> AppEngine Server:
>
> [ERROR] Line 53: The method getInteger(String) is undefined for the
> type Integer
>
> If i comment that line it works great, but using getInteger is pretty
> vital for me in this application so i need it to work. Can anyone help
> me understand why i get this error when i don't have any compilation
> errors and maybe find a soloution?
>
> /Joel
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Thinking about learning GWT

2009-06-15 Thread tedpottel

Hi,
I'm thinking about using GWT.  Quastion,
will GWT run ok on my current web hosting service?  Since it does not
support jsp, I'm assuming GWT will work, except for doing rpc?
- Ted

--~--~-~--~~~---~--~~
You received 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: Preventing JavaScript Injection cient/server side solutions

2009-06-15 Thread Dean S. Jones

http://xkcd.com/327/

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