Re: GWT 2.4 breaks JDK 5 compile support

2011-09-15 Thread David Goodenough
On Thursday 15 Sep 2011, Thad wrote:
> Right, good riddance to 1.5 so long as your not stuck supporting a few
> die-hards with old Macs as servers. Apple didn't port Java 1.6 to the
> old non-Intel RISC machines.If a site's server runs OSX 10.4 or below,
> or it's a non-Intel machine with OS 10.5, GWT 2.4 is not an option.
> 
> God help us when Java 1.7 is required. I was never happy with the
> Blackdown port for Linux. Therefore I'm not confident that OpenJDK
> will provide a suitable environment for OSX down the road. The fact
> that I develop almost exclusively in Java these days is what keeps me
> from making a Mac my next computer.
This should be much less of a problem now as OpenJDK is the only
official JDK for 7.  I have no idea whether there is a version for
MACs, but it is now all properly open source so if you need to make
a version for old machines then it is open for you (and others) to 
do so.

David
> 
> On Sep 14, 5:47 pm, Jeff Larsen  wrote:
> > Yea, 1.6 is required now. Good riddance to 1.5!

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

2011-08-05 Thread David Goodenough
On Friday 05 Aug 2011, Alain Ekambi wrote:
> Hi Folks,
> 
> Is it possible to make GWT only  output the Java to JS compilation ?
You could try Java2Script (j2s.sf.net).  Its nothing to do with GWT but it 
does do Java to Javascript conversion.

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: Fast way for email, phone input validation

2011-06-27 Thread David Goodenough
On Monday 27 Jun 2011, mohamed salah wrote:
> salam
> there mohammad salah
> validate your phone create method validate your email
> 
> ---
>   // this method is email for examplem...@mm.com
> 
> public static boolean isEmail(final String value) {
> boolean valid = true;
> if (value != null) {
> valid = value.matches(".+@.+\\.[a-z]+");
> 
> if (value.contains(" ")) {
> valid = false;
> }
> }
> 
> return valid;
> 
> }
> ---
> 
> // this method is email is not empty
> public static boolean isEmptyValue(final String value) {
> boolean valid = true;
> if (value == null) {
> return valid = false;
> }
> if (value.trim().equals("")) {
> return valid = false;
> }
> 
> return valid;
> }
> ---
> // this method is email min lenght
> public static boolean checkMinlength(final String value, final int
> minLength) {
> boolean valid = true;
> if (value != null) {
> if (value.length() < minLength) {
> valid = false;
> }
> 
> }
> 
> return valid;
> 
> }
> 
> ---
> // this method is MaX length
> 
> public static boolean checkMaXlength(final String value, final int
> maxLength) {
> boolean valid = true;
> if (value != null) {
> if (value.length() > maxLength) {
> valid = false;
> }
> 
> }
> 
> return valid;
> 
> }
> ---
> 
> validate is Fone
> ---
> create varible
> public static final String RGEX_PHONE_ONLY =
> "^\\(?(\\d{3}-)\\)?(\\d{3}-)?(\\d{4})$";
> this varible validate to phone for example method
> 
> ---
> //this method is Phone for example 111-111- is true.
> -111- is not true
> -- is not true
> 111-111-111 is not true
Note this is only valid for US phone numbers.  It takes no account
of country codes or other international phone formats.

David
> and contune.
> this method .
> ---
> public static boolean isPhone(String value) {
> boolean valid = false;
> valid = value.matches(RGEX_PHONE_ONLY);
> if (valid) {
> valid = true;
> }
> return valid;
> }
> ---
> *Regard: Senior : Mohamed salah hasan
> Mobile :+20106594094
> tel :+2024460320
> Mail:mohamedhasanshaks...@gmail.com*

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



Re: What has happened to the GWT designer for Eclipse Indigo?

2011-06-23 Thread David Goodenough
On Thursday 23 Jun 2011, Eric Clayberg wrote:
> You can get it embedded in GPE 2.3.2 via the following update site
> link...
> 
> http://dl.google.com/eclipse/plugin/3.7
Tried this, but it said that it can not be installed with the version of
WindowBuilder that I installed with Indigo.

David
> 
> Or you can get the full version at the following update site link...
> 
> http://dl.google.com/eclipse/inst/d2gwt/beta/3.7
> 
> Both were available simultaneously with Indigo. The web site changes
> are still catching up.
> 
> On Jun 22, 5:55 pm, Mark  wrote:
> > What has happened to theGWTdesignerfor Eclipse Indigo?

-- 
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/GPE 2.3 unable to sign in with Google Apps account

2011-05-10 Thread David Goodenough
On Tuesday 10 May 2011, Alex Humesky wrote:
> Hi all,
> GPE 2.3.1 is available and has the fix for signing into Google Apps
> accounts: http://dl.google.com/eclipse/plugin/3.6 Please let us know
> if this doesn't fix the problem.
> 
> Alex, GPE Team
> 
> On May 4, 6:43 pm, Alex Humesky  wrote:
> > Hi all,
> > We've found the problem and this should be fixed in the next release.
> > Sorry for all the trouble.
> > 
> > Alex, GPE Team
> > 
> > On May 4, 5:28 am, Thibault Pouget  wrote:
> > > Sure ! I'll send them ASAP.
I realise that this is slightly off topic, but how do I turn off the
margin icon for Google login?  I do not need it, and it is taking up
valuable screen space.  I looked in the preferences and could not 
find anything that looked relevant.

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 David Goodenough
Reading the jQuery plugin articles, this code may well not work on all
browsers.  There appear to be some quirks with IE (what a surprise) 
and Opera (don't know of that is version specific).  I also do not know
(I do not have a copy to test it with) whether the IE problems have 
gone away with IE9.

David

On Friday 18 February 2011, Carlo Alberto Degli Atti wrote:
> 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 David Goodenough
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 David Goodenough
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 David Goodenough
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: New Google groups in GWT

2010-12-09 Thread David Goodenough
One tiny problem.  The default browser for KDE, i.e. Konqueror, in the 
version (4.4.5) in Debian sid (about to be the new stable) reports Browser Not 
Supported.  Any chance of getting that fixed before it is rolled out?

David

On Thursday 09 December 2010, David Chandler wrote:
> Yep, we'll be moving the GWT group itself to the new UI written in GWT when
> it's officially released. You can expect to see a steady stream of
> announcements regarding Google products being written or rewritten in GWT.
> 
> /dmc
> 
> On Thu, Dec 9, 2010 at 12:18 PM, Chema Molins  wrote:
> > I've seen this announcement in HackerNews:
> > 
> > Preview the new Google Groups
> > Redesign > announce/RWtHlHrWieU>
> > 
> > The page source tells everything, it is build using GWT.
> > 
> > Good to know.
> > 
> >  --
> > 
> > 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 > bscr...@googlegroups.com> .
> > For more options, visit this group at
> > http://groups.google.com/group/google-web-toolkit?hl=en.

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



What is the current equivalent of MenuBar.doItemAction

2010-08-03 Thread David Goodenough
I have some old GWT code (from abount 1.4) which invoked doItemAction
on a Menu entry with a submenu, in order to show the submenu 
programatically.  What is the up to date equivalent (i.e. 2.0.4)?

Thanks,

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-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: What's the best/easiest way of doing server-side persistence with GWT?

2010-05-20 Thread David Goodenough
You could try OpenJPA, which can now largely be done using 
annotations rather than xml, or if you are not needing to use SQL
DBs you could try one of the object dbs like db4o.

David

On Thursday 20 May 2010, Navigateur wrote:
> Thanks José! But don't they still require you to do the "hibernate-
> mapping" xml thing? Isn't this cumbersome for complex object
> structures? Or is there a way of being able to play with your object
> structure without having to change the hibernate-mapping xml every
> time (i.e. a default automatic behaviour for all objects, which also
> updates the data-store to reflect object-structure changes in the
> code)?
> 
> Thanks!
> N
> 
> On May 20, 10:08 am, José González Gómez
> 
>  wrote:
> > Although your question has (almost) nothing to do with GWT... we're
> > working on a GWT + JavaEE application, and evaluated several
> > alternatives regarding this problem. We had two winners, both of them
> > using of course JPA with Hibernate provider:
> >
> > 1. Use Gilead to transform your persistent entities and send them to
> > GWT
> > 2. Use DTOs, and use Dozer to transform from / to domain objects /
> > entities
> >
> > In our case we chose DTOs / Dozer over Gilead because we favoured
> > layer separation, encapsulation and security over development ease.
> > YMMV
> >
> > Best regards
> > José
> >
> > On 20 mayo, 10:54, Navigateur  
wrote:
> > > Ah yes! Except that I want to be able to get persistent things onto 
my
> > > client side without too much conversion or trouble (i.e. the same
> > > objects client-and-server-side using the same language, and the 
same
> > > class definitions).
> > >
> > > What are my full range of options for this, anyway?
> > > And which is the best one for the purposes I've mentioned?
> > >
> > > On May 20, 12:34 am, Blessed Geek  
wrote:
> > > > Wouldn't  your initial question be like -
> > > > What is the best power tool to use to build the fence around my
> > > > garden if I wish to plant my garden with tulips.
> > > >
> > > > But later on in your post, you reveal that your question actually 
has
> > > > nothing to do with GWT, just as growing tulips has nothing to do 
with
> > > > choice of power tools for your fence.
> > > >
> > > > --
> > > > 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
> > > > athttp://groups.google.com/group/google-web-toolkit?hl=en.
> > >
> > > --
> > > You received this message because you are subscribed to the 
Google
> > > Groups "Google Web Toolkit" group. To post to this group, send 
email to
> > > google-web-tool...@googlegroups.com. To unsubscribe from this 
group,
> > > send email to google-web-toolkit+unsubscr...@googlegroups.com. 
For more
> > > options, visit this group
> > > athttp://groups.google.com/group/google-web-toolkit?hl=en.
> >
> > --
> > You received this message because you are subscribed to the Google 
Groups
> > "Google Web Toolkit" group. To post to this group, send email to
> > google-web-tool...@googlegroups.com. To unsubscribe from this 
group, send
> > email to google-web-toolkit+unsubscr...@googlegroups.com. For 
more
> > options, visit this group
> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
> 

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



Re: Use Annotation to generate client side code

2010-02-03 Thread David Goodenough
On Tuesday 02 February 2010, Miss Marie Ruana wrote:
> Hi all,
> 
> I would like to know if it's possible to generate code with an
> annotation in client side before the GWT compilation ?
> 
> For example, if i have a POJO like this :
> 
> @MyAnnotation
> public class MyPojo {
>   private String dummyAttribute;
> }
> 
> I would like that "MyAnnotation" Annotation generate code before the
> GWT compilation process.
> Is this possible and which mechanism i need to use to do that ?
> 
> Thanks
> 
Have you looked at Lombok?   If not visit http://projectlombok.org .

This project does exactly what you are looking for (although writing the 
code is not trivial) and there is a method (called delombok) which takes
your source code and generates the raw Java code that would do the 
same thing so that you can run it through the GWT compilation process.

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-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: need to dynamically set a java field of a known name

2009-07-09 Thread David Goodenough

You can do it in real java, but as reflection is not supported in GWT it would
not work in GWT. 

In real java you would say:-

Test test = new Test();
Test.getClass().getField("value").set(test,"some value");

Note that if value is a private or protected field then you need to use
getDeclaredField not getField.

David

On Wednesday 08 July 2009, george9 wrote:
> When you have a typed class, say
>
> class Test {
> String value;
> }
>
> is it somehow possible to set field 'value' without a static reference
> in the code?
> I'm looking for an equivalent to JavaScript's:
>
> var Test = { };
> Test["value"] = "some value";
>
> JSNI can access a java field via the "[instance-exp...@class-
> name::field-name" notation, but that looks like a compile time thing.
>
> 
\

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