I just published an article on this topic. Maybe you want to have a
look at it: 
http://www.canoo.com/blog/2011/07/04/code-generation-in-gwt-with-deferred-binding-cdi-like-events/

Feedback is welcome!

cheers,
Berto

On Jun 22, 5:03 am, Elhanan Maayan <elh.maa...@gmail.com> wrote:
> first off  you probably mean the strong type definitions provided by GWT,
> not java right?
>
> second, that's not what i'm suggesting, i don't want to use events for
> enable disable buttons, but i  do want to use to create logical
> messages, that a work process has ended/started, or basically whatever
> causes you to leave a view and enter another one.
>
> i'm also not working with just Object or string, i'm doing exactly the same
> thing gwt does only with less code, i'm providing strong typed events, with
> generics, only without the need to actually create a new class for it every
> single time
>
> i can do this:
>
> private final MessageFactory<Entity> ENTITY_CREATED=new
> MessageFactory<Entity>()
> private final MessageFactory<Entity> ENTITY_DELETED  =new
> MessageFactory<Entity>();
>
> ...
> addHandler(ENTITY_CREATED=new MessageHandler<Entity>{
>
> }
>
> fire(ENTITY_CREATED.fire(entity))
>
> i get a strong typed custom event just like before, only with much less
> code..
>
>
>
>
>
>
>
> On Tue, Jun 21, 2011 at 10:46 PM, Alex D. <alex.dobjans...@gmail.com> wrote:
> > You shouldn't use custom events for every possible event in your app, imo
> > -- or, even better, identify the best events that match as much as possible.
>
> > What you're suggesting by this is removing the strong-type event
> > definitions provided by Java.
>
> > Of couse, you can work with a class called Event, that merely has a "String
> > name" and "Object data", but this defeats the purpose of what GWT is
> > suggesting
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To view this discussion on the web visit
> >https://groups.google.com/d/msg/google-web-toolkit/-/Y_ZKLyl29DkJ.
>
> > 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.

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

Reply via email to