Re: Observer pattern on this design, yes or no/how and why?

2008-11-17 Thread mives29

I tested it on same module, this implementation of the observer
pattern works. however, when using this on two modules it doesn't. Do
I need to do deferred binding here? I hope not coz I dont know how to.
=)

On Nov 17, 1:29 pm, mives29 [EMAIL PROTECTED] wrote:
 oops CnP mistake. on this line:
 buttons.addChangeListener(this);  //where this pertains to
 Page1Compo1

 i meant
 xx.addChangeListener(this);    //where this pertains to Page1Compo1

 On Nov 17, 1:22 pm, mives29 [EMAIL PROTECTED] wrote:

  Hi. I tried your recommendations but there are some errors that I
  encounter that I think is related to my project's structure
  compatibility with your code. As I said above, my project has two
  entrypoints. First entrypoint(com.try.client.Page1.java) contains a
  vertical panel that contains three composites. Second entrypoint
  (com.try.popup.client.PopUp.java) contains a vertical panel than
  contains two composites. (Note: they(entrypoints) are from different
  modules, same app.)

  Now I need Page1.java's panel's contained composites to become
  listeners of PopUp.java's horizontal panel's contained composites. For
  example, I click something on PopUp.java, Page1.java would show a
  reaction thru its composites that are listeners of PopUp.java's
  composite # 2. However, as I followed your instruction, I got this
  errror:

  First, my CODE:
  //On Page1.java's first composite: Page1Compo1.java, I included the
  following
  //declaration of composite # 2
   xx;

  //somewhere on the code
  buttons.addChangeListener(this);    //where this pertains to
  Page1Compo1

  THE ERROR:
  No source code is available for type com.xxxzzz.client..java; did
  you forget to inherit a required module?

  note: .java above is composite # 2 of PopUp.java vertical panel.

  It seems I cannot use .java on Page1Compo1.java.. What am I
  missing?

  On Nov 14, 8:50 pm, gregor [EMAIL PROTECTED] wrote:

   Oh, as to why, well as you see ConfigPanel has no real knowledge of
   the other panels that are listening to it and does need to call any
   methods on them. As a result any number of panels can be registered as
   a listener with it, and subsequently swapped out for new ones if
   required, without affecting ConfigPanel's code at all. It is up to the
   listeners to decide for themselves, individually, what they need to do
   when they receive a change event. So there is a very weak association
   between ConfigPanel and it's listeners and none at all between the
   listeners == low coupling == application components easy to change and
   maintain.

   On Nov 14, 12:40 pm, gregor [EMAIL PROTECTED] wrote:

GWT has a range of Observer/Observable gadgets off the shelf:
SourcesEvents   Listener and xxxListenerCollection utility
classes. If they don't work quite right for you, it's easy to copy the
principle and design your own event handling interfaces.

You could have your config Composite implement SourcesChangeEvents,
for example. Then Comps 1  2 can implement ChangeListener and are
registered with the config Comp. It might work like so:

public class ConfigPanel extends Composite implements
SourcesChangeEvents {

  private ChangeListenerCollection listeners = new
ChangeListenerCollection();
  private Button saveBtn = new Button(Save,new ClickListener() {
            public void onClick(Widget widget) {
                  // you want to send the ConfigPanel itself, not the
Button!
                  // if you just used this it would send the button
                  listeners.fireChange(ConfigPanel.this).;
                }
            });

}

public class Comp1 extends Composite implements changeListener {

     public void onChange(Widget sender) {
         is (sender instanceof ConfigPanel) {
             ConfigPanel configPanel = (ConfigPanel) sender;
             // call whatever methods you need
         }

}

Don't forget you have to register Comp1 as a lister with ConfigPanel
somewhere or it won't work, e.g.:

    confPanel.addChangeListener(comp1);

And that's about it - goodbye to your static method calls.

regards
gregor

On Nov 14, 8:45 am, mives29 [EMAIL PROTECTED] wrote:

 i meant static methods, not static classes (2nd paragraph 2nd line)

 On Nov 14, 4:43 pm, mives29 [EMAIL PROTECTED] wrote:

  I'd go straight to what I want to do.

  I have 3 composites in 1 panel, in 1 entrypoint. I have another
  entrypoint that pops up when you click a link on the 2nd composite 
  on
  the 1st entrypoint. on that second entrypoint you can configure 
  stuff,
  that will affect the displayed data on the first entrypoint's
  composites. now, im thinking (actually, a friend thought of it, not
  me) that the observer pattern is great to use in here, as the 3
  composites of the 1st entrypoint will listen to whatever 

Re: errors with inherited own module

2008-11-17 Thread pepgrifell

We are moving an existing project to GWT and the project has a lot of
sub-projects (JAR's) that use these classes. If I change the package
to be unique, I will have to change lots of classes that were using
classes in Keys.jar !!!

On 14 nov, 14:13, gregor [EMAIL PROTECTED] wrote:
 Hi Pepgrifell,



  I have read an old post saying that compiler is not trying to find
  classes from Keys.jar?aaa.bbb.ccc.ddd but finding classes of package
  aaa.bbb.ccc.ddd in all claspath.

 AFAIK that is correct. I think you need to use a unique package name
 for your shared GWT compatible classes to keep the GWT compiler away
 from your incompatible classes.

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



Re: Limits to byte[] size in RPC?

2008-11-17 Thread Axel

 That's a good guess, but you have to remember one thing: Javascript's
 only number type is equivalent to Java's double.  It's been a while
 since I've looked at the RPC internals, so things may have changed,
 but it has been true that a byte[] would be converted into the
 equivalent of a double[], and then serialized.

Ouch, right, I faintly remember having read about these implicit
conversions.

 I'm curious about what you're doing with a byte[] on the client, Axel.

I'm trying to write a file importer for GPS tracks where the user can
use an upload form to submit the file. At the same time I'd really
like to make use of a convenient RPC because the result will be a
Route object. Now unfortunately, the form submit results are just a
formatted HTML string returned by onSubmitComplete callback in the
FormSubmitCompleteEvent. Since I'm not aware of any good way of
assembling the Route object in a non-RPC servlet and serializing it
through the servlet response so that I can easily deserialize it from
the FormSubmitCompleteEvent, for the time I chose a rather inefficient
but easy-to-write approach. I more or less echo the file and then
have its contents in the client from where I can then submit them to
an RPC doing the actual conversion, returning the Route object. It's
expensive for the additional round-trip, but then again I wanted
something working now that I may optimize later.

I then encountered that the FormSubmitCompleteEvent contents are
somehow altered by the browser. I therefore decided to Base64-encode
and put it in between pre/pre to force the browser to leave the
Base64 string alone. I then originally decided to decode on the client
into a byte[] which would be the Java abstraction of arbitrary file
contents (think of binary GPS track formats) and then submit the byte
[] to the RPC doing the actual track decoding.

After the trouble with the byte[] I now just keep the Base64 string
and submit that to the RPC which then does the Base64-decoding on the
server. All I need to do on the client now is string the pre/pre
from the string. Although I like the clever trick with the double
encoding you describe, I think I may stay with Base64 right now
because it makes encoding/decoding more or less transparent to the
client. Yes, it creates a hidden dependency between the echo servlet
and the RPC implementation, but that's all on the server and I feel I
can live with that for now.

If someone can recommend a way to access the RPC serialization
protocol as an API, I could perhaps use that in my echo servlet and do
the conversion to a Route object in one round trip. I may still need
to Base64-encode and wrap in pre/pre to avoid distortion of the
form submit results by the browser, but I could then Base64-decode and
afterwards RPC-deserialize on the client. That, I think, would be a
good solution because it would save the extra round trip.

The byte[] problem, at last, seems to he the price we have to pay with
Java vs. JavaScript incompatibilities. Still, better performance in
the RPC implementation for byte[] (de-)serialization I find desirable.

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



Re: GWT-Ext Instant Messenger Attempt

2008-11-17 Thread eggsy84

I've never done any GWT-Ext programming but as its a build upon GWT.

To perform the items at runtime surely you can simply do:

button.addClickListener(new ClickListener()
{
public void onClick(Widget sender)
{
String message = myTextField.getText();
// Do something?
}
});

Or am I missing something??



On Nov 15, 3:01 pm, Sandile [EMAIL PROTECTED] wrote:
 I, a new GWT-Ext programmer, is attempting to craft a functional
 instant messenger using the components in a GWT-Ext window. These
 components are a textarea to display the cinversation and a text field
 for the user to contribute messages, the backend stuff is literally
 taken care of ] - but one problem remains...I cannot change the text
 in the textarea at runtime! Additionally, I cannot get input from the
 text field with a click of the button in the window at runtime! I need
 help to overcome my rookieness! Somebody help me...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Observer pattern on this design, yes or no/how and why?

2008-11-17 Thread mives29

The problem is im using two entrypoints, running on two windows, where
the 2nd composite is shown thru Window.open(). I need the first
entrypoint's composite to listen to the second entrypoint's composite,
but I cant do that since the second entrypoint's composite is
instantiated on the second composite, not the first one, so I cant add
the first entrypoint's composite as a listener of the second
entrypoint's composite.

Anyone knows a work around/alternative method of implementing observer
pattern on my problem?

On Nov 17, 4:00 pm, mives29 [EMAIL PROTECTED] wrote:
 I tested it on same module, this implementation of the observer
 pattern works. however, when using this on two modules it doesn't. Do
 I need to do deferred binding here? I hope not coz I dont know how to.
 =)

 On Nov 17, 1:29 pm, mives29 [EMAIL PROTECTED] wrote:

  oops CnP mistake. on this line:
  buttons.addChangeListener(this);  //where this pertains to
  Page1Compo1

  i meant
  xx.addChangeListener(this);    //where this pertains to Page1Compo1

  On Nov 17, 1:22 pm, mives29 [EMAIL PROTECTED] wrote:

   Hi. I tried your recommendations but there are some errors that I
   encounter that I think is related to my project's structure
   compatibility with your code. As I said above, my project has two
   entrypoints. First entrypoint(com.try.client.Page1.java) contains a
   vertical panel that contains three composites. Second entrypoint
   (com.try.popup.client.PopUp.java) contains a vertical panel than
   contains two composites. (Note: they(entrypoints) are from different
   modules, same app.)

   Now I need Page1.java's panel's contained composites to become
   listeners of PopUp.java's horizontal panel's contained composites. For
   example, I click something on PopUp.java, Page1.java would show a
   reaction thru its composites that are listeners of PopUp.java's
   composite # 2. However, as I followed your instruction, I got this
   errror:

   First, my CODE:
   //On Page1.java's first composite: Page1Compo1.java, I included the
   following
   //declaration of composite # 2
    xx;

   //somewhere on the code
   buttons.addChangeListener(this);    //where this pertains to
   Page1Compo1

   THE ERROR:
   No source code is available for type com.xxxzzz.client..java; did
   you forget to inherit a required module?

   note: .java above is composite # 2 of PopUp.java vertical panel.

   It seems I cannot use .java on Page1Compo1.java.. What am I
   missing?

   On Nov 14, 8:50 pm, gregor [EMAIL PROTECTED] wrote:

Oh, as to why, well as you see ConfigPanel has no real knowledge of
the other panels that are listening to it and does need to call any
methods on them. As a result any number of panels can be registered as
a listener with it, and subsequently swapped out for new ones if
required, without affecting ConfigPanel's code at all. It is up to the
listeners to decide for themselves, individually, what they need to do
when they receive a change event. So there is a very weak association
between ConfigPanel and it's listeners and none at all between the
listeners == low coupling == application components easy to change and
maintain.

On Nov 14, 12:40 pm, gregor [EMAIL PROTECTED] wrote:

 GWT has a range of Observer/Observable gadgets off the shelf:
 SourcesEvents   Listener and xxxListenerCollection utility
 classes. If they don't work quite right for you, it's easy to copy the
 principle and design your own event handling interfaces.

 You could have your config Composite implement SourcesChangeEvents,
 for example. Then Comps 1  2 can implement ChangeListener and are
 registered with the config Comp. It might work like so:

 public class ConfigPanel extends Composite implements
 SourcesChangeEvents {

   private ChangeListenerCollection listeners = new
 ChangeListenerCollection();
   private Button saveBtn = new Button(Save,new ClickListener() {
             public void onClick(Widget widget) {
                   // you want to send the ConfigPanel itself, not the
 Button!
                   // if you just used this it would send the button
                   listeners.fireChange(ConfigPanel.this).;
                 }
             });

 }

 public class Comp1 extends Composite implements changeListener {

      public void onChange(Widget sender) {
          is (sender instanceof ConfigPanel) {
              ConfigPanel configPanel = (ConfigPanel) sender;
              // call whatever methods you need
          }

 }

 Don't forget you have to register Comp1 as a lister with ConfigPanel
 somewhere or it won't work, e.g.:

     confPanel.addChangeListener(comp1);

 And that's about it - goodbye to your static method calls.

 regards
 gregor

 On Nov 14, 8:45 am, mives29 [EMAIL PROTECTED] wrote:

  i meant static methods, not 

Re: Any free UI designer available for Eclipse?

2008-11-17 Thread Lonifasiko

Thanks for pointing me to the Netbeans option. Nevertheless, must say
that it's so similar to the one for Eclipse, that even does not allow
visual web development.

Although not for free, I think I should take a look at GWT Designer.
Anyway, I'll keep an eye on these other plugins...

Thanks very much.

Miguel
Blog: http://lonifasiko.blogspot.com

On 14 nov, 16:10, Srini Marreddy [EMAIL PROTECTED] wrote:
 Netbeans got free GWTPlugin . See the following link for more details.

 http://googlewebtoolkit.blogspot.com/2007/12/developing-gwt-applicati...

 Regards,
 Srini

 On Nov 14, 5:37 am, Lonifasiko [EMAIL PROTECTED] wrote:

  Thanks for the reply, I therefore assume there is no other free tool
  or free Eclipse plugin, other than GWT Designer, that lets me design
  GWT applications' UI in an easy way.

  Regards.

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



Re: implement Rest with RequestBuilder

2008-11-17 Thread jake H

ty a lot !!
One question about doDelete.
What am i supposed to write for 'RESTRequestCallback restCallback'


private class RESTRequestCallback implements RequestCallback {
public void onError(Request request, Throwable exception) {
 }

public void onResponseReceived(Request request, Response response)
{
}
  }



as usual??

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



Re: Observer pattern on this design, yes or no/how and why?

2008-11-17 Thread gregor

Clearly if a module is using a class declared in another module it
must explicitly inherit the other module in it's module.get.xml file
otherwise the GWT compiler  won't have access to the class's source
which it needs. Frankly I'm not sure how this would work in the
situation as you describe since I have always followed the canonical
GWT approach which is using a single HTML page and EntryPoint for each
separate application. I'm not sure what your motivation is in having
two EntryPoints. I think this results in two separate javascript .js
files loaded into your HTML page, therefore there will be a wall
between them that accounts for your difficulties. I think it is
possible to communicate between separate javascript files using JSNI
but that would make your life much more difficult.

On the other hand there is no reason not to have your
com.try.popup.client.PopUp.java in a separate module (i.e. having it's
own module.gwt.xml file) and have this inherited by the
com.try.client.Page1.java module. That way it would be compiled as
part of your main application (making your problem go away) but still
be usable in other applications as well. As I say, what is your
motivation for having two EnrtyPoints?

regards
gregor

On Nov 17, 9:42 am, mives29 [EMAIL PROTECTED] wrote:
 The problem is im using two entrypoints, running on two windows, where
 the 2nd composite is shown thru Window.open(). I need the first
 entrypoint's composite to listen to the second entrypoint's composite,
 but I cant do that since the second entrypoint's composite is
 instantiated on the second composite, not the first one, so I cant add
 the first entrypoint's composite as a listener of the second
 entrypoint's composite.

 Anyone knows a work around/alternative method of implementing observer
 pattern on my problem?

 On Nov 17, 4:00 pm, mives29 [EMAIL PROTECTED] wrote:

  I tested it on same module, this implementation of the observer
  pattern works. however, when using this on two modules it doesn't. Do
  I need to do deferred binding here? I hope not coz I dont know how to.
  =)

  On Nov 17, 1:29 pm, mives29 [EMAIL PROTECTED] wrote:

   oops CnP mistake. on this line:
   buttons.addChangeListener(this);  //where this pertains to
   Page1Compo1

   i meant
   xx.addChangeListener(this);    //where this pertains to Page1Compo1

   On Nov 17, 1:22 pm, mives29 [EMAIL PROTECTED] wrote:

Hi. I tried your recommendations but there are some errors that I
encounter that I think is related to my project's structure
compatibility with your code. As I said above, my project has two
entrypoints. First entrypoint(com.try.client.Page1.java) contains a
vertical panel that contains three composites. Second entrypoint
(com.try.popup.client.PopUp.java) contains a vertical panel than
contains two composites. (Note: they(entrypoints) are from different
modules, same app.)

Now I need Page1.java's panel's contained composites to become
listeners of PopUp.java's horizontal panel's contained composites. For
example, I click something on PopUp.java, Page1.java would show a
reaction thru its composites that are listeners of PopUp.java's
composite # 2. However, as I followed your instruction, I got this
errror:

First, my CODE:
//On Page1.java's first composite: Page1Compo1.java, I included the
following
//declaration of composite # 2
 xx;

//somewhere on the code
buttons.addChangeListener(this);    //where this pertains to
Page1Compo1

THE ERROR:
No source code is available for type com.xxxzzz.client..java; did
you forget to inherit a required module?

note: .java above is composite # 2 of PopUp.java vertical panel.

It seems I cannot use .java on Page1Compo1.java.. What am I
missing?

On Nov 14, 8:50 pm, gregor [EMAIL PROTECTED] wrote:

 Oh, as to why, well as you see ConfigPanel has no real knowledge of
 the other panels that are listening to it and does need to call any
 methods on them. As a result any number of panels can be registered as
 a listener with it, and subsequently swapped out for new ones if
 required, without affecting ConfigPanel's code at all. It is up to the
 listeners to decide for themselves, individually, what they need to do
 when they receive a change event. So there is a very weak association
 between ConfigPanel and it's listeners and none at all between the
 listeners == low coupling == application components easy to change and
 maintain.

 On Nov 14, 12:40 pm, gregor [EMAIL PROTECTED] wrote:

  GWT has a range of Observer/Observable gadgets off the shelf:
  SourcesEvents   Listener and xxxListenerCollection utility
  classes. If they don't work quite right for you, it's easy to copy 
  the
  principle and design your own event handling interfaces.

  You could have your config Composite implement SourcesChangeEvents,
  

Re: Observer pattern on this design, yes or no/how and why?

2008-11-17 Thread gregor

this is a good post about opening windows in various ways and their
implications:

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/1bbdece5faa96018/0a2585172e66a671?lnk=gstq=open+separate+window#0a2585172e66a671



On Nov 17, 11:54 am, gregor [EMAIL PROTECTED] wrote:
 Clearly if a module is using a class declared in another module it
 must explicitly inherit the other module in it's module.get.xml file
 otherwise the GWT compiler  won't have access to the class's source
 which it needs. Frankly I'm not sure how this would work in the
 situation as you describe since I have always followed the canonical
 GWT approach which is using a single HTML page and EntryPoint for each
 separate application. I'm not sure what your motivation is in having
 two EntryPoints. I think this results in two separate javascript .js
 files loaded into your HTML page, therefore there will be a wall
 between them that accounts for your difficulties. I think it is
 possible to communicate between separate javascript files using JSNI
 but that would make your life much more difficult.

 On the other hand there is no reason not to have your
 com.try.popup.client.PopUp.java in a separate module (i.e. having it's
 own module.gwt.xml file) and have this inherited by the
 com.try.client.Page1.java module. That way it would be compiled as
 part of your main application (making your problem go away) but still
 be usable in other applications as well. As I say, what is your
 motivation for having two EnrtyPoints?

 regards
 gregor

 On Nov 17, 9:42 am, mives29 [EMAIL PROTECTED] wrote:

  The problem is im using two entrypoints, running on two windows, where
  the 2nd composite is shown thru Window.open(). I need the first
  entrypoint's composite to listen to the second entrypoint's composite,
  but I cant do that since the second entrypoint's composite is
  instantiated on the second composite, not the first one, so I cant add
  the first entrypoint's composite as a listener of the second
  entrypoint's composite.

  Anyone knows a work around/alternative method of implementing observer
  pattern on my problem?

  On Nov 17, 4:00 pm, mives29 [EMAIL PROTECTED] wrote:

   I tested it on same module, this implementation of the observer
   pattern works. however, when using this on two modules it doesn't. Do
   I need to do deferred binding here? I hope not coz I dont know how to.
   =)

   On Nov 17, 1:29 pm, mives29 [EMAIL PROTECTED] wrote:

oops CnP mistake. on this line:
buttons.addChangeListener(this);  //where this pertains to
Page1Compo1

i meant
xx.addChangeListener(this);    //where this pertains to Page1Compo1

On Nov 17, 1:22 pm, mives29 [EMAIL PROTECTED] wrote:

 Hi. I tried your recommendations but there are some errors that I
 encounter that I think is related to my project's structure
 compatibility with your code. As I said above, my project has two
 entrypoints. First entrypoint(com.try.client.Page1.java) contains a
 vertical panel that contains three composites. Second entrypoint
 (com.try.popup.client.PopUp.java) contains a vertical panel than
 contains two composites. (Note: they(entrypoints) are from different
 modules, same app.)

 Now I need Page1.java's panel's contained composites to become
 listeners of PopUp.java's horizontal panel's contained composites. For
 example, I click something on PopUp.java, Page1.java would show a
 reaction thru its composites that are listeners of PopUp.java's
 composite # 2. However, as I followed your instruction, I got this
 errror:

 First, my CODE:
 //On Page1.java's first composite: Page1Compo1.java, I included the
 following
 //declaration of composite # 2
  xx;

 //somewhere on the code
 buttons.addChangeListener(this);    //where this pertains to
 Page1Compo1

 THE ERROR:
 No source code is available for type com.xxxzzz.client..java; did
 you forget to inherit a required module?

 note: .java above is composite # 2 of PopUp.java vertical panel.

 It seems I cannot use .java on Page1Compo1.java.. What am I
 missing?

 On Nov 14, 8:50 pm, gregor [EMAIL PROTECTED] wrote:

  Oh, as to why, well as you see ConfigPanel has no real knowledge of
  the other panels that are listening to it and does need to call any
  methods on them. As a result any number of panels can be registered 
  as
  a listener with it, and subsequently swapped out for new ones if
  required, without affecting ConfigPanel's code at all. It is up to 
  the
  listeners to decide for themselves, individually, what they need to 
  do
  when they receive a change event. So there is a very weak 
  association
  between ConfigPanel and it's listeners and none at all between the
  listeners == low coupling == application components easy to change 
  and
  maintain.

  On Nov 14, 

Re: implement Rest with RequestBuilder

2008-11-17 Thread Jim Freeze

Hi Jake

My RESTRequestCallback is just a wrapper for now. Here is the code:

import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.Response;

public interface RESTRequestCallback {
  void restRequestCallback(int status, String body);
}


This may need to change in the future, but so far, I have yet to need
any added functionality. My callback method is used typically like so:

  public void restRequestCallback(int status, String body) {
if (status == 200) {
//  projects = new ProjectsAndTasks(body);
//  populateTable();
} else {
//  Window.alert(Error: + status);
}
// put cleanup stuff here if needed
  }


On Mon, Nov 17, 2008 at 4:04 AM, jake H [EMAIL PROTECTED] wrote:

 ty a lot !!
 One question about doDelete.
 What am i supposed to write for 'RESTRequestCallback restCallback'


 private class RESTRequestCallback implements RequestCallback {
public void onError(Request request, Throwable exception) {
 }

public void onResponseReceived(Request request, Response response)
 {
}
  }



 as usual??

 ty.
 




-- 
Jim Freeze

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



Re: how to retrive images from client side to server side

2008-11-17 Thread mon3y

how did you know i was a sir?

Code snippet from your client and server side would be nice, so we can
try and see where you are going wrong, :)

mon3y

On Nov 17, 8:14 am, avd [EMAIL PROTECTED] wrote:
 dear sir,
 i want to know that how server can get images that are exists at
 client side.Because when i send the image path through file upload
 then server cant get images from client.
 please help me.

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



My Hack to Get The Browser Scrollbars Useable

2008-11-17 Thread Adligo

Hi All,

   So I just reworked adligo.com to use all mostly gwt (did some basic
animation).  One thing I got caught on for a bit was the browser
scroll bar was disabled when the content was longer than the browser
window.  The fix ended up being;

rootPanel = RootPanel.get();
rootPanel.setStyleName(a_roman_back);

MainPanel main = new MainPanel();
rootPanel.add(main);
main.setSize(100%, 300%);

Should the GWT platform simply check for overflows and enable the
browser scroll bars somehow?

This would be nice, since my hack could still overflow.

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



Re: how to change response in order to open excel

2008-11-17 Thread Lothar Kimmeringer

woody schrieb:
 
 I always got a Internatl Server Error 500 when calling the servlet.
 Does anybody has an idea.

The Logfile should contain more than this (e.g. a stacktrace)
to let you track down the specific problem.


Regards, Lothar

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



Re: missing images in IE

2008-11-17 Thread mon3y

Hi

I don't quiet understand the problem.

FlexTable table = new FlexTable();
  Image img = new Image(icons/img.png);
  table.setWidget(0, 0, img);
  Image img2 = new Image(icons/img2.png);
  table.setWidget(0, 0, img2);

should it not be :

FlexTable table = new FlexTable();
  Image img = new Image(icons/img.png);
  table.setWidget(0, 0, img);
  Image img2 = new Image(icons/img2.png);
  table.setWidget(0,1   , img2);

 or am i missing something.

in your code you should just see img2.





in your code, you have

On Nov 15, 7:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 Greetings,

 using the following code will result in image not being loaded:

               FlexTable table = new FlexTable();
               Image img = new Image(icons/img.png);
               table.setWidget(0, 0, img);
               Image img2 = new Image(icons/img2.png);
               table.setWidget(0, 0, img2);

 Internal symptoms:
 -- img has both __pendingSrc and src attributes set
 -- img2 has only __pendingSrc set
 -- srcImgMap contains img with img2 as its child

 I suspect that when img is removed from table it can no longer receive
 onload event and therefore will never update children's src attribute
 and remove itself from the srcImgMap.

 Is my suspicion correct? Anybody has a fix/workaround for this?

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



Re: Limits to byte[] size in RPC?

2008-11-17 Thread Matt Bishop

If you have time, please prepare a bug report.  Regardless of the real-
world use case, this should be addressed.

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



GWT, Netbeans and debugging

2008-11-17 Thread Rick

I have been working on a GWT project with Netbeans and the client side
debugging in hosted mode has stopped working. I created a test
helloworld project from scratch and the debugging works fine there. I
am using gwt4nb and I created another test project, copied over all my
sources but used all new build.xml and configuration files. Still no
joy. For my large project I have had to increase the memory to
GWTShell, but cannot imagine why this would cause problems with
debugging.

I know that I am not giving much information on this problem, but...

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



Re: implement Rest with RequestBuilder

2008-11-17 Thread Thomas Broyer


On 14 nov, 15:34, jake H [EMAIL PROTECTED] wrote:
 Hello ,
 I m trying to implement Rest 'commands' , like PUT or DELETE with
 RequestBuilder.

s/implements Rest 'commands'/use HTTP methods/

 As much as i read, i saw that we can avoid them by using POST and
 modifying the header.

You'd first have to understand the why: Safari 2's XMLHTTPRequest
only allows GET and POST.
(actually, there are HTTP proxies too which don't like HTTP methods
other than GET and POST)

So, if Safari 2 support is not important for you, you can *safely*
issue *real* DELETE and PUT requests.
For this, you'll have to use a tiny little hack: using the protected
constructor taking a String as method argument, by creating a subclass
overriding nothing. That's what the code snippet you included (see
below too) does. I have a preference for the following code:

   RequestBuilder builder = new RequestBuilder(PUT, url) { /*
nothing to override */ };

(i.e. using an anonymous subclass).

 Can someone share an example?

If Safari 2 support matters, then yes HTTP method override is
unfortunately the way to go. This also means you'll have to add
support for this on the server side.

This example uses a request header, like the GData APIs:

   RequestBuilder builder = new RequestBuilder(RequestBuilder.POST,
url);
   builder.setHeader(X-HTTP-Method-Override, PUT);
   builder.setHeader(Content-Type, text/plain);
   builder.sendRequest(new content of the resource,
myRequestCallback);

 Secondly i came accross with this

 public class DeleteRequestBuilder extends RequestBuilder {
     public DeleteRequestBuilder(String url) {
      super(DELETE, url);

   }

 }

 In manning's book GWT in Practice. Any idea how it can be used?

 Something like that?

 DeleteRequestBuilder requestBuilder = new DeleteRequestBuilder(url);
     try {
      //data
       requestBuilder.sendRequest(data_to_deleted?, new
 ResponseTextHandler());
    ..
 

Except that data_to_deleted? must be the empty string (the thing to
be deleted is identified by the URL) and the second argument has to be
a RequestCallback rather than a ResponseTexthandler; yes.


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



Re: Client Side Checked Exceptions

2008-11-17 Thread [EMAIL PROTECTED]

Turns out it was just not catching NullPoiterException. probably
related to the difference between null and undefined

On Oct 28, 5:20 pm, Ravi M [EMAIL PROTECTED] wrote:
 Stephen

 I _think_ Lothar's point is that MyException needs to extend
 com.google.gwt.user.client.rpc.SerializableException not just
 implement IsSerializable for exceptions across RPC to work properly. I
 had this problem a few weeks back where exceptions thrown across RPC
 were merely IsSerializable and couldn't be caught with the correct
 type in onFailure().

 Anyway, looks like you fixed your problem regardless, so I will cease
 and desist.

 Regards,
 Ravi

 On Oct 21, 9:13 pm, [EMAIL PROTECTED]



 [EMAIL PROTECTED] wrote:
  Sorry lothar. to answere your first question, it isnt being caught at
  all, and MyException extends isSerialisable however as i mentioned i
  was mistaken, instanceof works perfectly.

  Thank you for taking the time to help develop gwt and for helping me
  out :)

  On Oct 21, 1:28 pm, Lothar Kimmeringer [EMAIL PROTECTED] wrote:

   [EMAIL PROTECTED] schrieb:

Sorry for reposting but to me this is a critical issue that should be
looked into asp. Has anyone else had this problem or can someone else
reproduce it?

   You haven't answered my question, so I didn't see a reason to look
   into that further (nobody is paying me for doing that anyway, so
   it's voluntary work anyway).

   What is
   try{
       String test = null;
       test.toString();}

   catch(NullPointerException npe){
       Window.alert(Boolean.toString(npe instanceof NullPointerException));}

   returning?

iv also found recently that if i throw an exception MyException from
the server to the client and do the following in the onFailure method
the expression evaluates to false.

if (caught instanceof MyException) {
Window.alert(true);
} else {
Window.alert(false);
}

   To repeat my question: Is MyException derived from SerializableException?

   Regards, Lothar- Hide quoted text -

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



Re: Pagination Widget?

2008-11-17 Thread Suri

Hi Isaac,
I understand quite a bit of the code now and how to use it. I set up a
simple example that uses the ScrollTableDemo like code initially to
understand what's going on. However, there is one aspect I'm not able
to understand clearly. Could you possibly help me understand how the
Data is retrieved remotely in the PagingScrollTable. I see a reference
to a DataSourceModel but I'm not sure how/when it gets invoked and
what exactly happens that causes the data to get loaded into the
table?

Thanks
Suri

On Nov 11, 9:29 am, Suri [EMAIL PROTECTED] wrote:
 Aha. I understand now. I guess I went too far in the linked README
 document provided. It needed to be as far as the setting up the
 eclipse section and ignoring the rest from checkstyle onward really
 and then following the additional instructions given in the webpage. I
 got to build the incubator :). Thanks again for your patience Isaac.
 I'm sure I'll be more bothersome now that I can start playing with the
 PagingScrollTable a bit.

 Suri

 On Nov 10, 5:27 pm, Isaac Truett [EMAIL PROTECTED] wrote:

  Okay, I see the references to projects in the instructions that are
  causing you alarm. In that context a project is an Eclipse project.
  The GWT project has several distinct Eclipse project configurations
  within a single SVN repository. The Eclipse setup instructions
  referenced in step 1 of Setup for Eclipse are actually the
  instructions for setting up Eclipse to build GWT, not the Incubator.
  It's having you configure CheckStyle, set formatting rules, and other
  things that probably won't matter if you aren't contributing code. If
  you want to contribute changes (and you're certainly encouraged to do
  so!) then you'll want to get the nit-picky formatting details right,
  but otherwise you don't need to bother with that.

  And if all you want to do is run Ant, you don't even need to setup Eclipse.

  On Mon, Nov 10, 2008 at 5:02 PM, Suri [EMAIL PROTECTED] wrote:

   Hi Ken,
   I was following that and then as shown in the link there for setting
   up for eclipse:
 1.Follow the instructions here to set up your eclipse environment.
   

   I downloaded the readme file from the link. And while following that,
   Around Line 104 in the file you'll see that it mentions instructions
   to download GWT core projects.
   This is where I became hesistant to continue. Also from the
   instructions in setting up Eclipse:

   4 If you not on Windows, you will need to fix the gwt-dev project
   reference

     1. Right click on the new incubator project in the explorer and
   choose Properties
     2. Java Build Path
     3. Under the Projects tab, replace gwt-dev-windows as appropriate 

   Isn't that again talking about using the gwt-dev-windows project and
   not jar?

   But if what you say is true and all I need is the GWT Tools section
   (By section I again presume you are talking about the GWT tools
   project which is mentioned to be checked out from SVN in the beginning
   of the Making Incubator Better page), then would it be as simple as

   1) Setting the GWT_ROOT (to GWT incubator )
   2) Setting the GWT_TOOLs (to GWT Tools)
   3) JDK_HOME

   And then finally running my ant?

   Thanks for the patience.

   Suri

   On Nov 10, 4:48 pm, Isaac Truett [EMAIL PROTECTED] wrote:
I hope I'm not wrong in my observations?

   No, you're absolutely right. The gen2 widgets are new and did not
   exist in the last Incubator release.

what concerns me was the additional
projects that I really have no idea about that I'm having to download
to get the incubator compiled.

   Are you following the instructions in the Making Incubator Better
   section of the wiki (link below)? The only other download you should
   need is the tools section of the main GWT project, which has libraries
   required to build GWT and the Incubator.

  http://code.google.com/docreader/#p=google-web-toolkit-incubators=go...

   On Mon, Nov 10, 2008 at 4:34 PM,Suri[EMAIL PROTECTED] wrote:

Hi Issac,
Thanks for the info. I did actually go ahead and download that jar a
few days ago. However, that seems to be a different version from what
is available in the trunk. It seems to be all 1.x version as opposed
to the gen2 stuff. For example, I had gone through the sample for the
PagingScrollTableDemo from the code I had checked out from the SVN,
and then wanted to start using the idea in my own code. The very first
import of the FlexTable which in the SVN version is referenced as:

import com.google.gwt.gen2.table.override.client.FlexTable;

actually turns out to be in the

import com.google.gwt.widgetideas.table.client.overrides.FlexTable;

I hope I'm not wrong in my observations?

Thanks for any input. Additionally, I don't mind building from the
trunk for incubator, however what concerns me was the additional
projects that I really have no idea about that I'm having to download
to get the 

Re: how to change response in order to open excel

2008-11-17 Thread woody

The stachtrace looks like this:
javax.servlet.ServletException: Content-Length must be specified
at com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsUtf8
(RPCServletUtils.java:131)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.readContent
(RemoteServiceServlet.java:335)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:77)
at org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleRequest
(GWTRPCServiceExporter.java:169)
at
org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle
(HttpRequestHandlerAdapter.java:49)
at org.springframework.web.servlet.DispatcherServlet.doDispatch
(DispatcherServlet.java:857)
at org.springframework.web.servlet.DispatcherServlet.doService
(DispatcherServlet.java:792)
at org.springframework.web.servlet.FrameworkServlet.processRequest
(FrameworkServlet.java:475)
at org.springframework.web.servlet.FrameworkServlet.doGet
(FrameworkServlet.java:430)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:
665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:619)

I just ask myself if I I did choose the wrong way. Is it possible to
call simple servlets from GWT? I always read about RPC and
XMLHttpRequest.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to change response in order to open excel

2008-11-17 Thread woody

The stachtrace looks like this:
javax.servlet.ServletException: Content-Length must be specified
at com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsUtf8
(RPCServletUtils.java:131)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.readContent
(RemoteServiceServlet.java:335)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:77)
at org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleRequest
(GWTRPCServiceExporter.java:169)
at
org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle
(HttpRequestHandlerAdapter.java:49)
at org.springframework.web.servlet.DispatcherServlet.doDispatch
(DispatcherServlet.java:857)
at org.springframework.web.servlet.DispatcherServlet.doService
(DispatcherServlet.java:792)
at org.springframework.web.servlet.FrameworkServlet.processRequest
(FrameworkServlet.java:475)
at org.springframework.web.servlet.FrameworkServlet.doGet
(FrameworkServlet.java:430)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:
665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:619)

I just ask myself if I I did choose the wrong way. Is it possible to
call simple servlets from GWT? I always read about RPC and
XMLHttpRequest.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to change response in order to open excel

2008-11-17 Thread Lothar Kimmeringer

woody schrieb:
 The stachtrace looks like this:
 javax.servlet.ServletException: Content-Length must be specified
   at com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsUtf8
 (RPCServletUtils.java:131)
   at com.google.gwt.user.server.rpc.RemoteServiceServlet.readContent
 (RemoteServiceServlet.java:335)
   at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
 (RemoteServiceServlet.java:77)

It looks like there is the RemoteServiceServlet being called by
the RequestBuilder. That can't work you have to call the original
servlet or do that inside a RemoteServiceServlet and pass the data
through. BTW:

  response.setContentType(application/ms-excel);
  response.setContentLength(8100);

  PrintWriter out = response.getWriter();

  String htmlString = new String(HTML +
  TABLE cellspacing=1 cellpadding=1 border=1  +

This is not an Excel-format.

 I just ask myself if I I did choose the wrong way. Is it possible to
 call simple servlets from GWT? I always read about RPC and
 XMLHttpRequest.

My favorite way is define an Iframe on the base-page of the
GWT-application that I access inside the java-class and set
the source of the iframe using DOM. That way you can call
the servlet directly and the browser should behave the same
way like you're used to in the good old JSP-times.


Regards, Lothar

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



Re: Pagination Widget?

2008-11-17 Thread Isaac Truett
Suri,

PagingScrollTable gets data from a TableModel using a Request/Callback
mechanism similar to RPC. The simplest way to get that data from the
server would be to implement TableModel and have onRequest() invoke an
RPC service. The RPC AsyncCallback's onSuccess() would call the table
Callback's onRowsReady().

- Isaac


On Mon, Nov 17, 2008 at 9:50 AM, Suri [EMAIL PROTECTED] wrote:

 Hi Isaac,
 I understand quite a bit of the code now and how to use it. I set up a
 simple example that uses the ScrollTableDemo like code initially to
 understand what's going on. However, there is one aspect I'm not able
 to understand clearly. Could you possibly help me understand how the
 Data is retrieved remotely in the PagingScrollTable. I see a reference
 to a DataSourceModel but I'm not sure how/when it gets invoked and
 what exactly happens that causes the data to get loaded into the
 table?

 Thanks
 Suri

 On Nov 11, 9:29 am, Suri [EMAIL PROTECTED] wrote:
 Aha. I understand now. I guess I went too far in the linked README
 document provided. It needed to be as far as the setting up the
 eclipse section and ignoring the rest from checkstyle onward really
 and then following the additional instructions given in the webpage. I
 got to build the incubator :). Thanks again for your patience Isaac.
 I'm sure I'll be more bothersome now that I can start playing with the
 PagingScrollTable a bit.

 Suri

 On Nov 10, 5:27 pm, Isaac Truett [EMAIL PROTECTED] wrote:

  Okay, I see the references to projects in the instructions that are
  causing you alarm. In that context a project is an Eclipse project.
  The GWT project has several distinct Eclipse project configurations
  within a single SVN repository. The Eclipse setup instructions
  referenced in step 1 of Setup for Eclipse are actually the
  instructions for setting up Eclipse to build GWT, not the Incubator.
  It's having you configure CheckStyle, set formatting rules, and other
  things that probably won't matter if you aren't contributing code. If
  you want to contribute changes (and you're certainly encouraged to do
  so!) then you'll want to get the nit-picky formatting details right,
  but otherwise you don't need to bother with that.

  And if all you want to do is run Ant, you don't even need to setup Eclipse.

  On Mon, Nov 10, 2008 at 5:02 PM, Suri [EMAIL PROTECTED] wrote:

   Hi Ken,
   I was following that and then as shown in the link there for setting
   up for eclipse:
 1.Follow the instructions here to set up your eclipse environment.
   

   I downloaded the readme file from the link. And while following that,
   Around Line 104 in the file you'll see that it mentions instructions
   to download GWT core projects.
   This is where I became hesistant to continue. Also from the
   instructions in setting up Eclipse:

   4 If you not on Windows, you will need to fix the gwt-dev project
   reference

 1. Right click on the new incubator project in the explorer and
   choose Properties
 2. Java Build Path
 3. Under the Projects tab, replace gwt-dev-windows as appropriate 

   Isn't that again talking about using the gwt-dev-windows project and
   not jar?

   But if what you say is true and all I need is the GWT Tools section
   (By section I again presume you are talking about the GWT tools
   project which is mentioned to be checked out from SVN in the beginning
   of the Making Incubator Better page), then would it be as simple as

   1) Setting the GWT_ROOT (to GWT incubator )
   2) Setting the GWT_TOOLs (to GWT Tools)
   3) JDK_HOME

   And then finally running my ant?

   Thanks for the patience.

   Suri

   On Nov 10, 4:48 pm, Isaac Truett [EMAIL PROTECTED] wrote:
I hope I'm not wrong in my observations?

   No, you're absolutely right. The gen2 widgets are new and did not
   exist in the last Incubator release.

what concerns me was the additional
projects that I really have no idea about that I'm having to download
to get the incubator compiled.

   Are you following the instructions in the Making Incubator Better
   section of the wiki (link below)? The only other download you should
   need is the tools section of the main GWT project, which has libraries
   required to build GWT and the Incubator.

  http://code.google.com/docreader/#p=google-web-toolkit-incubators=go...

   On Mon, Nov 10, 2008 at 4:34 PM,Suri[EMAIL PROTECTED] wrote:

Hi Issac,
Thanks for the info. I did actually go ahead and download that jar a
few days ago. However, that seems to be a different version from what
is available in the trunk. It seems to be all 1.x version as opposed
to the gen2 stuff. For example, I had gone through the sample for the
PagingScrollTableDemo from the code I had checked out from the SVN,
and then wanted to start using the idea in my own code. The very first
import of the FlexTable which in the SVN version is referenced as:

import 

Re: how to change response in order to open excel

2008-11-17 Thread woody

The stachtrace looks like this:
javax.servlet.ServletException: Content-Length must be specified
at com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsUtf8
(RPCServletUtils.java:131)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.readContent
(RemoteServiceServlet.java:335)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:77)
at org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleRequest
(GWTRPCServiceExporter.java:169)
at
org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle
(HttpRequestHandlerAdapter.java:49)
at org.springframework.web.servlet.DispatcherServlet.doDispatch
(DispatcherServlet.java:857)
at org.springframework.web.servlet.DispatcherServlet.doService
(DispatcherServlet.java:792)
at org.springframework.web.servlet.FrameworkServlet.processRequest
(FrameworkServlet.java:475)
at org.springframework.web.servlet.FrameworkServlet.doGet
(FrameworkServlet.java:430)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:
665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:619)

I just ask myself if I I did choose the wrong way. Is it possible to
call simple servlets from GWT? I always read about RPC and
XMLHttpRequest.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Tree Key Preview

2008-11-17 Thread Jose Santa Elena
Hi all...
When I press any key (i.e: Alt) with my Tree selected, it refreshs! Is it
normal?!

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



calling new DOMParser()

2008-11-17 Thread markww

Hi,

I'm wrapping some native javascript code which calls:

var x = new DOMParser();

This call results in an exception being thrown, stating that DOMParser
cannot be found. I'm testing it like:

private native void test() /*-{
var x = new DOMParser();
}-*/;

I don't know much about javascript, does DOMParser require a specific
include to resolve itself?

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



Re: calling new DOMParser()

2008-11-17 Thread olivier nouguier

All included js are accessible through the $wnd pointer on hosting page.

You should try something like (I don't know if it is js correct ).

 private native void test() /*-{
var x = new $wnd.DOMParser();
}-*/;



On Mon, Nov 17, 2008 at 5:29 PM, markww [EMAIL PROTECTED] wrote:

 Hi,

 I'm wrapping some native javascript code which calls:

var x = new DOMParser();

 This call results in an exception being thrown, stating that DOMParser
 cannot be found. I'm testing it like:

private native void test() /*-{
var x = new DOMParser();
}-*/;

 I don't know much about javascript, does DOMParser require a specific
 include to resolve itself?

 Thanks
 




-- 
Si l'ignorance peut servir de consolation, elle n'en est pas moins illusoire.

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



logging system property

2008-11-17 Thread David Durham, Jr.

Hi all, I'm trying to setup log4j with GWT in hosted mode, and it
looks like GWT will set the system property

org.apache.commons.logging.Log

to something like:

   com.google.gwt.dev.shell.tomcat.CommonsLoggerAdapter

I did a search through the GWT code for commons:

  http://tinyurl.com/5wcgzo

None of the matches indicate where this might be happening.  Any ideas
on overriding this value?  I've tried adding an environment variable
in the Eclipse launch configuration, but that doesn't seem to
override.

Thanks.

-Dave

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



Re: GXT vs GWT-EXT ?

2008-11-17 Thread glidealong

for our application i had tried gwt-ext first bcuz of the licensing
issues and the maturity, at that point gwtext was running 2.0.1 and
gxt was getting it's 1.0 release. so lot's of api's and
functionalities were missing in gxt compared to gxt.

but sooner than later i found out it was really thorny to debug and
modify the given sample code to get something meaningful to our
context.  currently we are happily using gxt1.3 and we have been
succesfull in acheiving most of the things we wanted to achieve.

But the licensing issues is the one thing that i am not yet sure
about, whether it's gonna backfire sometime in future. But i beleive
it all depends on the way the owners of the gxt want to take it, cuz
form what i know lgpl is much riskier than gpl.

Anyway i feel gxt guys won't kill their product by doing something
silly on the license issues, that said, i meant it all depnds on the
fairness of the guys who did all these.

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



Re: calling new DOMParser()

2008-11-17 Thread Jason Essington

once you step into JSNI, you are in the javascript world, accessing  
java objects is a bit more complicated than in non-JSNI methods.

http://code.google.com/docreader/#p=google-web-toolkit- 
doc-1-5s=google-web-toolkit-doc-1-5t=DevGuideJavaFromJavaScript

-jason
On Nov 17, 2008, at 9:29 AM, markww wrote:


 Hi,

 I'm wrapping some native javascript code which calls:

var x = new DOMParser();

 This call results in an exception being thrown, stating that DOMParser
 cannot be found. I'm testing it like:

private native void test() /*-{
var x = new DOMParser();
}-*/;

 I don't know much about javascript, does DOMParser require a specific
 include to resolve itself?

 Thanks
 


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



Re: logging system property

2008-11-17 Thread David Durham, Jr.

On Mon, Nov 17, 2008 at 10:55 AM, David Durham, Jr.
[EMAIL PROTECTED] wrote:
 Hi all, I'm trying to setup log4j with GWT in hosted mode, and it
 looks like GWT will set the system property

 org.apache.commons.logging.Log

 to something like:

   com.google.gwt.dev.shell.tomcat.CommonsLoggerAdapter

 I did a search through the GWT code for commons:

  http://tinyurl.com/5wcgzo

Actually, I see this in EmbeddedTomcatServer:

String adapterClassName = CommonsLoggerAdapter.class.getName();
System.setProperty(org.apache.commons.logging.Log, adapterClassName);

Odd, but my server-side log messages don't even appear to make it to
this logger.  I'd still like to be able to override this value.

Thanks for any help,
Dave

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



Paths Problems? RPC Serialization? HostPageBaseURL?

2008-11-17 Thread Evan Ruff

Hey Guys,

I'm having some trouble with my GWT project. I'm getting some weird
errors and I think it's related to either my project setup, my gwt.xml
files or something of that nature. I'm running in hosted mode with the
embedded Tomcat.

Basically, I'm getting a couple of weird errors. First off, when I'm
trying to set my path for my servlet (defined plainly in web.xml as
url-pattern/LoginService/url-pattern) I can't find it using either
GWT.getHostPageBaseURL () or GWT.getModuleBaseURL(). I think it is
because both paths resolve to: 
http://localhost:/com.teledini.app.Application/
. In the past, I thought that one call would give me: http://localhost:/
. I worked around this problem by statically setting the path, but
that's suboptimal, as I ALWAYS forget to change it when I deploy :-).

The second problem, I believe, is symptomatic of the first. I get The
serialization policy file '/com.teledini.app.Application/
15CBC2E263CDF186FC35F31569112349.gwt.rpc' was not found; did you
forget to include it in this deployment? when attempting to Serialize
my RemoteServiceServlet return. In my compiled output, the file is
there and is correctly named, but it can't seem to find it. I believe
that this is causing me the dreaded This application is out of date,
please refresh your browser error when deployed.

My project has several modules with dependency, but I have other
projects that are similarly structured without problems. Am I just
making a stupid mistake or what else can I check? I'm a little stuck
with my application as is and really appreciate some advice.

Thanks!

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



Re: calling new DOMParser()

2008-11-17 Thread markww

Thanks guys, this is where I'm confused - I'm creating a 3rd party js
object, which internally creates the DOMParser:

private native void test() /*-{
// inside the 'constructor' of 'thirdPartyObject' is where
new DOMParser gets called.
var x = new $wnd.thirdPartyObject();
}-*/;

so does that mean that you can't use any external javascript libraries
which create new (non-primitive) objects internally (that would be
like all of them?). I bet that:

new $wnd.DOMParser()

would work in my native function example, but I can't do anything like
that since it's being created internally in that third party code.

Thanks


On Nov 17, 12:03 pm, Jason Essington [EMAIL PROTECTED]
wrote:
 once you step into JSNI, you are in the javascript world, accessing  
 java objects is a bit more complicated than in non-JSNI methods.

 http://code.google.com/docreader/#p=google-web-toolkit-
 doc-1-5s=google-web-toolkit-doc-1-5t=DevGuideJavaFromJavaScript

 -jason
 On Nov 17, 2008, at 9:29 AM, markww wrote:



  Hi,

  I'm wrapping some native javascript code which calls:

     var x = new DOMParser();

  This call results in an exception being thrown, stating that DOMParser
  cannot be found. I'm testing it like:

     private native void test() /*-{
         var x = new DOMParser();
     }-*/;

  I don't know much about javascript, does DOMParser require a specific
  include to resolve itself?

  Thanks


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



IE6 + HTTPS + Flaky Proxies = :(

2008-11-17 Thread WillM

Hi all

We've deployed a fairly meaty GWT app to about 500 users and for the
vast majority it works a treat.  Unfortunately some of our users (~1%)
are having problems.  It appears that for a minority of users, who are
all using IE6 (and we think are operating behind rather flaky
proxies), they get intermittent delays on random requests which stalls
our app.  We might get 20 sub second requests and then one that gets
randomly delayed by minutes.  We're doing all this over HTTPS.  We're
also polling a method every 30 seconds to check for various updated
data, as well as requests initiated in response to user actions.

Since they're all corporate users we can't often persuade them to
change browsers, and it's not always possible to get them to whitelist
us for exclusion from having to go through their proxy (both of which
solutions nearly always makes their problems go away).

We have introduced better control over timeouts which should give a
better experience for the unlucky few.

Has anyone had any experiences like this and do they have any advice?

-Will M

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



Cookies in hosted mode won't go away

2008-11-17 Thread Eros

Hi,

I can't get rid of cookies in hosted mode. I wrote a userId cookie
using:

Cookies.setCookie(userId, userId);

and now I can't remove it.

I tried the following:

- Cookies.removeCookie(userId);
- restarting the hosted mode
- Eclipse - Project - Clean...
- restarting Eclipse
- removing www
- removing everything under tomcat/work/gwt/localhost/_/

If I do a Compile/Browse everything works as expected, cookies get
removed with Cookies.remove or clearing the cache in Firefox.

I use Ubuntu 8.10 and GWT 1.5.3

Any help is appreciated.

Cheers,
Eros

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



how to get file path at server side.

2008-11-17 Thread rajasekhar

Hi All,

   how to get the Context Path in gwt.I placed a XML in server
folder,to read the file I need to get the path.Please let me know how
to get the path and read file from server folder.


Regards,
Rajasekhar

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



GWT 1.5.3 upgrade problems

2008-11-17 Thread [EMAIL PROTECTED]

Hi

I have recently upgraded my application from GWT 1.4.60 to GWT 1.5.3.
After the upgrade the I am not able to run my application in the
hosted mode.

It simply throws 404 NOT FOUND error.
GWT does throw a lot of messages, When  ALL messages are enabled.
But, the messages themselves don't  provide any hint, what is wrong or
if anything is wrong.

However, I can run the application in web mode, but some features are
not working.
According to the upgrade guide, module bootstrapping section looks
fie.

I am using Mac OS X 10.4, java 1.5, maven 2.0.9 and GWT 1.5.3.
To reproduce the problem, please do the following,

svn co https://emarket.svn.sourceforge.net/svnroot/emarket/trunk/platform-ng
emarket
cd emarket
mvn gwt:gwt

I would really appreciate your help.
thanks
nambi

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



Re: Cookies in hosted mode won't go away

2008-11-17 Thread Eros

I finally managed to get rid of the cookie: I had set it to expire in
14 days, so I set the system time 30 days in the future and it finally
worked.

Still there's gotta be a way of getting rid of unwanted cookies in
hosted mode, is this a bug? (or maybe a feature ;-))
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Cookies in hosted mode won't go away

2008-11-17 Thread yunhui song
Cookies.removeCookie(userId) doesn't work  here too. I use expire time to
remove it, it works.

 int COOKIE_TIMEOUT = 0;

Date removeExpire = new Date((new Date()).getTime() + COOKIE_TIMEOUT);
//  //remove the cookie, works.

  Cookies.setCookie(cookieName,null, removeExpire);


Good luck,
Sammi

On Mon, Nov 17, 2008 at 9:50 AM, Eros [EMAIL PROTECTED] wrote:


 Hi,

 I can't get rid of cookies in hosted mode. I wrote a userId cookie
 using:

 Cookies.setCookie(userId, userId);

 and now I can't remove it.

 I tried the following:

 - Cookies.removeCookie(userId);
 - restarting the hosted mode
 - Eclipse - Project - Clean...
 - restarting Eclipse
 - removing www
 - removing everything under tomcat/work/gwt/localhost/_/

 If I do a Compile/Browse everything works as expected, cookies get
 removed with Cookies.remove or clearing the cache in Firefox.

 I use Ubuntu 8.10 and GWT 1.5.3

 Any help is appreciated.

 Cheers,
 Eros

 


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



Re: Pagination Widget?

2008-11-17 Thread Suri

Hey Isaac,
Thanks for that information. Based on that let me know what I have
below is correct

public class TestTableModel extends TableModelMyBean
{
  // code to initialize  the RPC service - possibly in a constructor?

  public void onRequest()
  {
// code to use the use the service and make a call
service.requestRows(request, new
AsyncCallbackSerializableResponseMyBean result() {
 public void onFailure(Throwable caught)
{
//do something
callback.onFailure(new Exception)
}
   public void onSuccess
(SerializableResponseMyBean result)
   {
 callback.onRowsReady(request, result);
   }
  });
  }

}

public class MyTableDemo
{

  public TesttableModel myTableModel = null;

  public void onModuleLoad()
  {
// code to create/initialize tables
 
scrollTable = createScrollTable(headerTable, dataTable,
footerTable);

  // to retrieve the data remotely and store in the table created
  scrollTable.getTableModel().onRequest();
  }

 public void createScrollTable(.)
 {
myTableModel = new TestTableModel();
TableDefinitionMyBean myTableDef = createTableDefinition();
MyScrollingTableMyBean myScrollTable = new MyScrollingTabel
(myTableModel, dataTable, headerTable, myTableDef);
myScrollTable.setFooterTable(footerTable);

 }

 // the other usual code continues

}

I thought it best to give some sort of example to see if what I'm
thinking is right. Above you see that I created my own TableModel from
the existing one.
Additionally, I showed the snippet of code where the table model is
added to the scroll table in the TableDemo class.
And finally in the onModuleLoad method you can see the tableModel
being accessed and being called to retrieve the data remotely. Is that
right?

I'm guessing somewhere the onRowsReady method would need to be
implemented by me? Where would that be? If it isn't expected to be
implemented by me, then
how would I end up creating a table when my bean has other objects in
it as opposed to only primitive data.

Hope that gives you an idea of where my confusion is, since its at
about 3 places i think :)

Thanks again

Suri

On Nov 17, 10:09 am, Isaac Truett [EMAIL PROTECTED] wrote:
 Suri,

 PagingScrollTable gets data from a TableModel using a Request/Callback
 mechanism similar to RPC. The simplest way to get that data from the
 server would be to implement TableModel and have onRequest() invoke an
 RPC service. The RPC AsyncCallback's onSuccess() would call the table
 Callback's onRowsReady().

 - Isaac

 On Mon, Nov 17, 2008 at 9:50 AM, Suri [EMAIL PROTECTED] wrote:

  Hi Isaac,
  I understand quite a bit of the code now and how to use it. I set up a
  simple example that uses the ScrollTableDemo like code initially to
  understand what's going on. However, there is one aspect I'm not able
  to understand clearly. Could you possibly help me understand how the
  Data is retrieved remotely in the PagingScrollTable. I see a reference
  to a DataSourceModel but I'm not sure how/when it gets invoked and
  what exactly happens that causes the data to get loaded into the
  table?

  Thanks
  Suri

  On Nov 11, 9:29 am, Suri [EMAIL PROTECTED] wrote:
  Aha. I understand now. I guess I went too far in the linked README
  document provided. It needed to be as far as the setting up the
  eclipse section and ignoring the rest from checkstyle onward really
  and then following the additional instructions given in the webpage. I
  got to build the incubator :). Thanks again for your patience Isaac.
  I'm sure I'll be more bothersome now that I can start playing with the
  PagingScrollTable a bit.

  Suri

  On Nov 10, 5:27 pm, Isaac Truett [EMAIL PROTECTED] wrote:

   Okay, I see the references to projects in the instructions that are
   causing you alarm. In that context a project is an Eclipse project.
   The GWT project has several distinct Eclipse project configurations
   within a single SVN repository. The Eclipse setup instructions
   referenced in step 1 of Setup for Eclipse are actually the
   instructions for setting up Eclipse to build GWT, not the Incubator.
   It's having you configure CheckStyle, set formatting rules, and other
   things that probably won't matter if you aren't contributing code. If
   you want to contribute changes (and you're certainly encouraged to do
   so!) then you'll want to get the nit-picky formatting details right,
   but otherwise you don't need to bother with that.

   And if all you want to do is run Ant, you don't even need to setup 
   Eclipse.

   On Mon, Nov 10, 2008 at 5:02 PM, Suri [EMAIL PROTECTED] wrote:

Hi Ken,
I was following that and then as shown in the link there for setting
up for eclipse:
  1.Follow the instructions here to set up your eclipse 

Re: how to get file path at server side.

2008-11-17 Thread David Durham, Jr.

On Mon, Nov 17, 2008 at 6:16 AM, rajasekhar [EMAIL PROTECTED] wrote:

 Hi All,

   how to get the Context Path in gwt.I placed a XML in server
 folder,to read the file I need to get the path.Please let me know how
 to get the path and read file from server folder.

http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/ServletContext.html#getRealPath(java.lang.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



How to use Regular Expressions (regex) in GWT?

2008-11-17 Thread omsrobert

How do you use regular expressions in GWT?  Can someone post a small
code sample?  I'm looking to validate an e-mail address against a RFC.

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



Re: Limits to byte[] size in RPC?

2008-11-17 Thread Axel

Here's the code that seems to be doing the serialization of a byte[]
object, from
com.google.gwt.user.client.rpc.core.java.lang.Byte_CustomFieldSerializer:

  public static void serialize(SerializationStreamWriter streamWriter,
  Byte instance) throws SerializationException {
streamWriter.writeByte(instance.byteValue());
  }

and then
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter:

  public void writeByte(byte fieldValue) {
append(String.valueOf(fieldValue));
  }

I take it that this creates a new String object for each byte in the
byte[]. Furthermore, the encoding is a decimal numeric string,
presumably prefixed with the type code used for the byte type during
serialization which seems to be the class name (java.lang.Byte).
This at least would explain some of the bloat happening. I'll follow
Matt's advice and will file this as a bug report.

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



Re: Native GWT Compiler

2008-11-17 Thread Alex Epshteyn

I interpreted available in trunk to mean that it's a separate
version of the compiler in the trunk.  Has it replaced the single-
threaded compiler and can just be built and used as usual?

Alex

On Nov 12, 2:20 pm, eric [EMAIL PROTECTED] wrote:
 get it : The new multi-threaded compiler is available in trunk if
 you're interested

 use it : like the google web toolkit .

 regards .

 Le mercredi 12 novembre 2008 à 10:56 -0800, Alex Epshteyn a écrit :

  Hi Sumit,

  Thismultithreadedcompiler sounds intriguing.  Could you provide some
  guidance about how to get it and use it?

  Thanks,
  Alex

  On Oct 13, 1:08 pm, Sumit Chandel [EMAIL PROTECTED] wrote:
   Hi Rauf,
   There are currently no plans to rewrite the GWT compiler as a native
   compiler. There are plans to speedup compilation time with the current GWT
   compiler, however, and the team is in the know about long compilation 
   times
   that some developers have been experiencing when moving their projects 
   form
   1.4.x to 1.5.

   The new multi-threaded compiler is available in trunk if you're interested
   in checking it out to see if it helps speed up your application compile
   time.

   From benchmarks we've run and what some developers have been reporting, 
   the
   new multi-threaded compilation has been showing significant improvements 
   in
   compilation speed, so you should be getting faster results for your own
   project as well.

   Hope that helps,
   -Sumit Chandel

   On Wed, Oct 8, 2008 at 2:36 PM, Rauf Issa [EMAIL PROTECTED] wrote:

Any plans to write a native GWT Compiler like jikes for java? I know
there are plans to improve GWT compiler performance in the upcoming
1.6 release of GWT by multi-threading but I am not sure that will make
enough difference. A native compiler like jikes would be better and
much faster.

Our product, JobServer (job scheduling engine) uses GWT for its GUI
SDK and we compile GWT components on the fly the first time the GWT is
used. This frees the developer from doing the GWT compiler if they do
not want to. This works very well but the initial GWT compiling of the
GWT UI components can take minutes sometimes and is annoying. I would
really like this to be more like compiling JSP pages for example.

Anyway I can only hope that GWT compiling gets faster (right now it is
getting slower with all the advanced optimizations done in GWT 1.5 :)

Rauf Issa
   http://www.grandlogic.com
JobServer - The Most Comprehensive Java Job Scheduling Platform
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



An RPC server could not be reached

2008-11-17 Thread Martin Miethe

Hi @all,

I am trying to set up the DynaTable Example in a Dynamic Web Project
using Eclipse WTP and Cypal Studio.
The GWT complier output goes directly to the WebContent directory.
Everyting looks fine in Eclipse, no errors etc.

But when I call the dynatable.html in the Browser I get a GWT popup
saying An RPC server could not be reached.

The servlet (SchoolCalendarServiceImpl) seems to respond when I try to
call it directly (saying GET not supported).

As far as I can tell all paths and package names are correct, which
doesnt mean that I might be missing something.

Please, can someone help me?

Best regards,
Martin




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



Re: GWT-Ext Instant Messenger Attempt

2008-11-17 Thread Sandile Keswa
Thanks so much, I have finally solved my problem

On Mon, Nov 17, 2008 at 4:23 AM, eggsy84 [EMAIL PROTECTED] wrote:


 I've never done any GWT-Ext programming but as its a build upon GWT.

 To perform the items at runtime surely you can simply do:

 button.addClickListener(new ClickListener()
 {
public void onClick(Widget sender)
{
String message = myTextField.getText();
// Do something?
}
 });

 Or am I missing something??



 On Nov 15, 3:01 pm, Sandile [EMAIL PROTECTED] wrote:
  I, a new GWT-Ext programmer, is attempting to craft a functional
  instant messenger using the components in a GWT-Ext window. These
  components are a textarea to display the cinversation and a text field
  for the user to contribute messages, the backend stuff is literally
  taken care of ] - but one problem remains...I cannot change the text
  in the textarea at runtime! Additionally, I cannot get input from the
  text field with a click of the button in the window at runtime! I need
  help to overcome my rookieness! Somebody help me...
 


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



No errors displayed after failures in hosted mode, just http://localhost:8888

2008-11-17 Thread just marvin

My OSX (10.5.1) system suddenly stopped working at all with GWT.
Downloading a fresh install and running any of the samples (e.g., Mail-
shell) brings up the GWTShell and then WebKit browser, but the browser
simply displays http://localhost: (not the URL for the Mail
app).

I can run with -logLevel ALL, and then I see various stuff on the
console, ending with
[TRACE] Starting URL: 
http://localhost:/com.google.gwt.sample.mail.Mail/Mail.html

but just http://localhost: in the browser.

Obviously I've done something to my environment (recent Safari upgrade
from Apple, other Java versions installed...) since this was all
working.

Related to this.  The actual application I am developing is talking to
a Django web server.  I followed the various instructions, and copied
bits over to the web server side.  I typically run that from inside
eclipse using a Run configuration, with the -noserver and -whitelist
options and pointing at the URL for my server.   That works, and my
actual application development is working fine on this same system.
But then if I take down the Django server and run GWTShell again, I
get the same  quiet behavior -- just displaying http://localhost:.

My main concern is this failure to display any sort of error message
when clearly something is going wrong. Is there some other log file I
should be looking at or some Java level logging I should enable?  Why
doesn't the browser  at least give a 404 or something?

marvin

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



Best way to customize nocache logic...?

2008-11-17 Thread [EMAIL PROTECTED]

I'd like to add some of my own logic to the nocache file in order to
implement a custom localization scheme.  I'm aware of the kinds of
things you can do with generators and linkers, but it's not clear to
me if there is some simple way to customize the existing logic vs.
writing and maintaining my own.

If I just want to tweak the logic for selecting the correct cache file
should I be writing my own linker, extending the existing default
linker, or using some other extension point that I'm not aware of?


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



Re: Limits to byte[] size in RPC?

2008-11-17 Thread gregor

Hi Axel,

I understand your frustration not being able to return a Route object
from a file upload servlet, but I cannot see why, having just slogged
through downloading a 1MB binary, you want to struggle through orders
of magnitude greater slog trying to upload it again to the client from
whence it came. I'm not surprised FF objects!

What I would try is to generate an XML string in my file upload
servlet to represent my Route object (easy using, say, dom4j) which
you can stream directly back to client via
HttpServletResponse .getOutputStream(). Then, back on client side...

public void onSubmitComplete(FormSubmitCompleteEvent event) {
// When the form submission is successfully completed, this
event is
// fired. Assuming the service returned a response of type
text/html,
// we can get the result text here

plug said text into the GWT XMLParser to produce a GWT Document from
which you can read your Route object properties. Job done.

Yes I know it's not as convenient and clean as RPC, but hey, when it
comes to HTTP and you're in doubt, sling a bit of XML about. It
doesn't have to conform to anyone's standards but yours.

regards
gregor



On Nov 17, 7:15 pm, Axel [EMAIL PROTECTED] wrote:
 Here's the code that seems to be doing the serialization of a byte[]
 object, from
 com.google.gwt.user.client.rpc.core.java.lang.Byte_CustomFieldSerializer:

   public static void serialize(SerializationStreamWriter streamWriter,
       Byte instance) throws SerializationException {
     streamWriter.writeByte(instance.byteValue());
   }

 and then
 com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter:

   public void writeByte(byte fieldValue) {
     append(String.valueOf(fieldValue));
   }

 I take it that this creates a new String object for each byte in the
 byte[]. Furthermore, the encoding is a decimal numeric string,
 presumably prefixed with the type code used for the byte type during
 serialization which seems to be the class name (java.lang.Byte).
 This at least would explain some of the bloat happening. I'll follow
 Matt's advice and will file this as a bug report.

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



Re: Observer pattern on this design, yes or no/how and why?

2008-11-17 Thread mives29

Well, the reason for the two entrypoints is that me and my colleagues
are looking for a way to implement a sort of pop-up dialog box, but,
something that resides on a separate window, so it wouldn't overlay
with the main page.  (so the user can alt+tab between the two
windows).

If there's another way to do this other than creating another
entrypoint, please let me know. Thanks.

On Nov 17, 7:54 pm, gregor [EMAIL PROTECTED] wrote:
 Clearly if a module is using a class declared in another module it
 must explicitly inherit the other module in it's module.get.xml file
 otherwise the GWT compiler  won't have access to the class's source
 which it needs. Frankly I'm not sure how this would work in the
 situation as you describe since I have always followed the canonical
 GWT approach which is using a single HTML page and EntryPoint for each
 separate application. I'm not sure what your motivation is in having
 two EntryPoints. I think this results in two separate javascript .js
 files loaded into your HTML page, therefore there will be a wall
 between them that accounts for your difficulties. I think it is
 possible to communicate between separate javascript files using JSNI
 but that would make your life much more difficult.

 On the other hand there is no reason not to have your
 com.try.popup.client.PopUp.java in a separate module (i.e. having it's
 own module.gwt.xml file) and have this inherited by the
 com.try.client.Page1.java module. That way it would be compiled as
 part of your main application (making your problem go away) but still
 be usable in other applications as well. As I say, what is your
 motivation for having two EnrtyPoints?

 regards
 gregor

 On Nov 17, 9:42 am, mives29 [EMAIL PROTECTED] wrote:

  The problem is im using two entrypoints, running on two windows, where
  the 2nd composite is shown thru Window.open(). I need the first
  entrypoint's composite to listen to the second entrypoint's composite,
  but I cant do that since the second entrypoint's composite is
  instantiated on the second composite, not the first one, so I cant add
  the first entrypoint's composite as a listener of the second
  entrypoint's composite.

  Anyone knows a work around/alternative method of implementing observer
  pattern on my problem?

  On Nov 17, 4:00 pm, mives29 [EMAIL PROTECTED] wrote:

   I tested it on same module, this implementation of the observer
   pattern works. however, when using this on two modules it doesn't. Do
   I need to do deferred binding here? I hope not coz I dont know how to.
   =)

   On Nov 17, 1:29 pm, mives29 [EMAIL PROTECTED] wrote:

oops CnP mistake. on this line:
buttons.addChangeListener(this);  //where this pertains to
Page1Compo1

i meant
xx.addChangeListener(this);    //where this pertains to Page1Compo1

On Nov 17, 1:22 pm, mives29 [EMAIL PROTECTED] wrote:

 Hi. I tried your recommendations but there are some errors that I
 encounter that I think is related to my project's structure
 compatibility with your code. As I said above, my project has two
 entrypoints. First entrypoint(com.try.client.Page1.java) contains a
 vertical panel that contains three composites. Second entrypoint
 (com.try.popup.client.PopUp.java) contains a vertical panel than
 contains two composites. (Note: they(entrypoints) are from different
 modules, same app.)

 Now I need Page1.java's panel's contained composites to become
 listeners of PopUp.java's horizontal panel's contained composites. For
 example, I click something on PopUp.java, Page1.java would show a
 reaction thru its composites that are listeners of PopUp.java's
 composite # 2. However, as I followed your instruction, I got this
 errror:

 First, my CODE:
 //On Page1.java's first composite: Page1Compo1.java, I included the
 following
 //declaration of composite # 2
  xx;

 //somewhere on the code
 buttons.addChangeListener(this);    //where this pertains to
 Page1Compo1

 THE ERROR:
 No source code is available for type com.xxxzzz.client..java; did
 you forget to inherit a required module?

 note: .java above is composite # 2 of PopUp.java vertical panel.

 It seems I cannot use .java on Page1Compo1.java.. What am I
 missing?

 On Nov 14, 8:50 pm, gregor [EMAIL PROTECTED] wrote:

  Oh, as to why, well as you see ConfigPanel has no real knowledge of
  the other panels that are listening to it and does need to call any
  methods on them. As a result any number of panels can be registered 
  as
  a listener with it, and subsequently swapped out for new ones if
  required, without affecting ConfigPanel's code at all. It is up to 
  the
  listeners to decide for themselves, individually, what they need to 
  do
  when they receive a change event. So there is a very weak 
  association
  between ConfigPanel and it's listeners and 

Re: missing images in IE

2008-11-17 Thread [EMAIL PROTECTED]

Sorry there is a typo in example, instead of

Image img2 = new Image(icons/img2.png);

it should be the same url as for img:

Image img2 = new Image(icons/img.png);


corrected whole example:

  FlexTable table = new FlexTable();
  Image img = new Image(icons/img.png);
  table.setWidget(0, 0, img);
  Image img2 = new Image(icons/img.png);
  table.setWidget(0, 0, img2);


Indexes are correct. When I replace the image like that (with the
image with the same url), image is not displayed, only ie icon for
image element without url.

Thanks for response.


On Nov 17, 2:33 pm, mon3y [EMAIL PROTECTED] wrote:
 Hi

 I don't quiet understand the problem.

 FlexTable table = new FlexTable();
               Image img = new Image(icons/img.png);
               table.setWidget(0, 0, img);
               Image img2 = new Image(icons/img2.png);
               table.setWidget(0, 0, img2);

 should it not be :

 FlexTable table = new FlexTable();
               Image img = new Image(icons/img.png);
               table.setWidget(0, 0, img);
               Image img2 = new Image(icons/img2.png);
               table.setWidget(0,    1   , img2);

  or am i missing something.

 in your code you should just see img2.

 in your code, you have

 On Nov 15, 7:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:

  Greetings,

  using the following code will result in image not being loaded:

                FlexTable table = new FlexTable();
                Image img = new Image(icons/img.png);
                table.setWidget(0, 0, img);
                Image img2 = new Image(icons/img2.png);
                table.setWidget(0, 0, img2);

  Internal symptoms:
  -- img has both __pendingSrc and src attributes set
  -- img2 has only __pendingSrc set
  -- srcImgMap contains img with img2 as its child

  I suspect that when img is removed from table it can no longer receive
  onload event and therefore will never update children's src attribute
  and remove itself from the srcImgMap.

  Is my suspicion correct? Anybody has a fix/workaround for this?

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



Eclipse GWT UI App Engine Backend

2008-11-17 Thread Bob

I am building an app with a GWT Javascript UI and a Python App Engine
back end. I setup 2 projects in Eclipse. The App Engine project uses a
linked resource folder from the GWT project to access the compiled GWT
UI. The problem: I need to use path = os.path.join(os.path.dirname
(__file__), 'GWT filesl') in App Engine. The 2 projects are in 2
different directories so App Engine does not see 'GWT files' and run
time. My first guess is path variables but I haven't been able
configure.  Any suggestions? Thanks.-Bob
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Observer pattern on this design, yes or no/how and why?

2008-11-17 Thread gregor

That's a Windows way of looking at things. Check the link I gave,
and there are others both on this group and around the net, that
explain better than I can why you should maybe reconsider that idea.


On Nov 18, 1:51 am, mives29 [EMAIL PROTECTED] wrote:
 Well, the reason for the two entrypoints is that me and my colleagues
 are looking for a way to implement a sort of pop-up dialog box, but,
 something that resides on a separate window, so it wouldn't overlay
 with the main page.  (so the user can alt+tab between the two
 windows).

 If there's another way to do this other than creating another
 entrypoint, please let me know. Thanks.

 On Nov 17, 7:54 pm, gregor [EMAIL PROTECTED] wrote:

  Clearly if a module is using a class declared in another module it
  must explicitly inherit the other module in it's module.get.xml file
  otherwise the GWT compiler  won't have access to the class's source
  which it needs. Frankly I'm not sure how this would work in the
  situation as you describe since I have always followed the canonical
  GWT approach which is using a single HTML page and EntryPoint for each
  separate application. I'm not sure what your motivation is in having
  two EntryPoints. I think this results in two separate javascript .js
  files loaded into your HTML page, therefore there will be a wall
  between them that accounts for your difficulties. I think it is
  possible to communicate between separate javascript files using JSNI
  but that would make your life much more difficult.

  On the other hand there is no reason not to have your
  com.try.popup.client.PopUp.java in a separate module (i.e. having it's
  own module.gwt.xml file) and have this inherited by the
  com.try.client.Page1.java module. That way it would be compiled as
  part of your main application (making your problem go away) but still
  be usable in other applications as well. As I say, what is your
  motivation for having two EnrtyPoints?

  regards
  gregor

  On Nov 17, 9:42 am, mives29 [EMAIL PROTECTED] wrote:

   The problem is im using two entrypoints, running on two windows, where
   the 2nd composite is shown thru Window.open(). I need the first
   entrypoint's composite to listen to the second entrypoint's composite,
   but I cant do that since the second entrypoint's composite is
   instantiated on the second composite, not the first one, so I cant add
   the first entrypoint's composite as a listener of the second
   entrypoint's composite.

   Anyone knows a work around/alternative method of implementing observer
   pattern on my problem?

   On Nov 17, 4:00 pm, mives29 [EMAIL PROTECTED] wrote:

I tested it on same module, this implementation of the observer
pattern works. however, when using this on two modules it doesn't. Do
I need to do deferred binding here? I hope not coz I dont know how to.
=)

On Nov 17, 1:29 pm, mives29 [EMAIL PROTECTED] wrote:

 oops CnP mistake. on this line:
 buttons.addChangeListener(this);  //where this pertains to
 Page1Compo1

 i meant
 xx.addChangeListener(this);    //where this pertains to Page1Compo1

 On Nov 17, 1:22 pm, mives29 [EMAIL PROTECTED] wrote:

  Hi. I tried your recommendations but there are some errors that I
  encounter that I think is related to my project's structure
  compatibility with your code. As I said above, my project has two
  entrypoints. First entrypoint(com.try.client.Page1.java) contains a
  vertical panel that contains three composites. Second entrypoint
  (com.try.popup.client.PopUp.java) contains a vertical panel than
  contains two composites. (Note: they(entrypoints) are from different
  modules, same app.)

  Now I need Page1.java's panel's contained composites to become
  listeners of PopUp.java's horizontal panel's contained composites. 
  For
  example, I click something on PopUp.java, Page1.java would show a
  reaction thru its composites that are listeners of PopUp.java's
  composite # 2. However, as I followed your instruction, I got this
  errror:

  First, my CODE:
  //On Page1.java's first composite: Page1Compo1.java, I included the
  following
  //declaration of composite # 2
   xx;

  //somewhere on the code
  buttons.addChangeListener(this);    //where this pertains to
  Page1Compo1

  THE ERROR:
  No source code is available for type com.xxxzzz.client..java; 
  did
  you forget to inherit a required module?

  note: .java above is composite # 2 of PopUp.java vertical panel.

  It seems I cannot use .java on Page1Compo1.java.. What am I
  missing?

  On Nov 14, 8:50 pm, gregor [EMAIL PROTECTED] wrote:

   Oh, as to why, well as you see ConfigPanel has no real knowledge 
   of
   the other panels that are listening to it and does need to call 
   any
   methods on them. As a result any number of panels can be 
   registered as
  

Re: Hosted Browser Issue

2008-11-17 Thread jagadesh

Come On Guys, No Solution



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



Re: Hosted Browser Issue

2008-11-17 Thread Ian Bambury
Come On Jagadesh, Give Us A Clue As To What You Are Doing (Apart From
Clicking Refresh)
Ian

2008/11/18 jagadesh [EMAIL PROTECTED]


 Come On Guys, No Solution

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



Re: missing images in IE

2008-11-17 Thread Manik Chand
Hi mon3y,
try to open in Firefox and write us the differences you notice.


On Tue, Nov 18, 2008 at 7:25 AM, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:


 Sorry there is a typo in example, instead of

 Image img2 = new Image(icons/img2.png);

 it should be the same url as for img:

 Image img2 = new Image(icons/img.png);


 corrected whole example:

  FlexTable table = new FlexTable();
  Image img = new Image(icons/img.png);
  table.setWidget(0, 0, img);
   Image img2 = new Image(icons/img.png);
  table.setWidget(0, 0, img2);


 Indexes are correct. When I replace the image like that (with the
 image with the same url), image is not displayed, only ie icon for
 image element without url.

 Thanks for response.


 On Nov 17, 2:33 pm, mon3y [EMAIL PROTECTED] wrote:
  Hi
 
  I don't quiet understand the problem.
 
  FlexTable table = new FlexTable();
Image img = new Image(icons/img.png);
table.setWidget(0, 0, img);
Image img2 = new Image(icons/img2.png);
table.setWidget(0, 0, img2);
 
  should it not be :
 
  FlexTable table = new FlexTable();
Image img = new Image(icons/img.png);
table.setWidget(0, 0, img);
Image img2 = new Image(icons/img2.png);
table.setWidget(0,1   , img2);
 
   or am i missing something.
 
  in your code you should just see img2.
 
  in your code, you have
 
  On Nov 15, 7:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
  wrote:
 
   Greetings,
 
   using the following code will result in image not being loaded:
 
 FlexTable table = new FlexTable();
 Image img = new Image(icons/img.png);
 table.setWidget(0, 0, img);
 Image img2 = new Image(icons/img2.png);
 table.setWidget(0, 0, img2);
 
   Internal symptoms:
   -- img has both __pendingSrc and src attributes set
   -- img2 has only __pendingSrc set
   -- srcImgMap contains img with img2 as its child
 
   I suspect that when img is removed from table it can no longer receive
   onload event and therefore will never update children's src attribute
   and remove itself from the srcImgMap.
 
   Is my suspicion correct? Anybody has a fix/workaround for this?
 
   Thanks for any response!
 



-- 
Manik Chand
Software Engineer
Exact Software Pvt. Ltd.
403, 4th Floor, Accord Complex,
Station Road,
Goregaon(East),
Mumbai - 400063
Cell No. : +91 9220984430
www.exact-solutions.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: missing images in IE

2008-11-17 Thread Manik Chand
Sorry mon3y,  this reply is for Rehek.michal

On Tue, Nov 18, 2008 at 9:48 AM, Manik Chand [EMAIL PROTECTED] wrote:

 Hi mon3y,
 try to open in Firefox and write us the differences you notice.


 On Tue, Nov 18, 2008 at 7:25 AM, [EMAIL PROTECTED] 
 [EMAIL PROTECTED] wrote:


 Sorry there is a typo in example, instead of

 Image img2 = new Image(icons/img2.png);

 it should be the same url as for img:

 Image img2 = new Image(icons/img.png);


 corrected whole example:

  FlexTable table = new FlexTable();
  Image img = new Image(icons/img.png);
  table.setWidget(0, 0, img);
   Image img2 = new Image(icons/img.png);
  table.setWidget(0, 0, img2);


 Indexes are correct. When I replace the image like that (with the
 image with the same url), image is not displayed, only ie icon for
 image element without url.

 Thanks for response.


 On Nov 17, 2:33 pm, mon3y [EMAIL PROTECTED] wrote:
  Hi
 
  I don't quiet understand the problem.
 
  FlexTable table = new FlexTable();
Image img = new Image(icons/img.png);
table.setWidget(0, 0, img);
Image img2 = new Image(icons/img2.png);
table.setWidget(0, 0, img2);
 
  should it not be :
 
  FlexTable table = new FlexTable();
Image img = new Image(icons/img.png);
table.setWidget(0, 0, img);
Image img2 = new Image(icons/img2.png);
table.setWidget(0,1   , img2);
 
   or am i missing something.
 
  in your code you should just see img2.
 
  in your code, you have
 
  On Nov 15, 7:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
  wrote:
 
   Greetings,
 
   using the following code will result in image not being loaded:
 
 FlexTable table = new FlexTable();
 Image img = new Image(icons/img.png);
 table.setWidget(0, 0, img);
 Image img2 = new Image(icons/img2.png);
 table.setWidget(0, 0, img2);
 
   Internal symptoms:
   -- img has both __pendingSrc and src attributes set
   -- img2 has only __pendingSrc set
   -- srcImgMap contains img with img2 as its child
 
   I suspect that when img is removed from table it can no longer receive
   onload event and therefore will never update children's src attribute
   and remove itself from the srcImgMap.
 
   Is my suspicion correct? Anybody has a fix/workaround for this?
 
   Thanks for any response!
 



 --
 Manik Chand
 Software Engineer
 Exact Software Pvt. Ltd.
 403, 4th Floor, Accord Complex,
 Station Road,
 Goregaon(East),
 Mumbai - 400063
 Cell No. : +91 9220984430
 www.exact-solutions.com




-- 
Manik Chand
Software Engineer
Exact Software Pvt. Ltd.
403, 4th Floor, Accord Complex,
Station Road,
Goregaon(East),
Mumbai - 400063
Cell No. : +91 9220984430
www.exact-solutions.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



History list problem in IE6 - Do I really need to patch GWT's jar

2008-11-17 Thread Ganesh

I am using GWT 1.5 and want to manage history. Whenever I call
History.newItem(token), Mozilla displays the window title in history
list But Internet Explorer shows  
http://localhost:/com.TestEntry/8DF40326B05334ADE3B6DCA8E9DD3DA2
in the list i.e. URL of my page instead of showing window title. When
I drilled, I noticed an issue in HistoryImplIE6's newItemImpl method.

It was written as below:
  protected native void newItemImpl(Element historyFrame, String
historyToken, boolean forceAdd) /*-{
historyToken = historyToken || ;
if (forceAdd || ($wnd.__gwt_historyToken != historyToken)) {
  var doc = historyFrame.contentWindow.document;
  doc.open();
  doc.write('htmlbody onload=if(parent.__gwt_onHistoryLoad)
parent.__gwt_onHistoryLoad(__gwt_historyToken.innerText)div
id=__gwt_historyToken' + historyToken + '/div/body/html');
  doc.close();
}
  }-*/;

It adds an IFrame without specifying title tag. If IFrame does not
have title then it will display the complete URL in history list. For
a solution, I applied a patch in this class where I took the window
title and put it into head tag as below:
  protected native void newItemImpl(Element historyFrame, String
historyToken, boolean forceAdd) /*-{
  historyToken = historyToken || ;
if (forceAdd || ($wnd.__gwt_historyToken != historyToken)) {
  var doc = historyFrame.contentWindow.document;
  doc.open();
 var windowTitle = $wnd.document.title;
  doc.write('htmlheadtitle'+windowTitle+'/title/
headbody onload=if(parent.__gwt_onHistoryLoad)
parent.__gwt_onHistoryLoad(__gwt_historyToken.innerText)div
id=__gwt_historyToken' + historyToken + '/div/body/html');
  doc.close();
}
  }-*/;
and now IE is also showing window title in History list.

Now my question is: is it a bug of GWT ? And is there any other
alternate for this so that I need not to make a patch in GWT's jar.

Any help or suggestion in this regard will be highly appreciated.

Regards

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



Read XML after Uploading

2008-11-17 Thread Madz

Hi,

I have a problem in reading upload XML file from UI using fileupload
widget. I implement the XML parsing in FormPanel onSubmitComplete
method but it didn't find the file. How can I read an xml file coming
from user and upload in public folder then parse the content? So far
this is all I got.

uploadForm.addFormHandler(new FormHandler() {

public void onSubmit(FormSubmitEvent event) {
String xmlFile = fileUpload.getFilename();
//Getting the filename in the upload
if (fileUpload.getFilename().endsWith(xml)) {

int slash = xmlFile.lastIndexOf(/);
if(slash == -1){
slash = 
xmlFile.lastIndexOf(\\);
}

if(slash != -1){
xmlFile = 
xmlFile.substring(slash + 1);
}
}
Window.alert(xmlFile);

if (fileUpload.getFilename().length() == 0) {
Window.alert(You did not specify a 
filename! );

}
}

public void onSubmitComplete(FormSubmitCompleteEvent 
event) {

GWT.log(event.getResults(), null);


String xmlFile = fileUpload.getFilename();
//Getting the filename in the upload
if (fileUpload.getFilename().endsWith(xml)) {

int slash = xmlFile.lastIndexOf(/);
if(slash == -1){
slash = 
xmlFile.lastIndexOf(\\);
}

if(slash != -1){
xmlFile = 
xmlFile.substring(slash + 1);
}

}

setParser(new XMLParseUtil(xmlFile)); //parse 
the file

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



Re: Resizable Popup Panel or DialogBox

2008-11-17 Thread Allahbaksh

HI,
Wonderful project and that too with Apache License. Thanks for Luciano
Broussal.
Regards,
Allahbaksh Asadullah
http://allahbaksh.blogspot.com

On Nov 14, 1:08 pm, Jason Morris [EMAIL PROTECTED] wrote:
 I would say take a look at the GWT Mosaic project:

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

 http://69.20.122.77/gwt-mosaic-current/Showcase.html#CwWindowPanel

 benw wrote:
  Is anybody willing to share some example code for a resizable
  DialogBox or any kind of resizable panel?

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



Re: Hosted Browser Issue

2008-11-17 Thread jagadesh


First Thanks For The Response  Ian,

i am working on Gwt 1.5.3 and Gxt 1.1.2. i developed my application .
but when i tried to view the application in the hosted mode . it is
not going to display it. iam going to click refresh button multiple
times[may be 8 to 10 times].then i am going  to load the application
and view it.

every thing is fine when it is loaded .
please sort me out .

thank u.

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



Re: Hosted Browser Issue

2008-11-17 Thread jagadesh


iam Using Internet Explorer 6.
is there any thing with this one.

thank u

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



Re: How to use Regular Expressions (regex) in GWT?

2008-11-17 Thread alex.d

No GWT magic here - just POJ:

if(!tbEmail.getText().matches([a-z0-9!#$%'*+/=?^_`{|}~-]+...bla bla
bla...)) {
   Window.alert(Invalid email);
}

On 17 Nov., 20:06, omsrobert [EMAIL PROTECTED] wrote:
 How do you use regular expressions in GWT?  Can someone post a small
 code sample?  I'm looking to validate an e-mail address against a RFC.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Problem with GWT 1.5 and IE 7

2008-11-17 Thread jamer

Hello
I write because I found that if you use a image as a button in GWT,
and we associate a MouseListener, if you use the function onMouseDown,
like a click, in IE 7, the application will not be able to click on
any button browser, or use the scroll bar of it (not the browser
application) or anything. To prevent this you must use the onMouseUp

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



[gwt-contrib] Re: Proposal: Simplification of ScrollTable

2008-11-17 Thread dflorey

Copy from #190

I like the idea of providing additional default/simple implementations
to make
constructing a very basic PagingScrollTable easier. Of course, this
should be done
(if at all possible) without reducing the current flexibility of PST.

To address specifics:

1. Consolidating the PST genealogy.
This hasn't really bothered me. I haven't personally found a use for
ScrollTable,
since I'm very much attached to the model-driven PST.
AbstractScrollTable just seems
like an inheritance artifact, which I find acceptable (although I know
that at least
one element in the GWT team would dissent). But if consolidation would
make things
easier/safer/tighter or any other way better, it's worth considering.

2. Adding a title and tooltip to the ColumnDefinitions.
This seems reasonable as an option for streamlined PST construction.
Caveat retaining
flexibility.

3. Provide a default data table.
I like this option as well. User's can always pass in their own data
table to retain
more control over it.

4. Provide simple client side table model taking a list or array.
Doesn't this already exist as IterableTableModel?

5. Annotations for column definitions.
I'm not a huge fan of this idea, but I can see how some might prefer
it. As long as
other ColumnDefinition schemes aren't neglected, this seems like an
interesting
avenue to explore.
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Flurry of Data binding threads

2008-11-17 Thread Arthur Kalmenson

Hello Rahul,

Here's some of the projects:

gwt-data-binding: http://code.google.com/p/gwt-data-binding/
gwt-validation: http://code.google.com/p/gwt-validation/

I'm working on visibility logic as we speak, I'll make a post when I
get the chance.

I am also wondering what the status of the GWT teams solution is.

Regards,
--
Arthur Kalmenson



On Thu, Nov 13, 2008 at 8:41 PM, rahul [EMAIL PROTECTED] wrote:

 Hello Emily,


 *Metadata Systems, comprising Models and Controllers*
 xforms, Ian's databinding system, Arthur's validation system, gwt team's
 upcoming proposal for data management:

 Do you have links to the above resources please, where we could find
 more details/sources?

 Also, you mentioned GWT team's upcoming proposal for data management -
 is it available online yet?

 Thanks,

 Rahul

 


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



[gwt-contrib] Re: a patch for legacy argument support

2008-11-17 Thread Freeland Abbott
On Mon, Nov 17, 2008 at 1:15 AM, John Tamplin [EMAIL PROTECTED] wrote:

 Shouldn't Link.java:157 refer to Link?


Yes; fixed, and thanks.


 Won't this mean if you just run the precompile step it will automatically
 create one if not specified?  I think it should fail if you run the steps
 separately without supplying -workDir, and you only get a default if you run
 GwtCompiler.


As written, yes.  I'm okay with either specification... change attached.


 I don't like the race condition in ensureWorkDir -- I know Java doesn't
 support the equivalent of mkdtemp, but I think rather than creating a unique
 file and trying to reuse that name for a directory I would rather just
 atomically create a random directory and try another if it fails --
 basically implementing mkdtemp ourselves.


Well, if we're going to do that, let's put it into Utility, so we have a
general-purpose mkdtemp equivalent... attached.  And, in that case, do we
want such spontaneous workDirs to be (best-effort) cleaned up at shutdown,
via File.deleteOnExit()?  I wouldn't delete a manually-specified workDir,
even in GWTCompiler, but an implicit one might keep the accumulated trash
down...

Which is a big enough change I probably shouldn't rely on your prior LGTM.

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



flagupdates-1.6-r4033-2.patch
Description: Binary data


[gwt-contrib] Re: Flurry of Data binding threads

2008-11-17 Thread Ray Ryan
On Mon, Nov 17, 2008 at 6:11 AM, Arthur Kalmenson [EMAIL PROTECTED]wrote:


 Hello Rahul,

 Here's some of the projects:

 gwt-data-binding: http://code.google.com/p/gwt-data-binding/
 gwt-validation http://code.google.com/p/gwt-data-binding/gwt-validation:
 http://code.google.com/p/gwt-validation/

 I'm working on visibility logic as we speak, I'll make a post when I
 get the chance.

 I am also wondering what the status of the GWT teams solution is.


Hi, all.
Our plan is to start looking in earnest at data binding and validation
issues in Q1, and it will be a from-scratch type of effort--though we'll
certainly be eagerly looking through the two projects Arthur links to for
guidance an inspiration.

Nearer term, the declarative ui work that we've been talking up for quite a
while now (
http://code.google.com/p/google-web-toolkit-incubator/wiki/UiBinder) should
hit the incubator in a matter of weeks.

rjrjr



 Regards,
 --
 Arthur Kalmenson



 On Thu, Nov 13, 2008 at 8:41 PM, rahul [EMAIL PROTECTED]
 wrote:
 
  Hello Emily,
 
 
  *Metadata Systems, comprising Models and Controllers*
  xforms, Ian's databinding system, Arthur's validation system, gwt team's
  upcoming proposal for data management:
 
  Do you have links to the above resources please, where we could find
  more details/sources?
 
  Also, you mentioned GWT team's upcoming proposal for data management -
  is it available online yet?
 
  Thanks,
 
  Rahul
 
  
 

 


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



[gwt-contrib] Re: a patch for legacy argument support

2008-11-17 Thread Freeland Abbott
Yeah, I'd misunderstood the deleteOnExit() doc to imply recursive deletion,
but they're hanging around.  Also a small bug, I'd failed to shift my random
number (so I got 5 repeated digits, and a random space of 36 vice 36^5).
 Both fixes attached...
It turns out that a try/finally to do the cleanup interacts poorly with
System.exit (which seems to really exit, right then, and so skip my finally
block)... thus the code duplication in GWTCompiler.main().



On Mon, Nov 17, 2008 at 11:24 AM, John Tamplin [EMAIL PROTECTED] wrote:

 On Mon, Nov 17, 2008 at 11:15 AM, Freeland Abbott 
 [EMAIL PROTECTED] wrote:

 Well, if we're going to do that, let's put it into Utility, so we have a
 general-purpose mkdtemp equivalent... attached.  And, in that case, do we
 want such spontaneous workDirs to be (best-effort) cleaned up at shutdown,
 via File.deleteOnExit()?  I wouldn't delete a manually-specified workDir,
 even in GWTCompiler, but an implicit one might keep the accumulated trash
 down...


 Right, I forgot to mention the cleanup in the earlier email.  I think an
 automatically generated one should be cleaned up, but I don't think
 deleteOnExit will do it if it has files in it, since delete on a directory
 with files will fail.  In this case, we don't need the on-exit hook, since
 we know it has to come back trhough GwtCompiler.main anyway.


 Which is a big enough change I probably shouldn't rely on your prior LGTM.


 I'll look at it closer shortly, but we really need Scott to look at it
 since he made the original changes.


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

 


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



flagupdates-1.6-r4033-3.patch
Description: Binary data


[gwt-contrib] History list problem in IE6 - Do I really need to patch GWT's jar

2008-11-17 Thread Rohit

I am using GWT 1.5 and want to manage history. Whenever I call
History.newItem(token), Mozilla displays the window title in history
list But Internet Explorer shows  
http://localhost:/com.TestEntry/8DF40326B05334ADE3B6DCA8E9DD3DA2
in the list i.e. URL of my page instead of showing window title. When
I drilled, I noticed an issue in HistoryImplIE6's newItemImpl method.
It was written as below:

  protected native void newItemImpl(Element historyFrame, String
historyToken, boolean forceAdd) /*-{
historyToken = historyToken || ;

if (forceAdd || ($wnd.__gwt_historyToken != historyToken)) {
  var doc = historyFrame.contentWindow.document;
  doc.open();
  doc.write('htmlbody onload=if(parent.__gwt_onHistoryLoad)
parent.__gwt_onHistoryLoad(__gwt_historyToken.innerText)div
id=__gwt_historyToken' + historyToken + '/div/body/html');
  doc.close();
}
  }-*/;

It adds an IFrame without specifying title tag.
If IFrame does not have title then it will display the complete URL in
history list. For a solution, I applied a patch in this class where I
took the window title and put it into head tag as below:

  protected native void newItemImpl(Element historyFrame, String
historyToken, boolean forceAdd) /*-{
historyToken = historyToken || ;

if (forceAdd || ($wnd.__gwt_historyToken != historyToken)) {
  var doc = historyFrame.contentWindow.document;
  doc.open();
 var windowTitle = $wnd.document.title;
  doc.write('htmlheadtitle'+windowTitle+'/title/
headbody onload=if(parent.__gwt_onHistoryLoad)
parent.__gwt_onHistoryLoad(__gwt_historyToken.innerText)div
id=__gwt_historyToken' + historyToken + '/div/body/html');
  doc.close();
}
  }-*/;

and now IE is also showing window title in History list.

Now my question is: is it a bug of GWT ? And is there any other
alternate for this so that I need not to make a patch in GWT's jar.
Any help or suggestion in this regard will be highly appreciated.

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



[gwt-contrib] Review of handler map speed test.

2008-11-17 Thread Emily Crutcher
Kelly,

   Could you review this  visual benchmark I was using to compute the
pros/cons of the different handler maps?  Of particular interest is the
SimpleJsHandlerMap, to see if there is anything, well, simple we we can do
to make it faster.

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

-- 
There are only 10 types of people in the world: Those who understand
binary, and those who don't

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



[gwt-contrib] [google-web-toolkit commit] r4089 - in branches/1_6_clean_events/reference/code-museum/src/com/google/gwt: event event/shared...

2008-11-17 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Mon Nov 17 11:49:13 2008
New Revision: 4089

Added:
branches/1_6_clean_events/reference/code-museum/src/com/google/gwt/event/
 
branches/1_6_clean_events/reference/code-museum/src/com/google/gwt/event/shared/
 
branches/1_6_clean_events/reference/code-museum/src/com/google/gwt/event/shared/GwtEventUtil.java
 
branches/1_6_clean_events/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/SpeedOfHandlerMap.java

Log:
Adding the speed test for different types of handler maps.  Will be  
recommitted to 1.6 release branch after review.

Added:  
branches/1_6_clean_events/reference/code-museum/src/com/google/gwt/event/shared/GwtEventUtil.java
==
--- (empty file)
+++  
branches/1_6_clean_events/reference/code-museum/src/com/google/gwt/event/shared/GwtEventUtil.java

Mon Nov 17 11:49:13 2008
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2008 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License); you may  
not
+ * use this file except in compliance with the License. You may obtain a  
copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,  
WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under
+ * the License.
+ */
+
+package com.google.gwt.event.shared;
+
+import com.google.gwt.event.shared.GwtEvent.Type;
+
+/**
+ * Utility class to help with managing events.
+ */
+public class GwtEventUtil {
+
+  /**
+   * Fire the event on the given handler.
+   *
+   * @param event the event to dispatch
+   * @param handler the handler to dispatch it to
+   * @param H the event's handler type
+   *
+   */
+  public static H extends EventHandler void dispatch(GwtEventH event,
+  H handler) {
+event.dispatch(handler);
+  }
+
+  /**
+   * Gets the event's type.
+   *
+   * @param H handler type
+   *
+   * @param event the event
+   * @return the associated type
+   */
+  public static H extends EventHandler TypeH getType(GwtEventH  
event) {
+return event.getAssociatedType();
+  }
+
+  private GwtEventUtil() {
+// Utility class, should not have instances.
+  }
+}

Added:  
branches/1_6_clean_events/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/SpeedOfHandlerMap.java
==
--- (empty file)
+++  
branches/1_6_clean_events/reference/code-museum/src/com/google/gwt/museum/client/defaultmuseum/SpeedOfHandlerMap.java

Mon Nov 17 11:49:13 2008
@@ -0,0 +1,708 @@
+/*
+ * Copyright 2008 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License); you may  
not
+ * use this file except in compliance with the License. You may obtain a  
copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,  
WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under
+ * the License.
+ */
+
+package com.google.gwt.museum.client.defaultmuseum;
+
+import com.google.gwt.core.client.Duration;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.HandlesAllMouseEvents;
+import com.google.gwt.event.dom.client.KeyDownEvent;
+import com.google.gwt.event.dom.client.KeyPressEvent;
+import com.google.gwt.event.dom.client.KeyUpEvent;
+import com.google.gwt.event.dom.client.MouseDownEvent;
+import com.google.gwt.event.dom.client.MouseMoveEvent;
+import com.google.gwt.event.dom.client.MouseOutEvent;
+import com.google.gwt.event.dom.client.MouseOverEvent;
+import com.google.gwt.event.dom.client.MouseUpEvent;
+import com.google.gwt.event.dom.client.MouseWheelEvent;
+import com.google.gwt.event.shared.EventHandler;
+import com.google.gwt.event.shared.GwtEvent;
+import com.google.gwt.event.shared.GwtEventUtil;
+import com.google.gwt.event.shared.GwtEvent.Type;
+import com.google.gwt.museum.client.common.AbstractIssue;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.ListBox;
+import com.google.gwt.user.client.ui.Panel;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.VerticalPanel;

[gwt-contrib] RR: Adding .project to gwt-incubator root directory

2008-11-17 Thread Emily Crutcher
Several months ago we had the discussion of whether it was worth polluting
the root directory of gwt-incubator with eclipse specific project files in
order to make sub-eclipse and/or other subversion plugins to work correctly
with the gwt-incubator source.

At the time, there was a lot of discussion about that potential change, so
we pended the issue and I  tried running with an  experimental eclipse
config for a while.

My conclusion after running with the alternative eclipse config, is that
subversion is an extremely useful tool when doing the creation/refactoring
work that is common when growing new libraries.

Therefore, would any of you (particularly the non-eclipse users) object to
having a checked in .project, .classpath, and .checkstyle files in the root
directory of the gwt-incubator project?

 Thanks,

 Emily





-- 
There are only 10 types of people in the world: Those who understand
binary, and those who don't

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



[gwt-contrib] Re: RR: Adding .project to gwt-incubator root directory

2008-11-17 Thread Fred Sauer
No objections :)
Fred Sauer
[EMAIL PROTECTED]


On Mon, Nov 17, 2008 at 1:18 PM, Emily Crutcher [EMAIL PROTECTED] wrote:

 Several months ago we had the discussion of whether it was worth polluting
 the root directory of gwt-incubator with eclipse specific project files in
 order to make sub-eclipse and/or other subversion plugins to work correctly
 with the gwt-incubator source.

 At the time, there was a lot of discussion about that potential change, so
 we pended the issue and I  tried running with an  experimental eclipse
 config for a while.

 My conclusion after running with the alternative eclipse config, is that
 subversion is an extremely useful tool when doing the creation/refactoring
 work that is common when growing new libraries.

 Therefore, would any of you (particularly the non-eclipse users) object to
 having a checked in .project, .classpath, and .checkstyle files in the root
 directory of the gwt-incubator project?

  Thanks,

  Emily





 --
 There are only 10 types of people in the world: Those who understand
 binary, and those who don't

 


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



[gwt-contrib] Re: RR: Adding .project to gwt-incubator root directory

2008-11-17 Thread John Tamplin
On Mon, Nov 17, 2008 at 3:18 PM, Emily Crutcher [EMAIL PROTECTED] wrote:

 Several months ago we had the discussion of whether it was worth polluting
 the root directory of gwt-incubator with eclipse specific project files in
 order to make sub-eclipse and/or other subversion plugins to work correctly
 with the gwt-incubator source.

 At the time, there was a lot of discussion about that potential change, so
 we pended the issue and I  tried running with an  experimental eclipse
 config for a while.

 My conclusion after running with the alternative eclipse config, is that
 subversion is an extremely useful tool when doing the creation/refactoring
 work that is common when growing new libraries.

 Therefore, would any of you (particularly the non-eclipse users) object to
 having a checked in .project, .classpath, and .checkstyle files in the root
 directory of the gwt-incubator project?


Do any other tools also use .project, for example?  If so, you can't have
that file used for that tool or it may get trashed on subsequent update.

Having the files in an eclipse directory seems much cleaner, and the main
trunk of GWT works this way.  Also, other IDEs like VisualStudio can work
with project files in a subdirectory, which is how the OOPHM build works.
What exactly is the reason we can't do the same here?  Even if it is an
issue, why would we not leave the files in an eclipse subdirectory and have
interested users simply copy them to their trunk directory so we don't trash
any other similarly named files there?

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

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



[gwt-contrib] Re: RR: Adding .project to gwt-incubator root directory

2008-11-17 Thread BobV

 What exactly is the reason we can't do the same here?

subclipse won't handle linked resources.

 Even if it is an
 issue, why would we not leave the files in an eclipse subdirectory and have
 interested users simply copy them to their trunk directory so we don't trash
 any other similarly named files there?

Drift.

-- 
Bob Vawter
Google Web Toolkit Team

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



[gwt-contrib] Event handlers committed to 1.6, event listeners deprecated

2008-11-17 Thread Ray Ryan
With r4092, the new event handlers have been committed to the 1.6 branch.
rjrjr

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



[gwt-contrib] [google-web-toolkit commit] r4093 - releases/1.6

2008-11-17 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Mon Nov 17 21:06:07 2008
New Revision: 4093

Modified:
releases/1.6/branch-info.txt

Log:
branch-info.txt updated with event handler merge change #. TBR scottb

Modified: releases/1.6/branch-info.txt
==
--- releases/1.6/branch-info.txt(original)
+++ releases/1.6/branch-info.txtMon Nov 17 21:06:07 2008
@@ -11,6 +11,6 @@
  /releases/1.6/@r3739:3876 was merged (r3877) into trunk
  /releases/1.6/@r3878:3944 was merged (r3945) into trunk, skipping c3878
  /releases/1.6/@r3944:4025 was merged (r) into trunk
-/branches/[EMAIL PROTECTED]:4088 was merged (r) into this branch
+/branches/[EMAIL PROTECTED]:4088 was merged (r4092) into this branch

  --- The next merge into trunk will be 4025:HEAD

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



[gwt-contrib] RR 1.6 (tbr): branch-info.txt updated

2008-11-17 Thread Ray Ryan
Scott, I updated 1.6 branch-info.txt with the event listener change number,
figuring you could TBR it.
http://code.google.com/p/google-web-toolkit/source/detail?r=4093

rjrjr

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



[gwt-contrib] RR: Merging releases/1.5 into releases/1.6 to pick up reference/dispatch

2008-11-17 Thread Ray Ryan
This is step two of three of committing your event dispatch benchmark. Step
one was checking the 1.5 version into releases/1.5/reference/dispatch. Now
I'm merging that into releases/1.6. The third and final step will be a patch
updating 1.6/reference/dispatch with your event handler changes.
I'm not sure how one gets a merge reviewed, as svn diff doesn't show the A
+ adds. But, FWIW...

I performed the merge thus:

  svn merge -r 3863:4093
http://google-web-toolkit.googlecode.com/svn/releases/1.5

and saw only the correct files picked up:

  21:28:50 svn st
  A  +   reference/dispatch
  A  +   reference/dispatch/client
  A  +   reference/dispatch/client/Dispatch.java
  A  +   reference/dispatch/client/Subject.java
  A  +   reference/dispatch/public
  A  +   reference/dispatch/public/Dispatch.html
  A  +   reference/dispatch/Dispatch.gwt.xml
  M  branch-info.txt

and have updated the branch-info.txt:

  21:24:03 svn diff
  Index: branch-info.txt
  ===
  --- branch-info.txt (revision 4093)
  +++ branch-info.txt (working copy)
  @@ -12,5 +12,6 @@
   /releases/1.6/@r3878:3944 was merged (r3945) into trunk, skipping c3878
   /releases/1.6/@r3944:4025 was merged (r) into trunk
   /branches/[EMAIL PROTECTED]:4088 was merged (r4092) into this branch
  +/releases/1.5/@r3863:4093 was merged (r) into this branch

   --- The next merge into trunk will be 4025:HEAD

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