My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
GuitBinder  
Overview of GuitBinder
Updated Dec 30, 2010 by gal.dol...@gmail.com

Introduction

As in Guit 1.5 the ViewBinder and EventBusBinder will get deprecated and replaced for GuitBinder.

Features

  • Really similar to UiBinder (easier for people to understand).
  • Composed by a "Presenter" (java) and a "View"(ui.xml). Thats it! no view interface or view implementation.
  • Automatic view generation.
  • Easy event binding (same as before).
  • @ViewField to access view fields (same as UiBinder @UiField).
  • New @ViewFields annotation let you specify the fields outside the method name, so you can avoid the handlers convention.
  • New abstracts: GuitPresenter and GuitController.
  • Automatic view implementation recycling!
  • The ViewField have interface emulation.

First ViewImplementation recycling results

Blips demo on chrome: First time (rendering 20 blips): 203ms. Next times (20 item recycling the views): 13ms.

Thats awesome or what!? :D and it comes for free with GuitBinder.

@ViewHandler

A view handler binds view fields.

Format:

{fieldName}${eventName}

Where {eventName}: ClickEvent -> click, ValueChangeEvent -> valueChange

example:

@ViewHandler
void button1$click() {
 ....
}

With guit-gen you get validation of the fields names and of the events.

Binding multiple fields

example:

@ViewHandler
void button1$text1$click() {
 ....
}

@EventBusHandler

This one binds the presenter with event bus events.

Example:

@EventBusHandler
public void $login(String user) {
   ...
}

to bind with this event:

@GwtEvent(EventKind.SHARED)
public class Login {
    String user;
}
Powered by Google Project Hosting