Re: Inter-frame communication

2010-03-21 Thread Fabiano
On Mar 21, 12:08 am, Olivier Monaco  wrote:
> Hi,
>
> I'm working on a front with a global portal as a placeholder for
> applications. Each application is an independent GWT module opened in
> an iframe. The portal and all applications can talk one to each other.
> Each application can send messages to the portal about it state
> (working, title...). But the main feature is to have only one
>

Hi,
I have thought about similar solutions too and your example is very
interesting.
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Two generator questions

2010-03-21 Thread PhilBeaudoin
Yeah, well... Method injection didn't work either, the method just
never got called (as expected...)

I finally was able to make it work using the technique you proposed by
initializing the generated classes after the injector is created.

Just to give a bit more details to anybody else interested in this...

Here is how you define a configuration property in your
project.gwt.xml:
  
  

Here is how you access this property in your generator:
  String ginjectorClassName =
ctx.getPropertyOracle().getConfigurationProperty("gin.injector").getValues().get(0);

Now if you want an injector in the source code you generate you do:
  writer.println( ginjectorClassName + " injector = GWT.create(" +
ginjectorClassName + ".class);"  );


Thanks again Gal. This is a neat trick!

   Philippe


On Mar 20, 8:34 pm, PhilBeaudoin  wrote:
> Thanks Gal, it really helped!
>
> I'm not quite sure I know how to "include a folder in my lookup
> entries". Is this something I can do in Eclipse debugger?
>
> The idea of using the injector directly didn't quite work, because I
> need my generated class to be instanciated .asEagerSingleton(). If I
> try calling GWT.create( MyGingector ) within the generated class I get
> infinite recursion. If I instead try to assign the MyGingector
> instance to some static variable, it doesn't work either because the
> variable isn't initialized yet.
>
> However, I've decided to rework my generated class to use method
> injection instead of constructor injection and it seems to work very
> well!
>
> Cheers,
>
>     Philippe
>
> On Mar 20, 7:31 pm, Gal Dolber  wrote:
>
>
>
> > Ok,
>
> > To view the generated class compile with "-gen /somepathonyourdisk", another
> > tip to debug a generated class: include in your lookup entries the folder
> > where the generated classes are and you will be able to step through the
> > generated code.
>
> > And to use gin into your generated class I didn't found a great solution,
> > because you can inject an interface that is generated but gin just make a
> > GWT.create(theinterface.class); and it wont inject into the generated class.
>
> > This is what I did:
> > Add an set-configuration-property into your module (define it first) and
> > specify on it the location of your injector, then use directly the injector
> > into your generated code. Like this:
>
> >  > value="com.some.gin.MyGinInjector" />
>
> > Regards
>
> > 2010/3/20 PhilBeaudoin 
>
> > > I'm trying to write my first GWT generator... I've gotten pretty far,
> > > but I have the following questions:
> > > 1) Is there any way to see the generated class for debugging purposes?
> > > For example, can I force GWT to produce the .java file for my
> > > generated class (it did it once when I had an error, but I can't force
> > > it to produce it every time.) Any other hints as to how to debug a
> > > generated class?
> > > 2) I'd like to use GIN to inject objects in the constructor of the
> > > generated class. I'm not quite sure if this works or how to make it
> > > work. Any hints would be great!
>
> > > 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-tool...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-web-toolkit+unsubscr...@googlegroups.com > >  cr...@googlegroups.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.

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



Re: Two generator questions

2010-03-21 Thread PhilBeaudoin
One last update:
I don't think its a good idea to GWT.create() the ginjector multiple
times. I got rid of this by creating it once in a static field in my
entry point class, and then accessing that field within my generated
class. This brings me to another question:

To find the name of the entry point class, I had to create a
configuration property. Is there a way, within a generator, to access
the entry point class defined in the module:



On Mar 21, 1:01 am, PhilBeaudoin  wrote:
> Yeah, well... Method injection didn't work either, the method just
> never got called (as expected...)
>
> I finally was able to make it work using the technique you proposed by
> initializing the generated classes after the injector is created.
>
> Just to give a bit more details to anybody else interested in this...
>
> Here is how you define a configuration property in your
> project.gwt.xml:
>        valued="false" />
>        value="com.project.client.gin.MyGinjector" />
>
> Here is how you access this property in your generator:
>       String ginjectorClassName =
> ctx.getPropertyOracle().getConfigurationProperty("gin.injector").getValues( 
> ).get(0);
>
> Now if you want an injector in the source code you generate you do:
>       writer.println( ginjectorClassName + " injector = GWT.create(" +
> ginjectorClassName + ".class);"  );
>
> Thanks again Gal. This is a neat trick!
>
>    Philippe
>
> On Mar 20, 8:34 pm, PhilBeaudoin  wrote:
>
>
>
> > Thanks Gal, it really helped!
>
> > I'm not quite sure I know how to "include a folder in my lookup
> > entries". Is this something I can do in Eclipse debugger?
>
> > The idea of using the injector directly didn't quite work, because I
> > need my generated class to be instanciated .asEagerSingleton(). If I
> > try calling GWT.create( MyGingector ) within the generated class I get
> > infinite recursion. If I instead try to assign the MyGingector
> > instance to some static variable, it doesn't work either because the
> > variable isn't initialized yet.
>
> > However, I've decided to rework my generated class to use method
> > injection instead of constructor injection and it seems to work very
> > well!
>
> > Cheers,
>
> >     Philippe
>
> > On Mar 20, 7:31 pm, Gal Dolber  wrote:
>
> > > Ok,
>
> > > To view the generated class compile with "-gen /somepathonyourdisk", 
> > > another
> > > tip to debug a generated class: include in your lookup entries the folder
> > > where the generated classes are and you will be able to step through the
> > > generated code.
>
> > > And to use gin into your generated class I didn't found a great solution,
> > > because you can inject an interface that is generated but gin just make a
> > > GWT.create(theinterface.class); and it wont inject into the generated 
> > > class.
>
> > > This is what I did:
> > > Add an set-configuration-property into your module (define it first) and
> > > specify on it the location of your injector, then use directly the 
> > > injector
> > > into your generated code. Like this:
>
> > >  > > value="com.some.gin.MyGinInjector" />
>
> > > Regards
>
> > > 2010/3/20 PhilBeaudoin 
>
> > > > I'm trying to write my first GWT generator... I've gotten pretty far,
> > > > but I have the following questions:
> > > > 1) Is there any way to see the generated class for debugging purposes?
> > > > For example, can I force GWT to produce the .java file for my
> > > > generated class (it did it once when I had an error, but I can't force
> > > > it to produce it every time.) Any other hints as to how to debug a
> > > > generated class?
> > > > 2) I'd like to use GIN to inject objects in the constructor of the
> > > > generated class. I'm not quite sure if this works or how to make it
> > > > work. Any hints would be great!
>
> > > > 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-tool...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > google-web-toolkit+unsubscr...@googlegroups.com > > >  cr...@googlegroups.com>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-web-toolkit?hl=en.

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



How do I use GWT-Ext 2.0.6 widgets with GWT 2.0?

2010-03-21 Thread Dan
Hi all,

I am trying to find a tutorial on how to use GWT-Ext 2.0.6 widgets in
a GWT 2.0 project.
Only found a couple, but if I follow them and try to include the
widgets here http://www.gwt-ext.com/demo/#multipleFieldForm I always
get an error

com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot
read property 'StatusBar' of undefined stack: TypeError: Cannot read
property 'StatusBar' of undefined.

Is there any step by step guide to integrate GWT-Ext 2.0.6 with GWT
2.0?

The results returned are GWT-Ext, EXT-GWT and Ext all mixed together,
so can't see a specific one.

Thanks, Dan

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



Re: gwt 2.0.3 - Uibinder for Grid

2010-03-21 Thread Geraldo Lopes
In fact this solution is very clean. Use uibinder as much as you can.
* It's easy to see the structure of what you trying to achieve
* It's faster than manipulating the DOM programatically

Geraldo

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: DockLayoutPanel blank

2010-03-21 Thread Jaan
Layout panels must be added into to the RootLayoutPanel, not
RootPanel.

So change
 RootPanel.get("zodiacEntryPoint").add(lol);
to
 RootLayoutPanel.get("zodiacEntryPoint").add(lol);

and everything should work.

On Mar 20, 8:55 pm, Marcelo Sena  wrote:
> DockLayoutPanel lol = new DockLayoutPanel(Unit.PX);
> lol.add(new Label("LOL"));
> RootPanel.get("zodiacEntryPoint").add(lol);
>
> This code produces no output.
>
> RootPanel.get("zodiacEntryPoint").add(new Label("LOL"));
>
> This code shows "LOL" at left side of the page.
>
> Here is the root HTML of the application:
>
>  "http://www.w3.org/TR/html4/loose.dtd";>
> 
>   
>     
>     
>     
>   
>
>   
>     
>   
> 
>
> Why can't DockLayoutPanel render?
>
> I'm using Firefox 3.5

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How do I use GWT-Ext 2.0.6 widgets with GWT 2.0?

2010-03-21 Thread gaill...@audemat.com
I know this is not the answer you expect but GWT-Ext is a dead projet.
You should try to move to Ext-GWT 
http://www.extjs.com/products/gwt/?ref=learnmorebluebutton

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: MVP related question

2010-03-21 Thread Thomas Broyer


On Mar 21, 7:52 am, PhilBeaudoin  wrote:
> In all the examples that I've seen this is in the client package, but
> now that I think of it, it would make sense to have it in the shared
> package.

We do not use GWT-RPC in our apps, but I've built a proto recently (to
get a coworker started on a new project) that uses GWT-RPC (and I'll
probably use it in another new app), and I've put the interfaces in a
"shared" package, along with the classes that are passed through GWT-
RPC.

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: update widget on panel

2010-03-21 Thread JD
I just tried something with interesting results.

In the updateButton anonymous clickhandler class, I tried a
Window.alert attempting to output the index of the widget object w on
its containing panel. It came back -1, meaning w is not to be found.
Does this have something to do with how anonymous inner classes use
the external classes objects? Maybe a clone or something? If so, how
can i handle this?

thanks.



On Mar 20, 10:30 pm, JD  wrote:
> I have an AbsolutePanel with dynamically added widgets. When I click
> on one of these widgets, another panel will display some properties of
> that widget. On this property panel there are elements to change some
> of the textual info displayed on the widget and a button to update it.
> The event of the button gets called and I change the data in the
> widget object but it does not get reflected visually. Any reason why?
> Is there some kind of redraw that has to be done? Perhaps remove the
> widget and redraw it? If so, how do you remove? I tried
> panel.remove(widget) but nothing happens. Below is the method that
> gets called when a widget is clicked.
>
>     private void displayProps(final MyWidget w) {
>         propsTable = new FlexTable();
>         propsTable.setCellSpacing(3);
>         propsTable.setCellPadding(3);
>
>         // Add some standard form options
>         propsTable.setHTML(0, 0, "Name");
>         final TextBox name = new TextBox();
>         propsTable.setWidget(0, 1, name);
>         Button updateButton = new Button("Update",
>                 new ClickHandler() {
>                     public void onClick(ClickEvent event) {
>                         w.setName(name.getText());
>                     }
>                 });
>         propsTable.setWidget(0, 3, updateButton);
>     }

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How do I use GWT-Ext 2.0.6 widgets with GWT 2.0?

2010-03-21 Thread Dan
Yes, I know it's dead... But at work they have found that particular
date and time pickers that they like and were wondering if it's still
possible to include just those two widgets in the project.

I don't mind doing some research myself as long as somebody can
confirm it's still possible to use GWT-Ext in a GWT 2.0 application?

Thanks for your answer anyway :)

On Mar 21, 1:12 pm, "gaill...@audemat.com" 
wrote:
> I know this is not the answer you expect but GWT-Ext is a dead projet.
> You should try to move to 
> Ext-GWThttp://www.extjs.com/products/gwt/?ref=learnmorebluebutton

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: DockLayoutPanel blank

2010-03-21 Thread zggame
A small typo.   I think RootLayoutPanel only has get(), not get(String
element).  So there can only be one RootLayoutPanel, which anchors on
.  Generally, I found it is better not to mix  *layoutPanels and
old panels.  Things are easily screwed up.  I once put a simplePanel
in a DockLayoutPanel and that one disappears from time to time.  I
change the simplePanel to LayoutPanel and it works fine since.

On Mar 21, 7:40 am, Jaan  wrote:
> Layout panels must be added into to the RootLayoutPanel, not
> RootPanel.
>
> So change
>  RootPanel.get("zodiacEntryPoint").add(lol);
> to
>  RootLayoutPanel.get("zodiacEntryPoint").add(lol);
>
> and everything should work.
>
> On Mar 20, 8:55 pm, Marcelo Sena  wrote:
>
> > DockLayoutPanel lol = new DockLayoutPanel(Unit.PX);
> > lol.add(new Label("LOL"));
> > RootPanel.get("zodiacEntryPoint").add(lol);
>
> > This code produces no output.
>
> > RootPanel.get("zodiacEntryPoint").add(new Label("LOL"));
>
> > This code shows "LOL" at left side of the page.
>
> > Here is the root HTML of the application:
>
> >  > "http://www.w3.org/TR/html4/loose.dtd";>
> > 
> >   
> >     
> >     
> >     
> >   
>
> >   
> >     
> >   
> > 
>
> > Why can't DockLayoutPanel render?
>
> > I'm using Firefox 3.5

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: gwt-dispatch, gwt-presenter, mvp4g

2010-03-21 Thread zggame
I second that idea.  I start to really understand the gwt-presenter by
reading its code.  It is actually not that complicated and teach me
some really nice lessons.  And you also see a few short-coming of it.
It is open-source under BSD.  So you can do whatever to fit it for
your purpose.

On Feb 28, 5:58 pm, Geraldo Lopes  wrote:
> Initiatives like gwt-dispatch andgwt-presenterare welcome.
> Reading others code is a very good way to improve our skills.
> Even if one don't adopt the library it can be very helpful.
>
> Keep small (but useful) libraries river flow :)
>
> Regards,
>
> Geraldo
>
> On 28 fev, 15:40, Ed  wrote:
>
> > Be careful using many third party lib's which are more like hobby-
> > projects and will not be updated when gwt will come out with a new
> > version such that you can't make the switch to the new gwt version
> > I try to do everything myself and learn from others... I already had a
> > few times that I was using other frameworks and couldn't make the gwt
> > update when I wanted, but had to wait till all frameworks made the
> > switch... or didn't made the switch at all. :(
>
> > GWT is awesome, short learning curve for simple things, and makes it
> > very easy to create nice things which people then want to share with
> > others... So they drop it in a google code project and never look back
> > to it anymore
>
> > Of course there are also very good lib's like smartgwt and gxt
> > (before: mygwt)... The latter one cost a bit, but there for future
> > proof and has a very nice MVC implementation with dispatcher
> > integration that is well suited for more complex app's and is very
> > lean and mean...
>
> > Goodluck,
> > Ed

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



Re: gwt-dispatch, gwt-presenter, mvp4g

2010-03-21 Thread Jamie Gennis
I'll take this opportunity to insert a shameless plug for
gwt-remote-action as an
alternative to gwt-dispatch.  The idea behind gwt-remote-action is that it
enables use of the command pattern using the same RPC interface as
traditional GWT RPC.  This means you don't have to build your app from the
ground up with the command pattern in mind, but rather you can just use
normal GWT RPC and then augment it later when you need caching,
transactions, undo, or any other command pattern goodness.

You can also check out
gwt-remote-action-extension
for
a library than enables the use of Gilead with gwt-remote-action as well as a
demo app.

Best,
Jamie

On Sun, Mar 21, 2010 at 8:35 AM, zggame  wrote:

> I second that idea.  I start to really understand the gwt-presenter by
> reading its code.  It is actually not that complicated and teach me
> some really nice lessons.  And you also see a few short-coming of it.
> It is open-source under BSD.  So you can do whatever to fit it for
> your purpose.
>
> On Feb 28, 5:58 pm, Geraldo Lopes  wrote:
> > Initiatives like gwt-dispatch andgwt-presenterare welcome.
> > Reading others code is a very good way to improve our skills.
> > Even if one don't adopt the library it can be very helpful.
> >
> > Keep small (but useful) libraries river flow :)
> >
> > Regards,
> >
> > Geraldo
> >
> > On 28 fev, 15:40, Ed  wrote:
> >
> > > Be careful using many third party lib's which are more like hobby-
> > > projects and will not be updated when gwt will come out with a new
> > > version such that you can't make the switch to the new gwt version
> > > I try to do everything myself and learn from others... I already had a
> > > few times that I was using other frameworks and couldn't make the gwt
> > > update when I wanted, but had to wait till all frameworks made the
> > > switch... or didn't made the switch at all. :(
> >
> > > GWT is awesome, short learning curve for simple things, and makes it
> > > very easy to create nice things which people then want to share with
> > > others... So they drop it in a google code project and never look back
> > > to it anymore
> >
> > > Of course there are also very good lib's like smartgwt and gxt
> > > (before: mygwt)... The latter one cost a bit, but there for future
> > > proof and has a very nice MVC implementation with dispatcher
> > > integration that is well suited for more complex app's and is very
> > > lean and mean...
> >
> > > Goodluck,
> > > Ed
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



JsonpRequestBuilder and JsArray

2010-03-21 Thread A. Kong
Hi, all,

I am still encountering some problem with JsonpRequestBuilder. I hope
anyone may point out what's why with my code.

Basically I have a json server which emits the following data:



[{'Article': {'title': 'Main test2010-03-17 19:21:54.865390'}},
{'Article': {'title': 'Main test2010-03-17 19:25:19.773520'}}]




On GWT front, I have




public void onModuleLoad() {

JsonpRequestBuilder requestBuilder = new JsonpRequestBuilder();
requestBuilder.setCallbackParam("callback");
requestBuilder.requestObject(SERVER_URL, new
MyTestRequestCallback());

}

class MyTestRequestCallback implements
AsyncCallback> {

@Override
public void onFailure(Throwable caught) {
Window.alert("Failed to send the message: " + 
caught.getMessage() +
" " + caught.getStackTrace()[0].toString());
}

@Override
public void onSuccess(JsArray result) {
Window.alert(result.get(0).getTitle());
}




And here is my definition of Article class



public class Article extends JavaScriptObject {

protected Article() {};

public final native String getTitle() /*-{ return this.title; }-*/;

}



The problem is: the result of "result.get(0).getTitle()" is always
null.

Setting the break point in the onSuccess() does not help much. The
content of the valuable is a 'ref n' where n is a number (in the debug
perspective of eclipse)

My questions are
1) What is the likely cause of the failure of capturing 'title'? Any
obvious error in my code?

2) I tried to debug in firebug, but failed to locate where the parsing
of json occurs. When I compiled the project, I used "output style" =
detailed. When I search for ".title" i could not find anything.
Shouldn't the native code be captured in the generated gwt code
intact?

Cheers


-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



GWT Incubator scrolltable

2010-03-21 Thread Kwame
Does anyone have the full source code for this paging scroll table
demo:
http://collectionofdemos.appspot.com/demo/com.google.gwt.gen2.demo.scrolltable.PagingScrollTableDemo/PagingScrollTableDemo.html

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



Re: MVP related question

2010-03-21 Thread Alexander
Good point to place any class that are passed through wire to shared. And I
think its natural
to put RPC interfaces  there too.

On 21 March 2010 20:14, Thomas Broyer  wrote:

>
>
> On Mar 21, 7:52 am, PhilBeaudoin  wrote:
> > In all the examples that I've seen this is in the client package, but
> > now that I think of it, it would make sense to have it in the shared
> > package.
>
> We do not use GWT-RPC in our apps, but I've built a proto recently (to
> get a coworker started on a new project) that uses GWT-RPC (and I'll
> probably use it in another new app), and I've put the interfaces in a
> "shared" package, along with the classes that are passed through GWT-
> RPC.
>
> --
> 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-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>


-- 
Regards,
Alexander

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Two generator questions

2010-03-21 Thread Gal Dolber
You don't need to do that, you can just put a static instance of the
Injector on the injector interface.

2010/3/21 PhilBeaudoin 

> One last update:
> I don't think its a good idea to GWT.create() the ginjector multiple
> times. I got rid of this by creating it once in a static field in my
> entry point class, and then accessing that field within my generated
> class. This brings me to another question:
>
> To find the name of the entry point class, I had to create a
> configuration property. Is there a way, within a generator, to access
> the entry point class defined in the module:
> 
>
>
> On Mar 21, 1:01 am, PhilBeaudoin  wrote:
> > Yeah, well... Method injection didn't work either, the method just
> > never got called (as expected...)
> >
> > I finally was able to make it work using the technique you proposed by
> > initializing the generated classes after the injector is created.
> >
> > Just to give a bit more details to anybody else interested in this...
> >
> > Here is how you define a configuration property in your
> > project.gwt.xml:
> >> valued="false" />
> >> value="com.project.client.gin.MyGinjector" />
> >
> > Here is how you access this property in your generator:
> >   String ginjectorClassName =
> >
> ctx.getPropertyOracle().getConfigurationProperty("gin.injector").getValues(
> ).get(0);
> >
> > Now if you want an injector in the source code you generate you do:
> >   writer.println( ginjectorClassName + " injector = GWT.create(" +
> > ginjectorClassName + ".class);"  );
> >
> > Thanks again Gal. This is a neat trick!
> >
> >Philippe
> >
> > On Mar 20, 8:34 pm, PhilBeaudoin  wrote:
> >
> >
> >
> > > Thanks Gal, it really helped!
> >
> > > I'm not quite sure I know how to "include a folder in my lookup
> > > entries". Is this something I can do in Eclipse debugger?
> >
> > > The idea of using the injector directly didn't quite work, because I
> > > need my generated class to be instanciated .asEagerSingleton(). If I
> > > try calling GWT.create( MyGingector ) within the generated class I get
> > > infinite recursion. If I instead try to assign the MyGingector
> > > instance to some static variable, it doesn't work either because the
> > > variable isn't initialized yet.
> >
> > > However, I've decided to rework my generated class to use method
> > > injection instead of constructor injection and it seems to work very
> > > well!
> >
> > > Cheers,
> >
> > > Philippe
> >
> > > On Mar 20, 7:31 pm, Gal Dolber  wrote:
> >
> > > > Ok,
> >
> > > > To view the generated class compile with "-gen /somepathonyourdisk",
> another
> > > > tip to debug a generated class: include in your lookup entries the
> folder
> > > > where the generated classes are and you will be able to step through
> the
> > > > generated code.
> >
> > > > And to use gin into your generated class I didn't found a great
> solution,
> > > > because you can inject an interface that is generated but gin just
> make a
> > > > GWT.create(theinterface.class); and it wont inject into the generated
> class.
> >
> > > > This is what I did:
> > > > Add an set-configuration-property into your module (define it first)
> and
> > > > specify on it the location of your injector, then use directly the
> injector
> > > > into your generated code. Like this:
> >
> > > >  > > > value="com.some.gin.MyGinInjector" />
> >
> > > > Regards
> >
> > > > 2010/3/20 PhilBeaudoin 
> >
> > > > > I'm trying to write my first GWT generator... I've gotten pretty
> far,
> > > > > but I have the following questions:
> > > > > 1) Is there any way to see the generated class for debugging
> purposes?
> > > > > For example, can I force GWT to produce the .java file for my
> > > > > generated class (it did it once when I had an error, but I can't
> force
> > > > > it to produce it every time.) Any other hints as to how to debug a
> > > > > generated class?
> > > > > 2) I'd like to use GIN to inject objects in the constructor of the
> > > > > generated class. I'm not quite sure if this works or how to make it
> > > > > work. Any hints would be great!
> >
> > > > > 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-tool...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to
> > > > > google-web-toolkit+unsubscr...@googlegroups.com cr...@googlegroups.com>
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

Re: Two generator questions

2010-03-21 Thread Philippe Beaudoin
Yes. Much simpler indeed. Would you believe I didn't even know you could
have static instances attached to interfaces... I'm still relatively new to
Java. :)

Cheers and thanks again.

On Sun, Mar 21, 2010 at 2:02 PM, Gal Dolber  wrote:

> You don't need to do that, you can just put a static instance of the
> Injector on the injector interface.
>
> 2010/3/21 PhilBeaudoin 
>
>> One last update:
>> I don't think its a good idea to GWT.create() the ginjector multiple
>> times. I got rid of this by creating it once in a static field in my
>> entry point class, and then accessing that field within my generated
>> class. This brings me to another question:
>>
>> To find the name of the entry point class, I had to create a
>> configuration property. Is there a way, within a generator, to access
>> the entry point class defined in the module:
>> 
>>
>>
>> On Mar 21, 1:01 am, PhilBeaudoin  wrote:
>> > Yeah, well... Method injection didn't work either, the method just
>> > never got called (as expected...)
>> >
>> > I finally was able to make it work using the technique you proposed by
>> > initializing the generated classes after the injector is created.
>> >
>> > Just to give a bit more details to anybody else interested in this...
>> >
>> > Here is how you define a configuration property in your
>> > project.gwt.xml:
>> >   > > valued="false" />
>> >   > > value="com.project.client.gin.MyGinjector" />
>> >
>> > Here is how you access this property in your generator:
>> >   String ginjectorClassName =
>> >
>> ctx.getPropertyOracle().getConfigurationProperty("gin.injector").getValues(
>> ).get(0);
>> >
>> > Now if you want an injector in the source code you generate you do:
>> >   writer.println( ginjectorClassName + " injector = GWT.create(" +
>> > ginjectorClassName + ".class);"  );
>> >
>> > Thanks again Gal. This is a neat trick!
>> >
>> >Philippe
>>
>> >
>> > On Mar 20, 8:34 pm, PhilBeaudoin  wrote:
>> >
>> >
>> >
>> > > Thanks Gal, it really helped!
>> >
>> > > I'm not quite sure I know how to "include a folder in my lookup
>> > > entries". Is this something I can do in Eclipse debugger?
>> >
>> > > The idea of using the injector directly didn't quite work, because I
>> > > need my generated class to be instanciated .asEagerSingleton(). If I
>> > > try calling GWT.create( MyGingector ) within the generated class I get
>> > > infinite recursion. If I instead try to assign the MyGingector
>> > > instance to some static variable, it doesn't work either because the
>> > > variable isn't initialized yet.
>> >
>> > > However, I've decided to rework my generated class to use method
>> > > injection instead of constructor injection and it seems to work very
>> > > well!
>> >
>> > > Cheers,
>> >
>> > > Philippe
>> >
>> > > On Mar 20, 7:31 pm, Gal Dolber  wrote:
>> >
>> > > > Ok,
>> >
>> > > > To view the generated class compile with "-gen /somepathonyourdisk",
>> another
>> > > > tip to debug a generated class: include in your lookup entries the
>> folder
>> > > > where the generated classes are and you will be able to step through
>> the
>> > > > generated code.
>> >
>> > > > And to use gin into your generated class I didn't found a great
>> solution,
>> > > > because you can inject an interface that is generated but gin just
>> make a
>> > > > GWT.create(theinterface.class); and it wont inject into the
>> generated class.
>> >
>> > > > This is what I did:
>> > > > Add an set-configuration-property into your module (define it first)
>> and
>> > > > specify on it the location of your injector, then use directly the
>> injector
>> > > > into your generated code. Like this:
>> >
>> > > > > > > > value="com.some.gin.MyGinInjector" />
>> >
>> > > > Regards
>> >
>> > > > 2010/3/20 PhilBeaudoin 
>> >
>> > > > > I'm trying to write my first GWT generator... I've gotten pretty
>> far,
>> > > > > but I have the following questions:
>> > > > > 1) Is there any way to see the generated class for debugging
>> purposes?
>> > > > > For example, can I force GWT to produce the .java file for my
>> > > > > generated class (it did it once when I had an error, but I can't
>> force
>> > > > > it to produce it every time.) Any other hints as to how to debug a
>> > > > > generated class?
>> > > > > 2) I'd like to use GIN to inject objects in the constructor of the
>> > > > > generated class. I'm not quite sure if this works or how to make
>> it
>> > > > > work. Any hints would be great!
>> >
>> > > > > 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-tool...@googlegroups.com.
>> > > > > To unsubscribe from this group, send email to
>> > > > > google-web-toolkit+unsubscr...@googlegroups.com> cr...@googlegroups.com>
>> > > > > .
>> > > > > For more options, visit this group at
>> > > > >http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>> --
>> 

Re: DockLayoutPanel blank

2010-03-21 Thread Marcelo Sena
Thanks for the help and the tips, it worked!

On Mar 21, 12:29 pm, zggame  wrote:
> A small typo.   I think RootLayoutPanel only has get(), not get(String
> element).  So there can only be one RootLayoutPanel, which anchors on
> .  Generally, I found it is better not to mix  *layoutPanels and
> old panels.  Things are easily screwed up.  I once put a simplePanel
> in a DockLayoutPanel and that one disappears from time to time.  I
> change the simplePanel to LayoutPanel and it works fine since.
>
> On Mar 21, 7:40 am, Jaan  wrote:
>
> > Layout panels must be added into to the RootLayoutPanel, not
> > RootPanel.
>
> > So change
> >  RootPanel.get("zodiacEntryPoint").add(lol);
> > to
> >  RootLayoutPanel.get("zodiacEntryPoint").add(lol);
>
> > and everything should work.
>
> > On Mar 20, 8:55 pm, Marcelo Sena  wrote:
>
> > > DockLayoutPanel lol = new DockLayoutPanel(Unit.PX);
> > > lol.add(new Label("LOL"));
> > > RootPanel.get("zodiacEntryPoint").add(lol);
>
> > > This code produces no output.
>
> > > RootPanel.get("zodiacEntryPoint").add(new Label("LOL"));
>
> > > This code shows "LOL" at left side of the page.
>
> > > Here is the root HTML of the application:
>
> > >  > > "http://www.w3.org/TR/html4/loose.dtd";>
> > > 
> > >   
> > >     
> > >     
> > >     
> > >   
>
> > >   
> > >     
> > >   
> > > 
>
> > > Why can't DockLayoutPanel render?
>
> > > I'm using Firefox 3.5

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.




Re: JsonpRequestBuilder and JsArray

2010-03-21 Thread Thomas Broyer


On Mar 21, 8:00 pm, "A. Kong"  wrote:
> Hi, all,
>
> I am still encountering some problem with JsonpRequestBuilder. I hope
> anyone may point out what's why with my code.
>
> Basically I have a json server which emits the following data:
>
> 
>
> [{'Article': {'title': 'Main test2010-03-17 19:21:54.865390'}},
> {'Article': {'title': 'Main test2010-03-17 19:25:19.773520'}}]
>
> 
>
> On GWT front, I have
>
> 
>
> public void onModuleLoad() {
>
>                 JsonpRequestBuilder requestBuilder = new 
> JsonpRequestBuilder();
>                 requestBuilder.setCallbackParam("callback");
>                 requestBuilder.requestObject(SERVER_URL, new
> MyTestRequestCallback());
>
>         }
>
>         class MyTestRequestCallback implements
> AsyncCallback> {
>
>                 @Override
>                 public void onFailure(Throwable caught) {
>                         Window.alert("Failed to send the message: " + 
> caught.getMessage() +
> " " + caught.getStackTrace()[0].toString());
>                 }
>
>                 @Override
>                 public void onSuccess(JsArray result) {
>                         Window.alert(result.get(0).getTitle());
>                 }
>
> 
>
> And here is my definition of Article class
>
> 
> public class Article extends JavaScriptObject {
>
>         protected Article() {};
>
>         public final native String getTitle() /*-{ return this.title; }-*/;
>
> }
>
> 
>
> The problem is: the result of "result.get(0).getTitle()" is always
> null.
>
> Setting the break point in the onSuccess() does not help much. The
> content of the valuable is a 'ref n' where n is a number (in the debug
> perspective of eclipse)
>
> My questions are
> 1) What is the likely cause of the failure of capturing 'title'? Any
> obvious error in my code?

Your code does the JS equivalent to "the_array[0].title" while given
the data snippet you gave it should be the_array[0].Article.title.

> 2) I tried to debug in firebug, but failed to locate where the parsing
> of json occurs. When I compiled the project, I used "output style" =
> detailed. When I search for ".title" i could not find anything.
> Shouldn't the native code be captured in the generated gwt code
> intact?

There's no "JSON parsing" with "JSON-P" as it's just JavaScript, not
JSON at all. IMO, you should find ".title" but maybe it has been
rewritten as the_obj["title"], with the String "interned" in a
"global" variable. Search for ".alert" instead ;-)

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: JsonpRequestBuilder and JsArray

2010-03-21 Thread A. Kong
Hi, Thomas,

Thanks very much for the quick reply!

I am away from the workstation where the work is, so I cannot give
your suggestion a go yet.

But I have a question about the remedy you suggested, namely to access
the 'title' field using '_array[0].Article.title'

In my case, I would have expected GWT to be able to understand the
JSON "[]" representation as an array. GWT should be able to dispatch
each individual element in the array to Article class, which will use
native methods to map out individual attributes. That's why I assume
"this" in "this.title" correspond to "Aritcle:{...}"

Now let's say I changed the native code to 'array[0].Article.title'.
Then what will happen if i use another server interface that returns a
single Article? The callback will now become AsyncCallback
and array is not present in the json data.

I hope I did not sound too confusing. Maybe there is a gap in how I
understand the JNI works

Cheers



On Mar 22, 9:43 am, Thomas Broyer  wrote:
> On Mar 21, 8:00 pm, "A. Kong"  wrote:
>
>
>
> > Hi, all,
>
> > I am still encountering some problem with JsonpRequestBuilder. I hope
> > anyone may point out what's why with my code.
>
> > Basically I have a json server which emits the following data:
>
> > 
>
> > [{'Article': {'title': 'Main test2010-03-17 19:21:54.865390'}},
> > {'Article': {'title': 'Main test2010-03-17 19:25:19.773520'}}]
>
> > 
>
> > On GWT front, I have
>
> > 
>
> > public void onModuleLoad() {
>
> >                 JsonpRequestBuilder requestBuilder = new 
> > JsonpRequestBuilder();
> >                 requestBuilder.setCallbackParam("callback");
> >                 requestBuilder.requestObject(SERVER_URL, new
> > MyTestRequestCallback());
>
> >         }
>
> >         class MyTestRequestCallback implements
> > AsyncCallback> {
>
> >                 @Override
> >                 public void onFailure(Throwable caught) {
> >                         Window.alert("Failed to send the message: " + 
> > caught.getMessage() +
> > " " + caught.getStackTrace()[0].toString());
> >                 }
>
> >                 @Override
> >                 public void onSuccess(JsArray result) {
> >                         Window.alert(result.get(0).getTitle());
> >                 }
>
> > 
>
> > And here is my definition of Article class
>
> > 
> > public class Article extends JavaScriptObject {
>
> >         protected Article() {};
>
> >         public final native String getTitle() /*-{ return this.title; }-*/;
>
> > }
>
> > 
>
> > The problem is: the result of "result.get(0).getTitle()" is always
> > null.
>
> > Setting the break point in the onSuccess() does not help much. The
> > content of the valuable is a 'ref n' where n is a number (in the debug
> > perspective of eclipse)
>
> > My questions are
> > 1) What is the likely cause of the failure of capturing 'title'? Any
> > obvious error in my code?
>
> Your code does the JS equivalent to "the_array[0].title" while given
> the data snippet you gave it should be the_array[0].Article.title.
>
> > 2) I tried to debug in firebug, but failed to locate where the parsing
> > of json occurs. When I compiled the project, I used "output style" =
> > detailed. When I search for ".title" i could not find anything.
> > Shouldn't the native code be captured in the generated gwt code
> > intact?
>
> There's no "JSON parsing" with "JSON-P" as it's just JavaScript, not
> JSON at all. IMO, you should find ".title" but maybe it has been
> rewritten as the_obj["title"], with the String "interned" in a
> "global" variable. Search for ".alert" instead ;-)

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Explanation needed for many to many example

2010-03-21 Thread Dave
This is the code below for many to many that I found on App engine. I
am puzzled about the last line code. I do not know where getKey() gets
it values from in the line  food.getFoodFans().add(getKey()); Could
some please explain. Thanks.

Person.java

import java.util.Set;
import com.google.appengine.api.datastore.Key;

// ...
@Persistent
private Set favoriteFoods;

Food.java

import java.util.Set;
import com.google.appengine.api.datastore.Key;

// ...
@Persistent
private Set foodFans;

Album.java
// ...
public void addFavoriteFood(Food food) {
favoriteFoods.add(food.getKey());
food.getFoodFans().add(getKey());
}



-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



com.google.gwt.eclipse.core.gwtNature

2010-03-21 Thread Jim
I want to create a Google Application Project from Java Code instead
of IDE. How can I do it? Is Google Eclipse Plugin for GWT open source?
I know how to create a Java project through Java code like:

final IProjectDescription description
= project.getDescription();
description.setNatureIds(new String[] 
{JavaCore.NATURE_ID,
ProjectNature.NATURE_ID});
description.setLocation(null);  //default 
location


I do appreciate it if you can show me how to download the source code
if it is open source and how to use Google Eclipse Plugin in java
code.


Jim

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to capture that the user has moved away from the current browser window.

2010-03-21 Thread Subhrajyoti Moitra
Thanks a lot Thomas for pointing me to the right direction.
I need to spend some more time into this!!

Thanks,
Subhro.

On Fri, Mar 19, 2010 at 8:50 PM, Thomas Broyer  wrote:

>
> On Mar 19, 5:20 am, subhro  wrote:
> > Hello,
> > I am trying to implement a google.com search form style auto-suggest
> > box.
> >
> > I have reached a stage where the drop down with suggestions appear
> > correctly.
> > However on changing windows (click on any other app window on the
> > desktop)  The or click any where else other that the "body" of the
> > page, DOES NOT close the drop down. I would idealy like to close this
> > drop down the moment the user clicks on anything else other than the
> > "current application page"
> >
> > Using firebug i found that google uses a hidden table, to display all
> > the suggestions. It sets the visibility to hidden the moment the user
> > moves away from the current window to any other window. How do you
> > detect that the user has moved away from the current window?
> >
> > Onblur of the auto-suggest textfield does not seem to work in this
> > case.
> >
> > How are gwt experts on this list solving this "loss of focus on the
> > current browser window" event in the any GWT page?
> >
> > Any pointers in this direction would be appreciated.
>
> I can only point you to an open issue about adding focus/blur event
> handling at the Window level:
> http://code.google.com/p/google-web-toolkit/issues/detail?id=68
>
> AFAICT the only missing thing is someone to take the time to put it
> all together, as the issue page gives all the necessary information to
> implement it reliably in all supported browsers.
>
> --
> 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-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



what event does the PopupPanel use to autohide?

2010-03-21 Thread Tristan
Hi,

I'm trying to automate my testing via Selenium. When I do it myself by
hand, the popup panel hides when I click outside of it (ie.. it works
as expected), however when I use selenium.click or clickAt or
fireEvent blur or mouseDownAt, etc... i cannot get the popup panel to
hide and my test fails. Is there a specific event that PopupPanel
listens to? I'm using selenium rc and safari browser.

Cheers!

Tristan

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: FileUpload widget trouble

2010-03-21 Thread malliseven.hills
Hi,

i think the following links would be help full for  you :

http://java-malli.blogspot.com/2010/03/gwt-upload-file.html  (Client Side).

http://java-malli.blogspot.com/2010/03/file-upload-server-side.html  (sever
side   i'm using Spread Sheet Loading ).

Thanks,
Malli.



On Sat, Mar 20, 2010 at 6:26 AM, gpan...@gmail.com  wrote:

> FormPanel only takes a single widget (its a subclass of SimplePanel).
> You have to add your form widgets to a single sub-panel (eg:
> FlowPanel) and then add that to FormPanel.
>
> Oh, BTW, I'm having the same problem w/ FileUpload. No file data gets
> sent to the server. Sounds like a bug in GWT to me. Any ideas where to
> find a solution?
>
>
>
> On Mar 8, 6:25 am, Martin Trummer  wrote:
> > I guess you must add thefileuploadto the form - not to the panel
> > so call: form.add(fuAppSrcZip);
> >
> > On 7 Mrz., 20:19, Víctor Llorens Vilella 
> > wrote:
> >
> >
> >
> > > Thanks Bimbo.
> >
> > > I have tried it with no luck.
> > > I'm working with Chrome.
> >
> > > For testing, I have tried with Firefox and ,well..., submit button is
> doing
> > > anything.
> >
> > > Maybe is this widget buggy? I'm working, and may work with GWT 2.0.0.
> >
> > > On 7 March 2010 16:51, BimboJones  wrote:
> >
> > > > Hi,
> >
> > > > Have you tried do the add(panel) after you assign the handlers?
> >
> > > > On 6 Mar, 19:20, Victor Llorens  wrote:
> > > > > Hi all,
> >
> > > > > I have aFileUploadand a Button in a GridPanel.
> > > > > Once Button is clicked I submit the form.
> >
> > > > > Analyzing HTTP Traffic, I can see that Post data is void... no file
> is
> > > > > sent.
> >
> > > > > Does some body know what could be the reason?
> >
> > > > > I attach some info:
> >
> > > > > POST /TFC_Server_unstable/AppReceiver HTTP/1.1
> > > > > Host: localhost:8080
> > > > > Connection: keep-alive
> > > > > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
> > > > > AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.89Safari/532.5
> > > > > Referer:
> > > >http://localhost:8080/TFC_Server_unstable/?gwt.codesvr=127.0.0.1:9997
> > > > > Content-Length: 44
> > > > > Cache-Control: max-age=0
> > > > > Origin:http://localhost:8080
> > > > > Content-Type: multipart/form-data; boundary=
> > > > > WebKitFormBoundary1I85m0l32DvdcUiI
> > > > > Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/
> > > > > plain;q=0.8,image/png,*/*;q=0.5
> > > > > Accept-Encoding: gzip,deflate,sdch
> > > > > Cookie: JSESSIONID=E576D094A24EE9FEF71DA7EF0FDC7801
> > > > > Accept-Language: es-ES,es;q=0.8
> > > > > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
> >
> > > > > --WebKitFormBoundary1I85m0l32DvdcUiI--
> >
> > > > > Code:
> >
> > > > > Grid panel = new Grid(5,2);
> > > > > final FormPanel form = new FormPanel();
> > > > > form.setWidget(panel);
> >
> > > > > form.setEncoding(FormPanel.ENCODING_MULTIPART);
> > > > > form.setMethod(FormPanel.METHOD_POST);
> > > > > form.setAction("/TFC_Server_unstable/AppReceiver");
> >
> > > > > // Create aFileUploadwidget.
> > > > >FileUploadfuAppSrcZip = newFileUpload();
> > > > > fuAppSrcZip.setName("uploadFile");
> > > > > panel.setWidget(0,1,fuAppSrcZip);
> >
> > > > > btnPreviousStep = new Button("Previous Step");
> > > > > btnNextStep = new Button("Upload and save everything");
> > > > > btnNextStep.setEnabled(false);
> > > > > panel.setWidget(1,0,btnPreviousStep);
> > > > > panel.setWidget(1,1,btnNextStep);
> >
> > > > > add(panel);
> >
> > > > > // handlers
> >
> > > > > fuAppSrcZip.addChangeHandler(new ChangeHandler() {
> >
> > > > > @Override
> > > > > public void onChange(ChangeEvent event) {
> > > > > btnNextStep.setEnabled(true);
> > > > > }
> > > > > });
> >
> > > > > btnNextStep.addClickHandler(new ClickHandler() {
> >
> > > > > @Override
> > > > > public void onClick(ClickEvent event) {
> > > > > System.out.println(form.getAction());
> >
> > > > > form.submit();
> > > > > }
> > > > > });
> > > > > btnPreviousStep.addClickHandler(new ClickHandler() {
> > > > > @Override
> > > > > public void onClick(ClickEvent event) {
> > > > > controller.previousStep();
> > > > > }
> > > > > });
> >
> > > > > // Add an event handler to the form.
> > > > > form.addSubmitHandler(new SubmitHandler() {
> > > > > @Override
> > > > > public void onSubmit(SubmitEvent event) {
> > > > > controller.aplicationSubmitStart();
> > > > > }
> > > > > });
> > > > > form.addSubmitCompleteHandler(new
> > > > > FormPanel.SubmitCompleteHandler() {
> > > > > @Override
> > > > > public void onSubmitComplete(SubmitCompleteEve

Re: Class Observer/Observable not emulated

2010-03-21 Thread Nathan Wells
Can't speak for the GWT team here, but this could be a reason:

http://forums.sun.com/thread.jspa?threadID=5336733

On Mar 20, 10:43 am, jcb  wrote:
> I am very satisfied with gwt, and I am making a simple gwt app with
> just client side code.
> I  want to separate model and view, so I wanted to use the simple
> Observer/Observable classes of java.util but it is not emulated in GWT
> (cf. references).
> Someone know why these classes are not emulated ?
>
> Of course it's not a big issue I can create similar classes in client
> side, but it seems a pity if we have to invent/copy again the wheel.

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT 1.3 and firefox 3.6

2010-03-21 Thread Roland
Yes, after paying more attenition, discovered that
$doc.getBoxObjectFor is not a function was thrown.

Got it fixed following this:

http://www.mail-archive.com/google-web-toolkit@googlegroups.com/msg36310.html

But I'd like to know whether this is a failure only for gwt's earlier
versions or not?

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



gwt for a servlet / jsp guy....

2010-03-21 Thread JayUnit100
Hi guys I'm trying to wrap my head around GWT.  I want to bundle
it into a simple FrontMan based web app, with a controller and some
jsps.

However, I'm realizing that maybe I need to "think"  a little
differently with GWT.  That is, so much stuff about web app
development that we take for granted is BASED on the idea that there
is a client and a server.  With GWT, I'm not sure what variables I
should put in  my "client" classes, and what I should do on the server
side.  Also I dont know where to handle the "M" in MVC.  Im not
interested in downloading an immature GWT-MVC extension framework ---
Id rather work with GWT as is, and create my own MVC.

Any thoughts on these issues ?

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



[Newbie] "java.net.SocketException: Invalid argument" when running devmode

2010-03-21 Thread Chihab Otmani
Hi all,

I've got the following errors when running the development mode code
server as described in this tutorial: 
http://code.google.com/webtoolkit/doc/latest/tutorial/create.html,
either using eclipse or webAppcreator ant.

When using Eclipse, the following message is displayed in the
console :
"Could not connect to remote UI listening at localhost:52134. Using
default UI instead."
The GWT development Mode window is displayed. According to the Web
Server tab, AppEngine seems to be started. The Development mode tab
shows a Communications error -- exception SocketException the detailed
trace is :

java.net.SocketException: Invalid argument
  at java.net.PlainSocketImpl.socketBind(Native Method)
  at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
  at java.net.ServerSocket.bind(ServerSocket.java:319)
  at java.net.ServerSocket.bind(ServerSocket.java:277)
  at
com.google.gwt.dev.shell.BrowserListener.(BrowserListener.java:
67)
  at
com.google.gwt.dev.DevModeBase.ensureCodeServerListener(DevModeBase.java:
898)
  at com.google.gwt.dev.DevModeBase.doStartup(DevModeBase.java:888)
  at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1030)
  at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:783)
  at com.google.gwt.dev.DevMode.main(DevMode.java:275)


When using webAppCreator (from the GWT eclipse plugin installation
folder) and then "ant devmode" to test, I've got:
devmode:
 [java] Unable to start embedded HTTP server
 [java] java.net.SocketException: Invalid argument
 [java] at sun.nio.ch.Net.bind(Native Method)
 [java] at
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:
119)
 [java] at
sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:
59)
 [java] at
org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:
205)
 [java] at
org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:
304)
 [java] at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
 [java] at org.mortbay.jetty.Server.doStart(Server.java:
233)
 [java] at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
 [java] at
com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:
543)
 [java] at
com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:
421)
 [java] at
com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:
1035)
 [java] at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:
783)
 [java] at com.google.gwt.dev.DevMode.main(DevMode.java:275)

Do you have an idea where these errors come from ?

My environment:
* Eclipse Galileo 3.5.2 with Java EE IDE Feature 1.2.2
* Google App Engine Java SDK 1.3.1
* Google Plugin for Eclipse 1.3.1
* Google Web Toolkit SDK 2.0.3
* Debian Testing amd64, Linux 2.6.32
* Java version "1.6.0_16" (Java HotSpot(TM) 64-Bit Server VM (build
14.2-b01, mixed mode))
* Apache Ant version 1.8.0

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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Using -noserver option in GWT project

2010-03-21 Thread shree
Can anyone help me to understand that how to use -noserver option in
my GWT project?
Please give me the detailed steps also some screen shots will be
beneficial(if possible).
Please,please reply immediately.

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



GWT + SPRING SECURITY

2010-03-21 Thread larry
Hi all.
I'm new here. I'm currently using gwt 1.7 gwt-ext 2.0.x, spring 2.5
and spring-security 2.0.4. I met a problem that I have tried to get a
solution for two days with no answer yet. The problem is that any
unprotected gwt pages return blank with an error message "Line: 2
Char: 1 Error: Syntax error Code:0". But if user was authenticated and
redirect to those pages they return fine.
I know this is because of spring-security added on. What I did is
trying to create a gwt login form to replace my old JSP login page.
But this gwt login page is returned with above error. I changed my
security configuration settings in many ways but none of them work.
Here is my configuration:

http://www.springframework.org/schema/
security"
xmlns:beans="http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
   http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-2.0.4.xsd";>



  
  
 


 
  












..

I even just put a "Hello word" in my Login page it still doesn't work.

Please if anyone has the experience of this let me know. 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Tree and Composites

2010-03-21 Thread Talmge
When I add a simple Widget to a tree (Such as a checkbox or call
addItem with a string) I can select the item -- that is, if I click on
it the blue background appears around the text showing me that I
selected that node in the tree.

With other widgets such as labels or composites that blue background
does not appear around the selected node, and I have no way of
visually knowing it was selected. I imagine this is me not
understanding how the click events are not being handled and was
wondering if someone could indicate the right way to accomplish this?

public class MyTest implements EntryPoint
{

public void onModuleLoad()
{


Tree editTree = new Tree();
editTree.setWidth("98%");

TreeItem treeRoot = new TreeItem("Tree Root");

treeRoot.addItem("I can Be Selected");
treeRoot.addItem(new Label("I can't Be selected"));
treeRoot.addItem(new CheckBox("I am a checkbox, and I can be
selected as well."));
treeRoot.addItem(new SomeComposite());

editTree.addItem(treeRoot);

RootLayoutPanel.get().add(editTree);

}


public class SomeComposite extends Composite
{

public SomeComposite()
{

super.initWidget(new HTML("I am a composite and I can't 
be selected
either."));

}

}
}

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Save page content using gwt

2010-03-21 Thread Rijin
help please

how save a url content and existence of a url  using gwt code..help
please...?

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Problems with Eclipse Plugin

2010-03-21 Thread moe
Hey,

after installing the GWT Plugin, I want to change the directory of
Eclipse - it was in my downloads folder.
But now the Google SDKs aren't found any more by Eclipse.
To change the directory first and then install didn't work either.
I use Mac OS X 10.6, Eclipse 3.5.2 (64 bit) and GWT 2.0.3.

Thanks for any help!

Moe

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT 2.0.3 + Maven2 + Eclipse

2010-03-21 Thread mkkm...@gmail.com
2.0.x
x can be 0, 1, 2 or 3.

Michael

On 21 mar, 03:03, zggame  wrote:
> I am fairly new to maven.  I might miss something in their
> description.  Do you just need to change
> 1.6.4 to 2.0?  thanks.
>
> Sincerely
> Zhu, Guojun
>
> On Mar 18, 3:45 pm, Piotr Jaroszyñski  wrote:
>
>
>
> > On 18 March 2010 19:28, Sergio  wrote:
>
> > > So, I have to use GWT 1.6.4 to develop my GWT project with maven?
>
> > Not at all, see:http://mojo.codehaus.org/gwt-maven-plugin/
>
> > --
> > Best Regards
> > Piotr Jaroszyñski

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



HorizontalSplitPanel children

2010-03-21 Thread TM
Hi, I'm having quite a lot of trouble with panels and layouts. My app
currently consists of a DockPanel containing a HorizontalSplitPanel,
which in turn contains various widgets either side of the split.

However, when the HorizontalSplitPanel splitter is moved nothing
happens to the sizes of the child widgets. I have set their widths to
100%, so I was expecting them to fill the available space.

I already have added a custom resize handler to make the DockPanel
fill the client area when the browser is resized. Would I have to do
something similar for every other panel that might resize?

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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.