GWT M3 StackLayoutPanel Styles

2010-10-02 Thread Rud
I've gone through all the old messages on putting style on this panel
and read
http://code.google.com/p/google-web-toolkit/issues/detail?id=4429
which, I got the impression, was supposed to make styles work.

I can't seem to figure out how. Since TabLayoutPanel had similar
problems and I want to use it, also, I'm asking for help on this. The
important part is for the background to match my overall page
background, which isn't white.

I am working with UiBinder.

In the stack I have a VerticalPanel containing a Label. I can style
the Label but it is left with white around the edges. Some of the
style set on VerticalPanel is inherited by the lable, e.g. text bold.

I've tried overriding gwt-StackLayoutPanelContent in the main CSS. It
will change text boldness but not the background color.

Any suggestions on how I can make this work?

Rud
http://MysticLakeSoftware.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-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 M3 StackLayoutPanel Styles

2010-10-02 Thread Y2i
May be com.google.gwt.user.theme.dark/chrome in gwt-usr.jar will help?


On Oct 1, 11:33 pm, Rud rudmerr...@gmail.com wrote:
 I've gone through all the old messages on putting style on this panel
 and readhttp://code.google.com/p/google-web-toolkit/issues/detail?id=4429
 which, I got the impression, was supposed to make styles work.

 I can't seem to figure out how. Since TabLayoutPanel had similar
 problems and I want to use it, also, I'm asking for help on this. The
 important part is for the background to match my overall page
 background, which isn't white.

 I am working with UiBinder.

 In the stack I have a VerticalPanel containing a Label. I can style
 the Label but it is left with white around the edges. Some of the
 style set on VerticalPanel is inherited by the lable, e.g. text bold.

 I've tried overriding gwt-StackLayoutPanelContent in the main CSS. It
 will change text boldness but not the background color.

 Any suggestions on how I can make this work?

 Rudhttp://MysticLakeSoftware.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-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 Spring integration - what is the best method in late 2010?

2010-10-02 Thread George Georgovassilis

Hello David  al,

The SL is also actively maintained - releases are not that frequent 
anymore though (there's not much to do) because of the high maturity grade.



David wrote:

Any other feedback about this ?
What's odd is that we are still asking this very same question after
several years of existence of both frameworks, don't you think ?

So, we have :
- GWT SL
- Spring4GWT
- Gwt-dispatch
- gwt-spring

(My) Questions are :
- which of them are still maintained ?
- which of them do provide a compatibility with the latest versions of
GWT and Spring ?
- which of them are non intrusive ?

David

On 20 sep, 23:41, Jason Hatton jashat...@gmail.com wrote:
  

Hey lalit,

I will take a look at this further this was and example of how to implement
Spring on a previous version and is basically the servlet example class I
posted earlier.  I will take a look at the newer version of gwt-dispatch to
see what else has been included.  We were waiting on upgrading but this
peaks my interested on upgrading sooner.  WebApplication context is just
Spring's way of bootstrapping an application context in a web container.
 What that class does is grab the application context wires in the
DispatchServlet so POJOS can be injected in to all the classes it supports.
 Definitely it is in the spring-web jar  but it appears that is the only
Spring feature gwt-dispatch project takes advantage of.  If you take a look
at the ActionHandler and base dispatch classes you don't see any other
Springy stuff.

Gwt-dispatch helps us to avoid having to code the separate interfaces.  We
just code actions, action handlers, and result objects.  All the dispatch
traffic routes through the one GWT-RPC service that gwt-dispatch implements.
 All the async workings have to be there but, we get to work on valuable
object interactions and avoid ceremonial grunt work which always makes
coding more fun.

Later,
Jas

On Fri, Sep 17, 2010 at 1:12 AM, lalit lalit.bh...@gmail.com wrote:


Hi Jason,
  
I agree that both the approaches are same. But I still have a feeling

that gwtDispatch uses Spring MVC infra to do its job. The code that
you have posted above has WebApplicationContext. Also I looked into
gwtDispatch code and it seems it is using Spring MVC infra. The code I
looked into is here
  
http://code.google.com/p/gwt-dispatch/source/browse/src/main/java/net...
  
Another thing you mentioned in your mail that you do not have to code

two interfaces which looked interesting. If possible can you elaborate
on that? We would like to incorporate that in our approach also if
possible.
  
thanks,
  
On Sep 16, 7:15 pm, Jason Hatton jashat...@gmail.com wrote:
  

Lalit we are not using Spring MVC.  We am using gwt-dispatch and have
extended that project's dispatch servlet to get the Spring integration.


 We
  

then added a custom annotation to pick up the appropriate dispatch action
handler for a particular GWT-RPC on the server side.  All of our GWT-RPC
calls go through this servlet so we avoid the overhead and code bloat of
having to create the standard GWT-RPC interfaces for every new service


call
  

we want to implement.  I looked over your example again and they are


pretty
  

similar.  I like your integration approach with Spring but I prefer


service
  

call handling because we don't have to code the two separate RPC


interfaces,
  

 i.e. the Service and ServiceAsync for every service we want to


implement.
  

 We just create an new dispatch handler apply an annotation to it and we


are
  

off and running.

On Wed, Sep 15, 2010 at 11:33 PM, lalit lalit.bh...@gmail.com wrote:


Deepak - I have used the following structure
  SpringApplicationContext, SpringGwtRemoteServiceServlet ,
PersonServiceImpl go into the server side code.
 The interfaces PersonService and PersonServiceAsync  become part of
GWT client side code.
  
Regarding wsdl files consumption see the section on JAX-WS here

http://www.lalitbhatt.com/tiki-index.php?page=JAX-WSespeciallJAX-WS
client side section. This approach uses JAX-WS approach.
  
For data binding you can use JAXB. The details can be seen here

http://www.lalitbhatt.com/tiki-index.php?page=JAXB. JAX-WS anyway uses
it internally.
  
Also just a disclaimer, the approach I took is as per Spring4GWT

project so it's there idea.
  
Jason- I looked into your approach and conceptually they look similar

in terms of that you are redirecting the request to Spring MVC
infrastructure. IMHO the aprroach I took as per Sping4GWT is better as
one does not have to carry the SpringMVC baggage.
  
--

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

Re: GWT panel for HTML UL/LI lists

2010-10-02 Thread Markus Kramer
Yes that's true.
But I don't like the UIBinder stuff that much. There is a lot which I
found difficult to do with UIBinder, so I'll stay with the old way.
Just a personal taste.

On Sep 27, 6:45 am, lalit lalit.bh...@gmail.com wrote:
 Cannot this be done with UIBinder in an easy way? Just write the
 layout in ui.xml and insert  the widget in the li tags.

 On Sep 25, 2:51 am, Markus Kramer tomaton...@googlemail.com wrote:

  Hi, for my current GWT project I wanted to make more use of HTML UL/LI
  elements than the table based layouts that you normally use in GWT
  applications.
  Biggest advantages for me is that other people can make changes to the
  layout/design of the page without having to touch the code itself.

  I couldn't find a class in GWT or anywhere else that helps with that,
  so I wrote my own. I can now create HTML like this:

  ul class=sampleList
    liWidget A/li
    liWidget B/li
  /ul

  with this code:

  UlListPanel ulList = new UlListPanel();
  ulList.addStyleName(sampleList);
  ulList.add(widgetA);
  ulList.add(widgetB);

  For the code go 
  here:http://markusbraindump.blogspot.com/2010/09/gwt-panel-for-html-ulli-l...

  Or did I reinvent the wheel?

  Markus

-- 
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 to convert string to RICHTEXT.FONTSIZE

2010-10-02 Thread bruce
Hello
since there is no toolbarpanel for richtextarea i am trying to make mine.
Everything works except the fontsize.

I am tryng to use this code :
public final static HashMapString, String GUI_FSIZE = new
HashMapString, String();
static {
GUI_FSIZE.file(1,XX_SMALL);

how can I convert string to fontsize?

-- 
Adrien Broussolle

-- 
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 M3 StackLayoutPanel Styles

2010-10-02 Thread Rud
No, the alternate themes don't help because they all set a background
color.

What happens is my override of gwt-StackLayoutPanelContent is applied
and then the theme gwt-StackLayoutPanelContent is applied which undoes
my styles. I looked at it last night (instead of going to bed) using
the Chrome browser developer tools and found this is what is
happening.

I would think my styles should be applied last.


Rud
http://MysticLakeSoftware.com

On Oct 2, 1:49 am, Y2i yur...@gmail.com wrote:
 May be com.google.gwt.user.theme.dark/chrome in gwt-usr.jar will help?

 On Oct 1, 11:33 pm, Rud rudmerr...@gmail.com wrote:



  I've gone through all the old messages on putting style on this panel
  and readhttp://code.google.com/p/google-web-toolkit/issues/detail?id=4429
  which, I got the impression, was supposed to make styles work.

  I can't seem to figure out how. Since TabLayoutPanel had similar
  problems and I want to use it, also, I'm asking for help on this. The
  important part is for the background to match my overall page
  background, which isn't white.

  I am working with UiBinder.

  In the stack I have a VerticalPanel containing a Label. I can style
  the Label but it is left with white around the edges. Some of the
  style set on VerticalPanel is inherited by the lable, e.g. text bold.

  I've tried overriding gwt-StackLayoutPanelContent in the main CSS. It
  will change text boldness but not the background color.

  Any suggestions on how I can make this work?

  Rudhttp://MysticLakeSoftware.com- 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-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 panel for HTML UL/LI lists

2010-10-02 Thread opn
I'm not sure if it works for you, but you can set the tag that a
HTMLPanel represents. It's set to div when you don't specify something
else. I only created a HTMLPanel as an em element one time as a test
and it worked fine.
I'm thinking about creating an ul HTMLPanel and insert li
HTMLPanels into that. Don't know if it works and if it's good to do
that : ) just an idea!

regards
opn

On Oct 2, 11:42 am, Markus Kramer tomaton...@googlemail.com wrote:
 Yes that's true.
 But I don't like the UIBinder stuff that much. There is a lot which I
 found difficult to do with UIBinder, so I'll stay with the old way.
 Just a personal taste.

 On Sep 27, 6:45 am, lalit lalit.bh...@gmail.com wrote:



  Cannot this be done with UIBinder in an easy way? Just write the
  layout in ui.xml and insert  the widget in the li tags.

  On Sep 25, 2:51 am, Markus Kramer tomaton...@googlemail.com wrote:

   Hi, for my current GWT project I wanted to make more use of HTML UL/LI
   elements than the table based layouts that you normally use in GWT
   applications.
   Biggest advantages for me is that other people can make changes to the
   layout/design of the page without having to touch the code itself.

   I couldn't find a class in GWT or anywhere else that helps with that,
   so I wrote my own. I can now create HTML like this:

   ul class=sampleList
     liWidget A/li
     liWidget B/li
   /ul

   with this code:

   UlListPanel ulList = new UlListPanel();
   ulList.addStyleName(sampleList);
   ulList.add(widgetA);
   ulList.add(widgetB);

   For the code go 
   here:http://markusbraindump.blogspot.com/2010/09/gwt-panel-for-html-ulli-l...

   Or did I reinvent the wheel?

   Markus

-- 
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 M3 StackLayoutPanel Styles

2010-10-02 Thread Y2i
It's strange.  I would also think that custom styles would be applied
last:
http://code.google.com/webtoolkit/doc/latest/DevGuideUiCss.html



On Oct 2, 7:40 am, Rud rudmerr...@gmail.com wrote:
 No, the alternate themes don't help because they all set a background
 color.

 What happens is my override of gwt-StackLayoutPanelContent is applied
 and then the theme gwt-StackLayoutPanelContent is applied which undoes
 my styles. I looked at it last night (instead of going to bed) using
 the Chrome browser developer tools and found this is what is
 happening.

 I would think my styles should be applied last.

 Rudhttp://MysticLakeSoftware.com

 On Oct 2, 1:49 am, Y2i yur...@gmail.com wrote:



  May be com.google.gwt.user.theme.dark/chrome in gwt-usr.jar will help?

  On Oct 1, 11:33 pm, Rud rudmerr...@gmail.com wrote:

   I've gone through all the old messages on putting style on this panel
   and readhttp://code.google.com/p/google-web-toolkit/issues/detail?id=4429
   which, I got the impression, was supposed to make styles work.

   I can't seem to figure out how. Since TabLayoutPanel had similar
   problems and I want to use it, also, I'm asking for help on this. The
   important part is for the background to match my overall page
   background, which isn't white.

   I am working with UiBinder.

   In the stack I have a VerticalPanel containing a Label. I can style
   the Label but it is left with white around the edges. Some of the
   style set on VerticalPanel is inherited by the lable, e.g. text bold.

   I've tried overriding gwt-StackLayoutPanelContent in the main CSS. It
   will change text boldness but not the background color.

   Any suggestions on how I can make this work?

   Rudhttp://MysticLakeSoftware.com-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-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.



Difference's in Client Bundle behavior? (much slower? produces lots of jpg's as well on compile?)

2010-10-02 Thread darkflame
I recently tried switching over from Image Bundle to client bundle,
and am not sure if the behavior I'm seeing is intentional or not, so
some confirmation would be nice;

a) Is ClientBundle significantly slower then ImageBundle? Specifically
at changing images (applyto). Whereas before I was getting a decent
frame-rate of animated icons. (done simply by switching between
Abstract-images), now its very slow/flickery and seems to load a fresh
image each time (based on Chrome's resources tab)

b) I don't see an image strip anymore...just massive url(data:)
statements which I assume inline the png data. Is this how the new
system works? Does this explain the slowness of changing one image to
another now? (ie, whereas before it was just shunting co-ordinates,
now its reprocessing stuff)

c) I am now seeing large numbers of jpegs generated on compile. I
still see a few pngs too...which seem to be the normal image strips.
But I also see just each icon as a plan jpeg. I could see this in use
as a backup, but I'm puzzled by the image strips present seeing as the
html doesn't seem to use it :?
---
Now I'm trying to see how expected this behavior is.
Some of it could be caused with how I'm using ClientBundle. As I'm
making extensive use of the ApplyTo functionality, almost all my
images are used as AbstractImagePrototypes.

For example;

...
final static AbstractImagePrototype  BigOpenClueBox =
AbstractImagePrototype.create(JargStaticImages.BIGTitleStripleftOpen());
final static AbstractImagePrototype  MediumOpenClueBox =
AbstractImagePrototype.create(JargStaticImages.MEDIUMTitleStripleftOpen());
final static AbstractImagePrototype  SmallOpenClueBox =
AbstractImagePrototype.create(JargStaticImages.SMALLTitleStripleftOpen());
...
(a lot more)

JargStaticImages is simply an empty extension of another class;

public interface JargImages extends CuypersImages {

}

(this is purely to make it easier for me to switch between image sets
later)

And my CuypersImage class has statements like;
p
ublic interface CuypersImages extends ClientBundle {

...
 @Source(/CuypersPackOfIcons/BIG/TitleStrip_leftOpen.jpg)
 ImageResource BIGTitleStripleftOpen();
==

Lastly, if somehow my problems are down to using
AbstractImagePrototype so much with the new ClientBundle system, is
there a alternative method/equivalent of
applyTo ?
That is specifically something that can swap one image with another.
(both already in the memory, no reloading ver url, and preferably
something as fast as changeing an image strip is)

Thank you,

Thomas


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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: Difference's in Client Bundle behavior? (much slower? produces lots of jpg's as well on compile?)

2010-10-02 Thread darkflame
oh, and for a visual example of how my switch to ClientBundle is now
behaving you can see the online adventure I'm working on;

http://lostagain.nl/Jarg%20Demo/AMemorableDay/AMemorableDay.html

Note the rollover for the backpack icon.

Compare to this previous, finished, game using the same code, but with
ImageBundle;

http://cuyperscode.nl/CuypersCode2_betatest/CCIIstart.html

(click Log in als gastspeler! to login as guest)

Note the speed now of the bag's rollover on the left. (and all the
other animated icons)

If it turns out this impossibility to animate well is an expected
sacrifice to make for the new ClientBundle, fair enough, I can see
other adventures of the new system. But then, should ImageBundle
really be depreciated if it still had a significant advantage in some
areas?

---
On Oct 2, 7:19 pm, darkflame darkfl...@gmail.com wrote:
 I recently tried switching over from Image Bundle to client bundle,
 and am not sure if the behavior I'm seeing is intentional or not, so
 some confirmation would be nice;

 a) Is ClientBundle significantly slower then ImageBundle? Specifically
 at changing images (applyto). Whereas before I was getting a decent
 frame-rate of animated icons. (done simply by switching between
 Abstract-images), now its very slow/flickery and seems to load a fresh
 image each time (based on Chrome's resources tab)

 b) I don't see an image strip anymore...just massive url(data:)
 statements which I assume inline the png data. Is this how the new
 system works? Does this explain the slowness of changing one image to
 another now? (ie, whereas before it was just shunting co-ordinates,
 now its reprocessing stuff)

 c) I am now seeing large numbers of jpegs generated on compile. I
 still see a few pngs too...which seem to be the normal image strips.
 But I also see just each icon as a plan jpeg. I could see this in use
 as a backup, but I'm puzzled by the image strips present seeing as the
 html doesn't seem to use it :?
 ---
 Now I'm trying to see how expected this behavior is.
 Some of it could be caused with how I'm using ClientBundle. As I'm
 making extensive use of the ApplyTo functionality, almost all my
 images are used as AbstractImagePrototypes.

 For example;

 ...
 final static AbstractImagePrototype  BigOpenClueBox =
 AbstractImagePrototype.create(JargStaticImages.BIGTitleStripleftOpen());
 final static AbstractImagePrototype  MediumOpenClueBox =
 AbstractImagePrototype.create(JargStaticImages.MEDIUMTitleStripleftOpen());
 final static AbstractImagePrototype  SmallOpenClueBox =
 AbstractImagePrototype.create(JargStaticImages.SMALLTitleStripleftOpen());
 ...
 (a lot more)

 JargStaticImages is simply an empty extension of another class;

 public interface JargImages extends CuypersImages {

 }

 (this is purely to make it easier for me to switch between image sets
 later)

 And my CuypersImage class has statements like;
 p
 ublic interface CuypersImages extends ClientBundle {

 ...
 �...@source(/CuypersPackOfIcons/BIG/TitleStrip_leftOpen.jpg)
  ImageResource BIGTitleStripleftOpen();
 ==

 Lastly, if somehow my problems are down to using
 AbstractImagePrototype so much with the new ClientBundle system, is
 there a alternative method/equivalent of
 applyTo ?
 That is specifically something that can swap one image with another.
 (both already in the memory, no reloading ver url, and preferably
 something as fast as changeing an image strip is)

 Thank you,

 Thomas

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



InterfaceGenerator and @external

2010-10-02 Thread Sydney
I use the InterfaceGenerator with my CSS file but the output is not a
valid Java class. The goal is to style all my Button so I
redefined .gwt-Button
Do you have the same issue?

test.css
@external .gwt-Button {
padding: 6px 10px;
}


The call
InterfaceGenerator -standalone -typeName
com.app.client.view.MyCssDebug -css src/com/app/client/view/test.css

The output

// DO NOT EDIT
// Automatically generated by
com.google.gwt.resources.css.InterfaceGenerator
package com.app.client.view;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.resources.client.CssResource.ClassName;
interface MyCssDebug extends CssResource {

  @ClassName(10px;\r\n)
  String 0px();

  @ClassName(6px)
  String px();

  @ClassName(gwt-Button)
  String gwtButton();

  @ClassName({\r\n padding:)
  String Padding();
}

-- 
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: InterfaceGenerator and @external

2010-10-02 Thread Sydney
My CSS file was wrong. I fixed it. Sorry for the trouble.

@external gwt-Button;

.gwt-Button {
padding: 6px 10px;
}



On Oct 2, 5:43 pm, Sydney sydney.henr...@gmail.com wrote:
 I use the InterfaceGenerator with my CSS file but the output is not a
 valid Java class. The goal is to style all my Button so I
 redefined .gwt-Button
 Do you have the same issue?

 test.css
 @external .gwt-Button {
         padding: 6px 10px;

 }

 The call
 InterfaceGenerator -standalone -typeName
 com.app.client.view.MyCssDebug -css src/com/app/client/view/test.css

 The output

 // DO NOT EDIT
 // Automatically generated by
 com.google.gwt.resources.css.InterfaceGenerator
 package com.app.client.view;
 import com.google.gwt.resources.client.CssResource;
 import com.google.gwt.resources.client.CssResource.ClassName;
 interface MyCssDebug extends CssResource {

   @ClassName(10px;\r\n)
   String 0px();

   @ClassName(6px)
   String px();

   @ClassName(gwt-Button)
   String gwtButton();

   @ClassName({\r\n        padding:)
   String Padding();







 }

-- 
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: Difference's in Client Bundle behavior? (much slower? produces lots of jpg's as well on compile?)

2010-10-02 Thread Thomas Wrobel
Ok, thanks this clears up a lot of my confusion.
I'm actually learning a lot here. Till I tried playing with ClientBundle, I
wasn't even aware of the data method of injecting images inline into html.
But it does sound like I want to turn on that flag to disable the data
method for now though. I just switched it back and everything is smooth
again.
All my images come from png's, and are all less then 256 so it should be ok.

Define @sprite styles in a CssResource and switch style name. The same
 CSS would be used as with AbstractImagePrototype but you could expect
 the browser to somehow cache the image and decode it once only (with
 AbstractImagePrototype, there's no sharing, so it probably decodes the
 data: URL each time it changes)


That sounds a neat solution, but probably unsuitable for my current code.
I have made my own class for an animated sprite, that gets fed a set of
frames in the form of a AbstractImagePrototype. This is used extensively
many times in the app and is designed for new images to be able to be added
easily. I wouldn't want to have to have styles for each sprite in each icon
set.
I'll keep it in mind for next time though, perhaps if I can think of a more
suitable system for this new methodology.

-- 
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 M3 StackLayoutPanel Styles - A Solution

2010-10-02 Thread Rud
Okay, I worked out a solution that is relatively painless.

I copied the TabLayout and StackLayout styles from the standard styles
and put them into a file ot_styles.css. I got that to work with the
simple expedient of putting the file in the WAR with the base HTML and
CSS files and adding

  stylesheet src='../ot_styles.css'/

into the ot.gwt.xml file. Not pretty but it worked. (Actually there
was even uglier kludge before that.)

The I poked around in the history of discussions here which resulted
in a cleaner solution.

Created a folder src/com/ot/public, e.g. in the same directory as the
ot.gwt.xml file. The ot_styles.css file got put into the public
folder. Then the ot.gwt.xml file got changed to have:

  stylesheet src='ot_styles.css'/

I think an even cleaner solution is using CSSResources because right
now the ot_styles.css gets copied to the WAR directory with all the
comments left in place. The CSSResources solution I think will strip
the comments.

Rud
http://MysticLakeSoftware.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-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-contrib] Re: Intern strings in the compiler AST to reduce memory footprint. (issue946801)

2010-10-02 Thread zundel

LGTM.

I ran some builds and checked the output - seemed fine and I didn't
notice any impact on build times.  I also scoured these types myself to
look for other places to save and didn't find any others.

I'll keep StringInterner in the back of my mind.

http://gwt-code-reviews.appspot.com/946801/show

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


[gwt-contrib] Re: Test timeout in JUnitShell ? (GWT 2.0.0)

2010-10-02 Thread Ed
Thanks for the details, it gives me a better understanding of what's
going on such that I know where to look.

I notices that issue 4700 (the compiler errors) isn't of concern
during the nightly build as during the build all sources are correctly
included through the GWT maven plugin (not compiler errors in the
log).

testing in noserver mode:
I did improve the logging in the Proxy servlet such that I can see
better what is happening and if a call isn't forwarded to his parent
class: the GWT servlet (GWTShellServlet).

The test seem to run fine now, but let's see what happens the coming
days. I now know the buttons/settings to adjust to solve it I think.

I run 3 GWT Test suites through the maven plugin (pom part:
includes**/GwtBackEnd*Suite.java/includes).
The first suite always runs fine. What suprised me was that the second
suite shows the timeout errors in the logging because of a compile
error (I forced a compile error manually) in the thirds suite, whereas
this compile error show up latter in the logging :(... A bit strange
and misleading... When I solve this compile error in the third suite,
the timeout errors in the second suite also disappear and the whole
build is successful

I was able to reproduce this error by first fixing it such that it run
with success and then running it with the same compile error again.
In the logging I see that the Proxy servlet does forward the calls
correctly to the parent servlet: GWTShellServlet.

Any idea why these timeout occur in this case?

So in the logging this looks like this (starting from suite 2):

[INFO] ---
[INFO]  T E S T S (SUITE 2)
[INFO] ---
[INFO] Running Run all GWT Profile backend tests.
[INFO] Starting HTTP on port 0
[INFO][WARN] catalina.base.create is deprecated.  Use
catalina.base, and it will be created if necessary.
 
 ...
 PROXY SERVLET forward calls to parent class:
[INFO] 13:04:09.676 [http-0-Processor4] DEBUG
com.ited.gwt.dev.server.ProxyServlet - Receiving url request, url: /
com.bv.gwt.profile.intern.ProfileGwtTest.JUnit/junit.html?
gwt.codesvr=82.94.165.225:54470
[INFO] 13:04:09.676 [http-0-Processor4] DEBUG
com.ited.gwt.dev.server.ProxyServlet - No Proxy forward, url: /
com.bv.gwt.profile.intern.ProfileGwtTest.JUnit/junit.html?
gwt.codesvr=82.94.165.225:54470

...
...
[INFO] Tests run: 8, Failures: 0, Errors: 8, Skipped: 0, Time elapsed:
383.244 sec  FAILURE!
[INFO]
testSubscribe(com.bv.gwt.profile.GwtBackendSubscribeMemberOkTest)
Time elapsed: 383.213 sec   ERROR!
[INFO] com.google.gwt.junit.client.TimeoutException: The browser did
not contact the server within 6ms.
[INFO]  - NO RESPONSE: 192.168.1.34 / Mozilla/5.0 (Windows; U; Windows
NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
[INFO]  - 1 client(s) haven't responded back to JUnitShell since the
start of the test.
[INFO]  Actual time elapsed: 60.002 seconds.
[INFO]  at com.google.gwt.junit.JUnitShell.notDone(JUnitShell.java:
896)


[INFO] ---
[INFO]  T E S T S (SUITE 3)
[INFO] ---
[INFO] Running Run all GWT Declare backend tests.
[INFO] Starting HTTP on port 0
[INFO][WARN] catalina.base.create is deprecated.  Use
catalina.base, and it will be created if necessary.
[INFO] [WARN] A new version of GWT (2.0.3) is available
[INFO] For additional info see: file:/tmp/gwt-update-2.0.3.html


[INFO] 13:10:38.401 [http-0-Processor4] DEBUG
com.ited.gwt.dev.server.ProxyServlet - Receiving url request, url: /
com.bv.gwt.declare.intern.DeclareGwtTest.JUnit/junithost
[INFO] 13:10:38.401 [http-0-Processor4] DEBUG
com.ited.gwt.dev.server.ProxyServlet - No Proxy forward, url: /
com.bv.gwt.declare.intern.DeclareGwtTest.JUnit/junithost
[INFO] Rebinding com.bv.gwt.declare.GwtBackendUpdateCategoriesOkTest
[INFO]Adding '1' new generated units
[INFO]   Validating newly compiled units
[INFO]  [ERROR] Errors in 'generated://
F5C72292886AF6E0B1AAD76DB720CCD8/com/bv/gwt/declare/
__GwtBackendUpdateCategoriesOkTest_unitTestImpl.java'
[INFO] [ERROR] Line 3: The type
__GwtBackendUpdateCategoriesOkTest_unitTestImpl cannot subclass the
final class GwtBackendUpdateCategoriesOkTest
[INFO] [ERROR] Line 7: The method testUpdateCategories()
is undefined for the type
__GwtBackendUpdateCategoriesOkTest_unitTestImpl
[INFO][ERROR] Unable to find recently-generated type
'com.bv.gwt.declare.__GwtBackendUpdateCategoriesOkTest_unitTestImpl
[INFO] [ERROR] Deferred binding failed for
'com.bv.gwt.declare.GwtBackendUpdateCategoriesOkTest'; expect
subsequent failures
[INFO] 13:10:38.741 [http-0-Processor4] DEBUG
com.ited.gwt.dev.server.ProxyServlet - Receiving url request, url: /
com.bv.gwt.declare.intern.DeclareGwtTest.JUnit/junithost
...
...
INFO] Results :
[INFO]
[INFO] Tests in error:
[INFO]

[gwt-contrib] Re: Fixing a ConcurrentModificationException in JsonRequestProcessor that occurs when you use a sett... (issue945801)

2010-10-02 Thread bobv

LGTM


http://gwt-code-reviews.appspot.com/945801/diff/1/2
File
user/src/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImpl.java
(right):

http://gwt-code-reviews.appspot.com/945801/diff/1/2#newcode279
user/src/com/google/gwt/requestfactory/client/impl/DeltaValueStoreJsonImpl.java:279:
return;
Good catch, though this change has been obviated by the overhaul.

http://gwt-code-reviews.appspot.com/945801/diff/1/3
File
user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java
(right):

http://gwt-code-reviews.appspot.com/945801/diff/1/3#newcode1074
user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java:1074:
// that will protected against ConcurrentModificationExceptions.
Use a block comment here so eclipse will reflow the text.

http://gwt-code-reviews.appspot.com/945801/show

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


[gwt-contrib] creating resource automatically from editors

2010-10-02 Thread Patrick Julien
What does it take exactly?

If I look at dynatblerf sample, there is an AddressEditor in a
PersonEditor and it just seems to work.

I have the same thing, I have a SecuritySettingsEditor inside another
Editor and when I get the EntityProxy back, the security settings
field is always null.  What does it take for the editor to generate
the value?

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


[gwt-contrib] Re: creating resource automatically from editors

2010-10-02 Thread Thomas Broyer

On Oct 2, 4:15 pm, Patrick Julien pjul...@gmail.com wrote:
 What does it take exactly?

 If I look at dynatblerf sample, there is an AddressEditor in a
 PersonEditor and it just seems to work.

 I have the same thing, I have a SecuritySettingsEditor inside another
 Editor and when I get the EntityProxy back, the security settings
 field is always null.  What does it take for the editor to generate
 the value?

The DynatableRF sample's Person never has a 'null' Address; it might
be an empty Address instance, but never the null value. It might be
the reason.

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


Re: [gwt-contrib] Re: creating resource automatically from editors

2010-10-02 Thread Patrick Julien
If anyone is hurting with this, it's because all values need to be set
to non null before they can be part of the editor framework, unless
you're using a composite

If you're using a composite, the idea is to set a non null container
value like so:


domainHandle = requests.create(DomainHandle.class);
r = requests.domainRequest().persist(getSessionId(), 
domainHandle);
driver = GWT.create(Driver.class);
driver.initialize(requests, view);
domainHandle = r.edit(domainHandle);
domainHandle.setOffices(new HashSetOfficeHandle()); // This
creates the empty set

domainHandle.setSecuritySettings(requests.create(SecuritySettingsHandle.class));

Then your composite will get called via the setValue method, this is
the set or list you newed up in your handle if you setup is OK

@Override
public void setValue(final C value) {
this.collection = value;
}

Then, when you're ready to flush, flush gets called, you just insert
whatever value you need in your collection

@Override
public void flush() {
for (int i = 0, j = editors.size(); i  j; i++) {
E subEditor = editors.get(i);
T value = chain.getValue(subEditor);

if (backing.get(i) != value)
backing.set(i, value);

collection.add(value);
}
}




On Sat, Oct 2, 2010 at 12:02 PM, Patrick Julien pjul...@gmail.com wrote:
 Even if I put in things manually, let's say

 EditorContainerOfficeHandle, HashSetOfficeHandle, OfficeEditor offices;

 which is a CompositeEditor

 public class EditorContainerT, C extends CollectionT, E extends
 EditorT extends FlowPanel implements CompositeEditorC, T, E

 I can set new up and place the HashSet manually inside the parent of
 the office because it will get squashed the next time the editor is
 flushed since EditorContainer gets setValue called with null



 On Sat, Oct 2, 2010 at 11:00 AM, Patrick Julien pjul...@gmail.com wrote:
 But I am getting null for my child objects, that is the question, must
 I make sure all child entities are created before given them to the
 root editor?  That doesn't make much sense to me


 On Sat, Oct 2, 2010 at 10:38 AM, Thomas Broyer t.bro...@gmail.com wrote:

 On Oct 2, 4:15 pm, Patrick Julien pjul...@gmail.com wrote:
 What does it take exactly?

 If I look at dynatblerf sample, there is an AddressEditor in a
 PersonEditor and it just seems to work.

 I have the same thing, I have a SecuritySettingsEditor inside another
 Editor and when I get the EntityProxy back, the security settings
 field is always null.  What does it take for the editor to generate
 the value?

 The DynatableRF sample's Person never has a 'null' Address; it might
 be an empty Address instance, but never the null value. It might be
 the reason.

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



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


Re: [gwt-contrib] [google-web-toolkit] r8918 committed - Overhaul the client-side portions of RequestFactory....

2010-10-02 Thread Patrick Julien
On Sat, Oct 2, 2010 at 4:41 PM, BobV b...@google.com wrote:
 On Sat, Oct 2, 2010 at 1:56 PM, Patrick Julien pjul...@gmail.com wrote:
 This assumes that the built in persist method works for everyone and
 it really, really doesn't.  Now we have a serious chicken and egg
 problem because our persist methods take the form:

 record persist(credentials, record);

 but now we can't create a record until after we've called persist from
 the RequestContext interface

 I'm assuming from your message that the persist method above is an
 instance method on your Record domain type.  If it's not, just change
 InstanceRequest to Request and drop the using() call.

It's not, it's a method, non-static, of service object.



 interface RecordService extends RequestContext {
  //  instance type, return type 
  InstanceRequestRecordProxy, RecordProxy persist(CredentialsProxy
 credentials, RecordProxy record);
 }

 interface MyFactory extends RequestFactory {
  RecordService recordService();
 }

 RecordService svc = rf.recordService();
 RecordProxy record = rf.create(RecordProxy.class);
 CredentialsProxy cred = rf.create(CredentialsProxy.class);
 svc.persist(cred, record).using(record).to(new Receiver()).fire();



That doesn't work because rc.create() is gone.  Otherwise, yeah, it's great

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


Re: [gwt-contrib] [google-web-toolkit] r8918 committed - Overhaul the client-side portions of RequestFactory....

2010-10-02 Thread Patrick Julien
sorry, s/rc/rf/

RequestFactory doesn't have create anymore, neither does Request,
which is the problem.

I'm more than fine with RequestFactory not having it because it gives
the impression your objects are application scope instead of request
scope.  But without create on Request, we don't have a good way of
doing this

On Sat, Oct 2, 2010 at 4:52 PM, Patrick Julien pjul...@gmail.com wrote:
 On Sat, Oct 2, 2010 at 4:41 PM, BobV b...@google.com wrote:
 On Sat, Oct 2, 2010 at 1:56 PM, Patrick Julien pjul...@gmail.com wrote:
 This assumes that the built in persist method works for everyone and
 it really, really doesn't.  Now we have a serious chicken and egg
 problem because our persist methods take the form:

 record persist(credentials, record);

 but now we can't create a record until after we've called persist from
 the RequestContext interface

 I'm assuming from your message that the persist method above is an
 instance method on your Record domain type.  If it's not, just change
 InstanceRequest to Request and drop the using() call.

 It's not, it's a method, non-static, of service object.



 interface RecordService extends RequestContext {
  //  instance type, return type 
  InstanceRequestRecordProxy, RecordProxy persist(CredentialsProxy
 credentials, RecordProxy record);
 }

 interface MyFactory extends RequestFactory {
  RecordService recordService();
 }

 RecordService svc = rf.recordService();
 RecordProxy record = rf.create(RecordProxy.class);
 CredentialsProxy cred = rf.create(CredentialsProxy.class);
 svc.persist(cred, record).using(record).to(new Receiver()).fire();



 That doesn't work because rc.create() is gone.  Otherwise, yeah, it's great


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


Re: [gwt-contrib] [google-web-toolkit] r8918 committed - Overhaul the client-side portions of RequestFactory....

2010-10-02 Thread Patrick Julien
Ah sorry, it's the request members of RequestFactory can now inherit
from RequestContext.  Will give that a go

If that works, would be pretty sweet



On Sat, Oct 2, 2010 at 4:53 PM, Patrick Julien pjul...@gmail.com wrote:
 sorry, s/rc/rf/

 RequestFactory doesn't have create anymore, neither does Request,
 which is the problem.

 I'm more than fine with RequestFactory not having it because it gives
 the impression your objects are application scope instead of request
 scope.  But without create on Request, we don't have a good way of
 doing this

 On Sat, Oct 2, 2010 at 4:52 PM, Patrick Julien pjul...@gmail.com wrote:
 On Sat, Oct 2, 2010 at 4:41 PM, BobV b...@google.com wrote:
 On Sat, Oct 2, 2010 at 1:56 PM, Patrick Julien pjul...@gmail.com wrote:
 This assumes that the built in persist method works for everyone and
 it really, really doesn't.  Now we have a serious chicken and egg
 problem because our persist methods take the form:

 record persist(credentials, record);

 but now we can't create a record until after we've called persist from
 the RequestContext interface

 I'm assuming from your message that the persist method above is an
 instance method on your Record domain type.  If it's not, just change
 InstanceRequest to Request and drop the using() call.

 It's not, it's a method, non-static, of service object.



 interface RecordService extends RequestContext {
  //  instance type, return type 
  InstanceRequestRecordProxy, RecordProxy persist(CredentialsProxy
 credentials, RecordProxy record);
 }

 interface MyFactory extends RequestFactory {
  RecordService recordService();
 }

 RecordService svc = rf.recordService();
 RecordProxy record = rf.create(RecordProxy.class);
 CredentialsProxy cred = rf.create(CredentialsProxy.class);
 svc.persist(cred, record).using(record).to(new Receiver()).fire();



 That doesn't work because rc.create() is gone.  Otherwise, yeah, it's great



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


Re: [gwt-contrib] Re: creating resource automatically from editors

2010-10-02 Thread BobV
It's possible to set a null field to a non-null value by making a Leaf
CompositeEditor.  I'll update the DynaTableRf sample with something
better than this, but I think it demonstrates the point.  The
assumption is that PersonProxy.getManager() returns null in the
default dataset.


public class ManagerSelector extends Composite implements
CompositeEditorPersonProxy, PersonProxy, NameLabel,
LeafValueEditorPersonProxy {

  private EditorChainPersonProxy, NameLabel chain;
  private NameLabel nameLabel = new NameLabel(new SimpleEventBus());
  private PersonProxy manager;

  public ManagerSelector() {
FlowPanel fp = new FlowPanel();
Button b = new Button(Choose randomly);

b.addClickHandler(new ClickHandler() {
  public void onClick(ClickEvent event) {
DynaTableRequestFactory rf = DynaTableRf.getRequestFactory();

int i = new Random().nextInt(100);
rf.schoolCalendarRequest().getPeople(i, 1).to(
new ReceiverListPersonProxy() {
  @Override
  public void onSuccess(ListPersonProxy response) {
assert response.size() == 1;
setValue(response.get(0));
  }
}).fire();
  }
});

fp.add(b);
fp.add(nameLabel);
initWidget(fp);
  }

  public void flush() {
  }

  public String getPathElement(NameLabel subEditor) {
return ;
  }

  public PersonProxy getValue() {
return manager;
  }

  public void onPropertyChange(String... paths) {
  }

  public void setDelegate(EditorDelegatePersonProxy delegate) {
  }

  public void setEditorChain(EditorChainPersonProxy, NameLabel chain) {
this.chain = chain;
  }

  public void setValue(PersonProxy value) {
this.manager = value;

if (manager != null) {
  chain.attach(manager, nameLabel);
}
  }


-- 
Bob Vawter
Google Web Toolkit Team

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


Re: [gwt-contrib] Re: creating resource automatically from editors

2010-10-02 Thread Patrick Julien
This actually makes sense to me but if the composite editor is set or
a list, the framework will still be able to construct those types?

You have

    CompositeEditorPersonProxy, PersonProxy, NameLabel,
    LeafValueEditorPersonProxy {

But if the generic parameter was a collection, wouldn't the fact that
it's a leaf editor prevent the framework from entering sub-editors?



On Sat, Oct 2, 2010 at 7:31 PM, BobV b...@google.com wrote:
 It's possible to set a null field to a non-null value by making a Leaf
 CompositeEditor.  I'll update the DynaTableRf sample with something
 better than this, but I think it demonstrates the point.  The
 assumption is that PersonProxy.getManager() returns null in the
 default dataset.


 public class ManagerSelector extends Composite implements
    CompositeEditorPersonProxy, PersonProxy, NameLabel,
    LeafValueEditorPersonProxy {

  private EditorChainPersonProxy, NameLabel chain;
  private NameLabel nameLabel = new NameLabel(new SimpleEventBus());
  private PersonProxy manager;

  public ManagerSelector() {
    FlowPanel fp = new FlowPanel();
    Button b = new Button(Choose randomly);

    b.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        DynaTableRequestFactory rf = DynaTableRf.getRequestFactory();

        int i = new Random().nextInt(100);
        rf.schoolCalendarRequest().getPeople(i, 1).to(
            new ReceiverListPersonProxy() {
             �...@override
              public void onSuccess(ListPersonProxy response) {
                assert response.size() == 1;
                setValue(response.get(0));
              }
            }).fire();
      }
    });

    fp.add(b);
    fp.add(nameLabel);
    initWidget(fp);
  }

  public void flush() {
  }

  public String getPathElement(NameLabel subEditor) {
    return ;
  }

  public PersonProxy getValue() {
    return manager;
  }

  public void onPropertyChange(String... paths) {
  }

  public void setDelegate(EditorDelegatePersonProxy delegate) {
  }

  public void setEditorChain(EditorChainPersonProxy, NameLabel chain) {
    this.chain = chain;
  }

  public void setValue(PersonProxy value) {
    this.manager = value;

    if (manager != null) {
      chain.attach(manager, nameLabel);
    }
  }


 --
 Bob Vawter
 Google Web Toolkit Team

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

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


[gwt-contrib] Update DynaTableRf sample to demonstrate Leaf+CompositeEditor that shows how to work with option... (issue948801)

2010-10-02 Thread bobv

Reviewers: rjrjr,

Description:
Update DynaTableRf sample to demonstrate Leaf+CompositeEditor that shows
how to work with optional fields.
Patch by: bobv
Review by: rjrjr
Suggested by: pjulien


Please review this at http://gwt-code-reviews.appspot.com/948801/show

Affected files:
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java
  A  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/MentorSelector.java
  A  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/MentorSelector.ui.xml
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/NameLabel.java
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/PersonEditor.java
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/PersonEditor.ui.xml
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/SummaryWidget.java
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/Person.java
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/SchoolCalendarService.java
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/DynaTableRequestFactory.java
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/PersonProxy.java



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


Re: [gwt-contrib] Re: creating resource automatically from editors

2010-10-02 Thread BobV
 But if the generic parameter was a collection, wouldn't the fact that
 it's a leaf editor prevent the framework from entering sub-editors?

Hence the explicit chain.attach() call.  If you wanted to edit an
optional list, you could replace the nameLabel with the ListEditor
adaptor class.  Assuming that a PersonMight have a list of mentors:

// That's editor.client.adapters.ListEditor
MentorSelector implements LeafValueEditorListPerson,
CompositeEditorListPerson, ListPerson, ListEditorPerson,
NameLabel

-- 
Bob Vawter
Google Web Toolkit Team

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


Re: [gwt-contrib] Re: creating resource automatically from editors

2010-10-02 Thread Patrick Julien
thank you for the clarification, I get it

I don't suppose you have advice for using a mutable CellTable in the
editor framework?


On Sat, Oct 2, 2010 at 8:34 PM, BobV b...@google.com wrote:
 But if the generic parameter was a collection, wouldn't the fact that
 it's a leaf editor prevent the framework from entering sub-editors?

 Hence the explicit chain.attach() call.  If you wanted to edit an
 optional list, you could replace the nameLabel with the ListEditor
 adaptor class.  Assuming that a PersonMight have a list of mentors:

 // That's editor.client.adapters.ListEditor
 MentorSelector implements LeafValueEditorListPerson,
 CompositeEditorListPerson, ListPerson, ListEditorPerson,
 NameLabel

 --
 Bob Vawter
 Google Web Toolkit Team

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

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


Re: [gwt-contrib] [google-web-toolkit] r8918 committed - Overhaul the client-side portions of RequestFactory....

2010-10-02 Thread Patrick Julien
Works for me, and have to say, this is pretty sweet.  Also, very nice
touch throwing an exception if an entity crosses request context.


On Sat, Oct 2, 2010 at 5:25 PM, Patrick Julien pjul...@gmail.com wrote:
 Ah sorry, it's the request members of RequestFactory can now inherit
 from RequestContext.  Will give that a go

 If that works, would be pretty sweet



 On Sat, Oct 2, 2010 at 4:53 PM, Patrick Julien pjul...@gmail.com wrote:
 sorry, s/rc/rf/

 RequestFactory doesn't have create anymore, neither does Request,
 which is the problem.

 I'm more than fine with RequestFactory not having it because it gives
 the impression your objects are application scope instead of request
 scope.  But without create on Request, we don't have a good way of
 doing this

 On Sat, Oct 2, 2010 at 4:52 PM, Patrick Julien pjul...@gmail.com wrote:
 On Sat, Oct 2, 2010 at 4:41 PM, BobV b...@google.com wrote:
 On Sat, Oct 2, 2010 at 1:56 PM, Patrick Julien pjul...@gmail.com wrote:
 This assumes that the built in persist method works for everyone and
 it really, really doesn't.  Now we have a serious chicken and egg
 problem because our persist methods take the form:

 record persist(credentials, record);

 but now we can't create a record until after we've called persist from
 the RequestContext interface

 I'm assuming from your message that the persist method above is an
 instance method on your Record domain type.  If it's not, just change
 InstanceRequest to Request and drop the using() call.

 It's not, it's a method, non-static, of service object.



 interface RecordService extends RequestContext {
  //  instance type, return type 
  InstanceRequestRecordProxy, RecordProxy persist(CredentialsProxy
 credentials, RecordProxy record);
 }

 interface MyFactory extends RequestFactory {
  RecordService recordService();
 }

 RecordService svc = rf.recordService();
 RecordProxy record = rf.create(RecordProxy.class);
 CredentialsProxy cred = rf.create(CredentialsProxy.class);
 svc.persist(cred, record).using(record).to(new Receiver()).fire();



 That doesn't work because rc.create() is gone.  Otherwise, yeah, it's great




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


[gwt-contrib] Re: Update DynaTableRf sample to demonstrate Leaf+CompositeEditor that shows how to work with option... (issue948801)

2010-10-02 Thread bobv

http://gwt-code-reviews.appspot.com/948801/show

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


Re: [gwt-contrib] Re: creating resource automatically from editors

2010-10-02 Thread BobV
On Sat, Oct 2, 2010 at 8:45 PM, Patrick Julien pjul...@gmail.com wrote:
 thank you for the clarification, I get it

I'm adding a new adapter class to handle this case, since optional
fields seems like a common thing to see and implementing it manually
requires a lot of boilerplate.

 I don't suppose you have advice for using a mutable CellTable in the
 editor framework?

Does the HasDataEditor adapter work for you?

-- 
Bob Vawter
Google Web Toolkit Team

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


Re: [gwt-contrib] Re: creating resource automatically from editors

2010-10-02 Thread Patrick Julien
On Sat, Oct 2, 2010 at 9:07 PM, BobV b...@google.com wrote:
 On Sat, Oct 2, 2010 at 8:45 PM, Patrick Julien pjul...@gmail.com wrote:
 thank you for the clarification, I get it

 I'm adding a new adapter class to handle this case, since optional
 fields seems like a common thing to see and implementing it manually
 requires a lot of boilerplate.

I think it will see a lot of use.


 I don't suppose you have advice for using a mutable CellTable in the
 editor framework?

 Does the HasDataEditor adapter work for you?


It doesn't, because each row can be edited... but cell table doesn't
give you access to its rows, only a column format.  Here, the editor
are actually the cells.  So a button cell is a remove button.  A edit
text cell is the number and a selection cell is the phone type.

I can just make a table but cell table added all this work to with
keyboard, mouse, blur, etc., events.

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