Re: How to make a TextArea auto-growing...?

2011-02-20 Thread Carlo Alberto Degli Atti
Hey guys,

 thank you very much for your contributions!

 I've quickly given a look to gwt-traction from Andy, it seems really
interesting..

 @Brandon I tried it with chrome, but the TextArea doesn't expand
vertically... (I'm reading now that @Jeff already noted it)


 Thank u everybody!

 CA

On Feb 20, 5:04 am, Brandon Donnelson  wrote:
> Nice link, they do it better I think than I did.

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



Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Carlo Alberto Degli Atti
Thx (I'm still learning GWT...)

;-)

On Feb 18, 2:34 pm, David Goodenough 
wrote:
> When you create the panel and want to render it, use:-
>
>                 DeferredCommand.addCommand( new Command( ) {
>                         public void execute() {
>                                 textArea.rightSize( );
>                                 }
>                         });
>
> where textArea is the ExpandableTextArea.
>
> David
>
> On Friday 18 February 2011, Carlo Alberto Degli Atti wrote:
>
>
>
>
>
>
>
> > David it works (gwt2.2).
>
> > But how can I set the height at rendering time (before any browser
> > event)?
>
> > On Feb 18, 1:53 pm, David Goodenough 
>
> > wrote:
> > > I have not tried it on a RichTextArea, but the principle should work
> > > on those too.
>
> > > David
>
> > > On Friday 18 February 2011, Carlo Alberto Degli Atti wrote:
> > > > Hi David,
>
> > > >  thank you for your answer! I will try it and I will give you my
> > > > feedback :-)
>
> > > >  In my case the width is not a problem; my concern is about the height
> > > > (the number of displayed rows)...
>
> > > >  best regards,
>
> > > >  CA
>
> > > > On Feb 18, 1:11 pm, David Goodenough 
>
> > > > wrote:
> > > > > On Friday 18 February 2011, Carlo Alberto Degli Atti wrote:> Hi,
>
> > > > > >  I've looked around but I haven't found any solution, so I post it
> > > > > > here:
>
> > > > > >  how can I make a TextArea that expands its height depending on the
> > > > > > text inside?
>
> > > > > >  Thanks
>
> > > > > >  CA
>
> > > > > Its good to find someone else who wants this.  I first came across
> > > > > fields like this with Lotus Notes, which has had these for years.
> > > > >  They are really useful, but very few other systems seem to have
> > > > > them and to be honest it is one of the things that puts me off
> > > > > browsers - but that is another story.
>
> > > > > I wrote some code which did this while ago, but I do not know if
> > > > > it still works on a current GWT, and I am absolutely sure it can be
> > > > > done better.
>
> > > > > import com.google.gwt.user.client.Element;
> > > > > import com.google.gwt.user.client.Event;
> > > > > import com.google.gwt.user.client.ui.TextArea;
>
> > > > > public class ExpandingTextArea extends TextArea {
> > > > >         public void onBrowserEvent( Event event) {
> > > > >                 super.onBrowserEvent( event);
> > > > >                 if (getOffsetHeight( ) <= getScrollHeight(
> > > > > getElement( )))           setHeight( ( getScrollHeight( getElement(
> > > > > )) + 6)+"px"); } private native int getScrollHeight( Element e) /*-{
> > > > >                 return e.scrollHeight;
> > > > >                 }-*/;
> > > > >         public void rightSize( ) {
> > > > >                 Element el = getElement( );
> > > > >                 int h = getScrollHeight( el);
> > > > >                 setHeight( ( h + 6) + "px");
> > > > >                 }
> > > > >         };
>
> > > > > The fact that it has a magic number in it (6) is just plain wrong,
> > > > > and I can not for the life of me remember why that number is there.
>
> > > > > rightSize needs to be called when laying out a form, just to get
> > > > > started. Again this can be done better.  It is also possible that
> > > > > somewhere along the line the need for getScrollHeight has gone, but
> > > > > I have not been following the API closely enough to see.
>
> > > > > To get the full Notes function, one would also need to set the width
> > > > > of the area.  This only sets the height.  But that is for another
> > > > > day.
>
> > > > > Hope someone can turn this into something that works properly.
>
> > > > > David

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



Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Carlo Alberto Degli Atti
I understand it, but if the text is arbitrarily long (number of rows)
how can I compute the initial size in pixels?


On Feb 18, 2:10 pm, Sean  wrote:
> LinkedIn.com's Email does this, and I liked it a lot.
>
> As for setting the size before a browser event, I would give it a minimum
> size in Pixels. Then just let it grow as needs be from there.

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



Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Carlo Alberto Degli Atti
David it works (gwt2.2).

But how can I set the height at rendering time (before any browser
event)?


On Feb 18, 1:53 pm, David Goodenough 
wrote:
> I have not tried it on a RichTextArea, but the principle should work
> on those too.
>
> David
>
> On Friday 18 February 2011, Carlo Alberto Degli Atti wrote:
>
>
>
>
>
>
>
> > Hi David,
>
> >  thank you for your answer! I will try it and I will give you my
> > feedback :-)
>
> >  In my case the width is not a problem; my concern is about the height
> > (the number of displayed rows)...
>
> >  best regards,
>
> >  CA
>
> > On Feb 18, 1:11 pm, David Goodenough 
>
> > wrote:
> > > On Friday 18 February 2011, Carlo Alberto Degli Atti wrote:> Hi,
>
> > > >  I've looked around but I haven't found any solution, so I post it
> > > > here:
>
> > > >  how can I make a TextArea that expands its height depending on the
> > > > text inside?
>
> > > >  Thanks
>
> > > >  CA
>
> > > Its good to find someone else who wants this.  I first came across
> > > fields like this with Lotus Notes, which has had these for years.  They
> > > are really useful, but very few other systems seem to have them and
> > > to be honest it is one of the things that puts me off browsers - but that
> > > is another story.
>
> > > I wrote some code which did this while ago, but I do not know if
> > > it still works on a current GWT, and I am absolutely sure it can be
> > > done better.
>
> > > import com.google.gwt.user.client.Element;
> > > import com.google.gwt.user.client.Event;
> > > import com.google.gwt.user.client.ui.TextArea;
>
> > > public class ExpandingTextArea extends TextArea {
> > >         public void onBrowserEvent( Event event) {
> > >                 super.onBrowserEvent( event);
> > >                 if (getOffsetHeight( ) <= getScrollHeight( getElement(
> > > )))           setHeight( ( getScrollHeight( getElement( )) + 6)+"px"); }
> > >         private native int getScrollHeight( Element e) /*-{
> > >                 return e.scrollHeight;
> > >                 }-*/;
> > >         public void rightSize( ) {
> > >                 Element el = getElement( );
> > >                 int h = getScrollHeight( el);
> > >                 setHeight( ( h + 6) + "px");
> > >                 }
> > >         };
>
> > > The fact that it has a magic number in it (6) is just plain wrong, and
> > > I can not for the life of me remember why that number is there.
>
> > > rightSize needs to be called when laying out a form, just to get started.
> > > Again this can be done better.  It is also possible that somewhere
> > > along the line the need for getScrollHeight has gone, but I have not
> > > been following the API closely enough to see.
>
> > > To get the full Notes function, one would also need to set the width of
> > > the area.  This only sets the height.  But that is for another day.
>
> > > Hope someone can turn this into something that works properly.
>
> > > David

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



Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Carlo Alberto Degli Atti
Hi David,

 thank you for your answer! I will try it and I will give you my
feedback :-)

 In my case the width is not a problem; my concern is about the height
(the number of displayed rows)...

 best regards,

 CA

On Feb 18, 1:11 pm, David Goodenough 
wrote:
> On Friday 18 February 2011, Carlo Alberto Degli Atti wrote:> Hi,
>
> >  I've looked around but I haven't found any solution, so I post it
> > here:
>
> >  how can I make a TextArea that expands its height depending on the
> > text inside?
>
> >  Thanks
>
> >  CA
>
> Its good to find someone else who wants this.  I first came across
> fields like this with Lotus Notes, which has had these for years.  They
> are really useful, but very few other systems seem to have them and
> to be honest it is one of the things that puts me off browsers - but that
> is another story.
>
> I wrote some code which did this while ago, but I do not know if
> it still works on a current GWT, and I am absolutely sure it can be
> done better.
>
> import com.google.gwt.user.client.Element;
> import com.google.gwt.user.client.Event;
> import com.google.gwt.user.client.ui.TextArea;
>
> public class ExpandingTextArea extends TextArea {
>         public void onBrowserEvent( Event event) {
>                 super.onBrowserEvent( event);
>                 if (getOffsetHeight( ) <= getScrollHeight( getElement( )))    
>       
>                         setHeight( ( getScrollHeight( getElement( )) + 
> 6)+"px");
>                 }
>         private native int getScrollHeight( Element e) /*-{
>                 return e.scrollHeight;
>                 }-*/;
>         public void rightSize( ) {
>                 Element el = getElement( );
>                 int h = getScrollHeight( el);
>                 setHeight( ( h + 6) + "px");
>                 }
>         };
>
> The fact that it has a magic number in it (6) is just plain wrong, and
> I can not for the life of me remember why that number is there.
>
> rightSize needs to be called when laying out a form, just to get started.
> Again this can be done better.  It is also possible that somewhere
> along the line the need for getScrollHeight has gone, but I have not
> been following the API closely enough to see.
>
> To get the full Notes function, one would also need to set the width of
> the area.  This only sets the height.  But that is for another day.
>
> Hope someone can turn this into something that works properly.
>
> David

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



How to make a TextArea auto-growing...?

2011-02-18 Thread Carlo Alberto Degli Atti
Hi,

 I've looked around but I haven't found any solution, so I post it
here:

 how can I make a TextArea that expands its height depending on the
text inside?

 Thanks

 CA

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



Re: migrate GWT 2.1.1 to 2.2 error

2011-02-16 Thread Carlo Alberto Degli Atti
yes it works if I run "mvn gwt:compile" from within the module (I have a 
multi-module maven project), but if I run "mvn install" from the parent root 
I still have that error.

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



Re: migrate GWT 2.1.1 to 2.2 error

2011-02-16 Thread Carlo Alberto Degli Atti
I'm still investigating... but:

1) if I remove the gwt-dev dependency, I can start the gwt app from Eclipse 
*BUT* if I try to compile using maven (ie mvn gwt:compile) I get 
"java.lang.NoClassDefFoundError: com/google/gwt/core/ext/GeneratorExt",

2) if I add the gwt-dev dependency, I can do "mvn install" and "mvn gwt:run" 
*BUT* I have the "GWT SDK is missing" error inside Eclipse (as described in 
my previous post)...

ANY IDEA!?!?

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



Re: migrate GWT 2.1.1 to 2.2 error

2011-02-16 Thread Carlo Alberto Degli Atti
Maybe I'm wrong but I added this dependency to my pom to avoid the
compilation problem you were talking about...
of course it did work as expected (using maven)

*BUT* it caused a very strange behavior in Eclipse... at the beginning
I didn't understand the cause (because I had many other problems
related to the new gwt 2.2, so I spent some time around)...

if I add the gwt-dev dependency, Eclipse claims that the GWT SDK is
missing (but that's not true); and I wasn't able to fix it anyway...

Magically when I removed the gwt-dev.jar from the classpath it started
again to work... So, I removed that dependency from the pom.xml...

(and now I've to understand why I don't have no more that compilation
problem.. but this is another story!)

Hope this can help someone!

CA


On Feb 15, 9:34 am, "F. Lancer"  wrote:
> Hi, Brice.
>
> Try  to add 'gwt-dev-2.2.0.jar' to your project and rebuild.
>
> pom.xml:
> 
>         com.google.gwt
>         gwt-dev
>         2.2.0
>         jar
>         compile
> 
>
> You will have "[WARNING] Don't declare gwt-dev as a project
> dependency. This may introduce complex dependency conflicts" but you
> project will be built.Probably :)
>
> Regards,
>
> Alex.
>
> On Feb 15, 8:46 am, Brice Beaumesnil  wrote:
>
>
>
>
>
>
>
> > Hello, i just try GWT 2.2 on my project, i just change my POM file to use
> > version 2.2 and when i try to compile i have this error :
>
> > Loading inherited module 'com.google.gwt.user.User'
> > [INFO]    Loading inherited module 'com.google.gwt.user.RemoteService'
> > [INFO]       [ERROR] Unexpected error while processing XML
> > [INFO] java.lang.NoClassDefFoundError: com/google/gwt/core/ext/GeneratorExt
> > [INFO]     at java.lang.ClassLoader.defineClass1(Native Method)
> > [INFO]     at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
> > [INFO]     at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> > [INFO]     at
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
> > [INFO]     at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
> > [INFO]     at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> > [INFO]     at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> > [INFO]     at java.security.AccessController.doPrivileged(Native Method)
> > [INFO]     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> > [INFO]     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> > [INFO]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> > [INFO]     at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> > [INFO]     at
> > com.google.gwt.dev.cfg.ModuleDefSchema$ClassAttrCvt.convertToArg(ModuleDefS 
> > ­chema.java:778)
> > [INFO]     at
> > com.google.gwt.dev.util.xml.HandlerArgs.convertToArg(HandlerArgs.java:64)
> > [INFO]     at
> > com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:22 
> > ­1)
> > [INFO]     at
> > com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectivePa 
> > ­rser.java:274)
> > ...
>
> > Idid'nt have any problem with older version of GWT.

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



Re: UIBinder: @UIField and the wrong template

2011-02-16 Thread Carlo Alberto Degli Atti
**SOLVED!**

Thanks to Michel I solved it...

I was wrong because I left a declaration in another view
(CommentView.java) referring to ItemView class, this way:


@UiTemplate( "CommentView.ui.xml" )
interface CommentViewUiBinder extends UiBinder
{

I changed it to

@UiTemplate( "CommentView.ui.xml" )
interface CommentViewUiBinder extends UiBinder {

and it worked...

Eclipse was a little bit confused...

Thanks Michel

;-)

On Feb 15, 3:34 pm, Carlo Alberto Degli Atti 
wrote:
> Hi all,
>
> I'm building some user interfaces using the UIBinder mechanism; I'm
> placing in the same package 6 views (java files) and 6 templates
> (xml).
> All views and templates are fine except one; my IDE (Eclipse) says
> "Field itemPanel has no corresponding field in template file
> CommentView.ui.xml".
>
> But as you can see in the code below,  Eclipse is referring to another
> xml template (I've declared to use ItemView.ui.xml, not
> CommentView.ui.xml)!!!
>
> The view ItemView.java:
> ~~
>
>  public class ItemView extends Composite implements ItemDisplay {
>
>         @UiTemplate( "ItemView.ui.xml" )
>         interface ItemViewUiBinder extends UiBinder {}
>
>         private static ItemViewUiBinder uiBinder =
> GWT.create( ItemViewUiBinder.class );
>
>         @UiField SimplePanel itemPanel;
>
>         public ItemView() {
>
>                 SimplePanel createAndBindUi = uiBinder.createAndBindUi( this 
> );
>
>                 initWidget( createAndBindUi );
>
>         }
>  }
>
>  the template file ItemView.ui.xml:
> ~
>
>  
>
>          xmlns:g='urn:import:com.google.gwt.user.client.ui'>
>
>         
>
> 
>
> Any idea?!?!?!?
> Where am I wrong?!?

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



UIBinder: @UIField and the wrong template

2011-02-15 Thread Carlo Alberto Degli Atti
Hi all,

I'm building some user interfaces using the UIBinder mechanism; I'm
placing in the same package 6 views (java files) and 6 templates
(xml).
All views and templates are fine except one; my IDE (Eclipse) says
"Field itemPanel has no corresponding field in template file
CommentView.ui.xml".

But as you can see in the code below,  Eclipse is referring to another
xml template (I've declared to use ItemView.ui.xml, not
CommentView.ui.xml)!!!


The view ItemView.java:
~~

 public class ItemView extends Composite implements ItemDisplay {

@UiTemplate( "ItemView.ui.xml" )
interface ItemViewUiBinder extends UiBinder {}

private static ItemViewUiBinder uiBinder =
GWT.create( ItemViewUiBinder.class );

@UiField SimplePanel itemPanel;

public ItemView() {

SimplePanel createAndBindUi = uiBinder.createAndBindUi( this );

initWidget( createAndBindUi );

}
 }

 the template file ItemView.ui.xml:
~

 








Any idea?!?!?!?
Where am I wrong?!?

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



Re: Gwt 2.2, guice and gin...

2011-02-15 Thread Carlo Alberto Degli Atti
thanks leszek,

 but I'm experiencing this exception

 No implementation for
javax.inject.Provider
was
bound.
  while locating
javax.inject.Provider
for parameter 4
at
com.google.gwt.inject.rebind.GinjectorBindings.(GinjectorBindings.java:
182)
  at
com.google.gwt.inject.rebind.GinjectorGeneratorModule.configure(GinjectorGeneratorModule.java:
69)

Do you know what does it mean?
Is something missing?

Thanks a lot!


On Feb 14, 10:30 pm, leszek  wrote:
> I run into the same problem yesterday but finally, after taking new
> GIN snapshot and migrate to GUICE 3.0 (as is described in your post) I
> was successful and everything seems working now. The only problem I
> spent several hours on was that Nullable annotation disappeared from
> Guice internals and it took me a lot of time until I understood what
> was going on.
>
> http://groups.google.com/group/google-guice/browse_frm/thread/38859fa...
>
> You have to be prepared for a lot of surprises if you bank on google
> code, is it bad news, but good news is that - on the whole - it works.
>
> On 14 Lut, 16:57, Carlo Alberto Degli Atti  wrote:
>
>
>
>
>
>
>
> > Hello everybody,
>
> >  this morning I had the (bad) idea to update my eclipse environment to use
> > gwt 2.2... (with 2.1 everything was fine)...
>
> >  now I'm experiencing a lot of problems... maybe it's my fault (I'm a new
> > gwt & related techs user)...
>
> >  My application is using gin and guice; before this morning I was using gin
> > v1.0 and guice 2.0.
>
> >  Now:
>
> >  *1. after upgrading to gwt (to 2.2) I got this exception (still the
> > original guice and gin versions):*
>
> >    [WARN] failed JettyContainerService$ApiProxyHandler@ae281c:
> > java.lang.NoClassDefFoundError: com/google/inject/internal/Lists
>
> > [WARN] Error starting handlers
>
> > java.lang.NoClassDefFoundError: com/google/inject/internal/Lists
>
> > at com.google.inject.servlet.FiltersModuleBuilder.(
> > FiltersModuleBuilder.java:36)
>
> > at com.google.inject.servlet.ServletModule.(ServletModule.java:219)
>
> > * 2. then I updated the guice version to 3.0-rc2 *mantaining* the original
> > gin version (1.0), but I got this unlikely mix*:
>
> >     gin-1.0.jar
>
> >     guice-2.0.jar
>
> >     guice-servlet-3.0-rc2.jar
>
> >    as expected, my application threw this exception:
>
> >    [WARN] Error starting handlers
>
> >    java.lang.NoClassDefFoundError:
> > com/google/inject/internal/util/$Preconditions
>
> > at com.google.inject.servlet.ServletModule.configure(ServletModule.java:44)
>
> > at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
>
> >         ...
>
> >  *3. after some investigations, I discovered that gwt 3.2 requires a new gin
> > (see this post 
> > **http://groups.google.com/group/google-gin/browse_thread/thread/70520a...
> > ). **I also updated gin to 1.1-2.2-SNAPSHOT. *The dependencies looked right
> > now:
>
> >     gin-1.1-2.2-20110211.140818-5.jar
>
> >     guice-3.0-rc2.jar
>
> >     guice-assistedinject-3.0-rc2.jar
>
> >     guice-servlet-3.0-rc2.jar
>
> >     gwt-servlet-2.2.0.jar
>
> >     javax.inject-1.jar
>
> >   **BUT* the application threw another exception:*
>
> >   com.google.inject.CreationException: Guice creation errors:
>
> >   1) No implementation for
> > javax.inject.Provider was
> > bound.
>
> >      while locating
> > javax.inject.Provider
>
> >      for parameter 4 at
> > com.google.gwt.inject.rebind.GinjectorBindings.(GinjectorBindings.jav 
> > a:182)
>
> >      at
> > com.google.gwt.inject.rebind.GinjectorGeneratorModule.configure(GinjectorGe 
> > neratorModule.java:69)
>
> >   So:
>
> >   - where am I wrong?
>
> >   - do you have suggestions to solve this?
>
> >   Thanks in advance for any help
>
> >   CA

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



Re: Gwt 2.2, guice and gin...

2011-02-14 Thread Carlo Alberto Degli Atti
Thomas

 thanks for your answer...

 when you say " but you then have to recompile it against the GWT 2.2 SDK", 
you mean I have to take the sources and repackage or simply start a gwt 
compilation?

 This error is generated by that or am I missing something else?
 
 No implementation for 
javax.inject.Provider was 
bound.
   
  while locating 
javax.inject.Provider

for parameter 4 at 
com.google.gwt.inject.rebind.GinjectorBindings.(GinjectorBindings.java:182)

  at 
com.google.gwt.inject.rebind.GinjectorGeneratorModule.configure(GinjectorGeneratorModule.java:69)


 Thanks thanks thanks


 ;-)

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



Gwt 2.2, guice and gin...

2011-02-14 Thread Carlo Alberto Degli Atti
Hello everybody,

 this morning I had the (bad) idea to update my eclipse environment to use 
gwt 2.2... (with 2.1 everything was fine)...

 now I'm experiencing a lot of problems... maybe it's my fault (I'm a new 
gwt & related techs user)...

 My application is using gin and guice; before this morning I was using gin 
v1.0 and guice 2.0.

 Now:

 *1. after upgrading to gwt (to 2.2) I got this exception (still the 
original guice and gin versions):*

   [WARN] failed JettyContainerService$ApiProxyHandler@ae281c: 
java.lang.NoClassDefFoundError: com/google/inject/internal/Lists

[WARN] Error starting handlers

java.lang.NoClassDefFoundError: com/google/inject/internal/Lists

at com.google.inject.servlet.FiltersModuleBuilder.(
FiltersModuleBuilder.java:36)

at com.google.inject.servlet.ServletModule.(ServletModule.java:219)

* 2. then I updated the guice version to 3.0-rc2 *mantaining* the original 
gin version (1.0), but I got this unlikely mix*:

gin-1.0.jar

guice-2.0.jar

guice-servlet-3.0-rc2.jar

   as expected, my application threw this exception:

   [WARN] Error starting handlers
   
   java.lang.NoClassDefFoundError: 
com/google/inject/internal/util/$Preconditions

at com.google.inject.servlet.ServletModule.configure(ServletModule.java:44)

at com.google.inject.AbstractModule.configure(AbstractModule.java:59)

...


 *3. after some investigations, I discovered that gwt 3.2 requires a new gin 
(see this post 
**http://groups.google.com/group/google-gin/browse_thread/thread/70520a9f495f5747/7930eda17843aea8#7930eda17843aea8
 
). **I also updated gin to 1.1-2.2-SNAPSHOT. *The dependencies looked right 
now:


gin-1.1-2.2-20110211.140818-5.jar

guice-3.0-rc2.jar

guice-assistedinject-3.0-rc2.jar

guice-servlet-3.0-rc2.jar

gwt-servlet-2.2.0.jar

javax.inject-1.jar


  **BUT* the application threw another exception:*


  com.google.inject.CreationException: Guice creation errors:


  1) No implementation for 
javax.inject.Provider was 
bound.

 while locating 
javax.inject.Provider

 for parameter 4 at 
com.google.gwt.inject.rebind.GinjectorBindings.(GinjectorBindings.java:182)

 at 
com.google.gwt.inject.rebind.GinjectorGeneratorModule.configure(GinjectorGeneratorModule.java:69)


  So:

  - where am I wrong?

  - do you have suggestions to solve this?


  Thanks in advance for any help


  CA







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



Re: Cannot compile using maven + gwt2.1.1 + mac osx

2010-12-30 Thread Carlo Alberto Degli Atti
Hi Akito,

 thank you very much for your answer..

 The error was simply generated by an old version of the gwt-maven-
plugin... I switched it to "2.1.0-1" and the error magically
disappeared!

 Your link to the olamy blogspot turned on the light in my eyes! :-)

 Thanks again...

 CA

On Dec 29, 6:57 pm, Akito Nozaki  wrote:
> I'm on a mac but I don't think I've seen a error like that. I upgraded my
> 2.1.0 project to 2.1.1 and didn't have a issue. Post up your pom.xml and
> maybe I can spot something.
>
> Also...http://olamy.blogspot.com/2010/12/using-gwt-sdk-211-with-gwt-maven-pl...

-- 
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.



Cannot compile using maven + gwt2.1.1 + mac osx

2010-12-29 Thread Carlo Alberto Degli Atti
Hi all,

 I don't know if this is the right place to post my problem... but I'm
trying to compile a simple GWT project (gwt 2.1.1) using maven (mvn
gwt:compile) on my mac, but it fails.

 The reason seems to be that it cannot download this dependency "gwt-
dev-2.1.1-mac.jar" from the repository central.

 Where am I wrong?

 Output:

[INFO] Scanning for projects...
[INFO]

[INFO] Building ui-search
[INFO]task-segment: [compile]
[INFO]

[INFO] [gwt:generateAsync {execution: default}]
[INFO] using GWT jars from project dependencies : 2.1.1
Downloading: 
http://repo1.maven.org/maven2/com/google/gwt/gwt-dev/2.1.1/gwt-dev-2.1.1-mac.jar
[INFO] Unable to find resource 'com.google.gwt:gwt-dev:jar:mac:2.1.1'
in repository central (http://repo1.maven.org/maven2)
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] artifact not found - Unable to download the artifact from any
repository

 Thx,

 CA

-- 
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.



Cannot compile using maven + gwt2.1.1 + mac osx

2010-12-29 Thread Carlo Alberto Degli Atti
Hi all,

 I don't know if this is the right place to post my problem...

 Anyway, I'm trying to compile a simple GWT project using maven (mvn
gwt:compile) on my mac, but it attempts to download

-- 
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 send data back to client side code?

2010-09-04 Thread Carlo Alberto Degli Atti
Hi,

 I published few days ago a very small framework helping you to move
complex data models to client through the GWT/RPC mechanism and back.

 It's the "pojo-framework" and you can find it here:
http://code.google.com/p/pojo-injector/

 Basically you cannot move complex data models to client, because you
risk to put almost anything into the shared folder to make GWT able to
compile it! Furthermore GWT doesn't like very much interfaces; it
prefers to work on concrete classes...

So one solution is to pass through POJOs objects (clones of your data
models) not implementing all the interfaces of your original data
model (essentially you build an easier hierarchy of classes that you
can put into the shared folder)...

With this simple solution, you write a lot of POJOs (clones of your
data models) *AND* a lot of adapters (to fill your POJOs and to read
back the data model from POJO)!!!

I looked around for a simple solution, but I didn't find something
fitting my simple needs: so I implemented the "pojo-framework".
With the pojo-framework you still need to write your POJOs, *BUT* you
avoid to implement all the adapters...

 I hope it can help you...

 Best regards,
Carlo Alberto

On 13 Ago, 19:39, "Sree ..."  wrote:
> Am not sure this belongs to GWT or GAE or both ...
>
> So here's my problem...
>
> I have one client/Example.java [contains all GWT code] calls a methods on
> server/SomeServiceImpl.java [Contains code to talk to dataStore]
>
> Wat server/SomeServiceImpl.java does is Featch data from Employee.Java
>   [this is class used to store data in datastore JPA]
>
> So now my problem is.. as long as I send data in the form of String or
> StringArray to client/Example.java am fine, but now I tried to send
> List to client/Example.java
>
> Doing so throws me an error as below..
>
> Validating newly compiled units
>       [ERROR] Errors in
> 'file:/C:/XXX/XXX/src/xxx/client/GreetingServiceAsync.java'
>          [ERROR] Line 18: No source code is available for type
> xxx.server.Employee; did you forget to inherit a required module?
>       [ERROR] Errors in 'file:/C:/XXX/XXX/src/client/Example.java'
>          [ERROR] Line 325: No source code is available for type
> xxx.server.Employee; did you forget to inherit a required module?
>       [ERROR] Errors in 'file:/C:/XXX/XXX/src/client/GreetingService.java'
>          [ERROR] Line 19: No source code is available for type
> xxx.server.Employee; did you forget to inherit a required module?
>    Finding entry point classes
>       [ERROR] Unable to find type 'xxx.client.Example'
>          [ERROR] Hint: Previous compiler errors may have made this type
> unavailable
>          [ERROR] Hint: Check the inheritance chain from your module; it may
> not be inheriting a required module or a module may not be adding its source
> path entries properly
>
> --
> -Thanks
> -Srikanth.G
> -Hyderabad

-- 
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.



"Pojo-injector" makes a little easier the job of moving data using the GWT/RPC mechanism

2010-09-04 Thread Carlo Alberto Degli Atti
Hi all,

 I'm posting this message to notice you that I published the "pojo-
injector", a very little framework (no more than few hours of work) to
convert Java data model to POJOs and vice versa.

 I'm using it to reduce the amount of coding needed to move complex
data structures from the server to the client (and back) using the GWT/
RPC mechanism: using it I still need to build POJOs objects, but I
don't need to implement adapters no more!

Mainly:

   1.  based on annotations (no configuration XML required)
   2. the required information are limited only to POJO class
(annotations). Your data models are completely untouched!
   3. very small library that can be easily customized
   4. pojo-injector allows you to get POJOs from your data models AND
data models from your POJOs
   5. translation is recursive: if you get a data model tree as input,
you get back a POJO tree. And vice versa

 If you're interested to, you can find more info or download it here:

 http://code.google.com/p/pojo-injector/

 Any feedback, issue or suggestion are really appreciated!

 Bye,

  Carlo Alberto

-- 
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.