public class ContactsPresenter implements Presenter,
ContactsView.Presenter<ContactDetails> {
......
public void onAddButtonClicked() {
eventBus.fireEvent(new AddContactEvent());
}
public void onDeleteButtonClicked() {
deleteSelectedContacts();
}
public void onItemClicked(ContactDetails contactDetails) {
eventBus.fireEvent(new EditContactEvent(contactDetails.getId()));
}
....
}
Why one method fires and event and the other just do some logic witch
is defined the class ?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
Seems that the onAddButtonClicked and onItemClicked methods perform some actions that involve other Presenters/Views that listen to those kinds of events. deleteSelectedContacts is just performing local changes that don´t affect other views. If there would be a different view that is showing a (for example) contact count and this view needs to know about some changes in your contacts, you would fire an event in deleteSelectedContacts.
Adio
unread,
May 2, 2012, 2:40:10 AM5/2/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
Aha, got it !
On May 2, 2:14 am, Jambi <michael.lukaszc...@googlemail.com> wrote:
> Seems that the onAddButtonClicked and onItemClicked methods perform some
> actions that involve other Presenters/Views that listen to those kinds of
> events. deleteSelectedContacts is just performing local changes that don´t
> affect other views. If there would be a different view that is showing a
> (for example) contact count and this view needs to know about some changes
> in your contacts, you would fire an event in deleteSelectedContacts.
>
> Am Dienstag, 1. Mai 2012 15:01:20 UTC+2 schrieb Adio:
>
>
>
>
>
>
>
>
>
> > Hi everyone, now that i am working with GWT i am facing a problem with
> > the event handling mechanism the first problem was (
>