Re: UiHandler idea

38 views
Skip to first unread message

Horváth István

unread,
Oct 16, 2015, 1:49:31 PM10/16/15
to gwt-pl...@googlegroups.com
you misunderstood it!
the UI just gets the data for the business logic (sendName). That
interface which defines sendName(String name) should be implemented in
the presenter part.
see this: http://dev.arcbees.com/gwtp/core/presenters/view-with-ui-handlers.html

On Fri, Oct 16, 2015 at 7:06 PM, Arkadiusz Ryćkowski
<arkadiusz...@gmail.com> wrote:
> I'm completely new to gwtp. Just read documentation and browsing gwtp sample
> basic.
> IMHO bad practices are shown here in ApplicationView.
> @UiHandler("sendButton")
> void onSend(ClickEvent event) {
> getUiHandlers().sendName(nameField.getText());
> }
> Why the view executes the business logic ? It should call sth like
> onSend(nameField.getText())
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWTP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to gwt-platform...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Arkadiusz Ryćkowski

unread,
Oct 28, 2015, 4:56:06 PM10/28/15
to GWTP
Hm I'm not sure . I've deleted the first post because I found that other examples were ok
View should be dump and IMHO should delegate the event: getUiHandlers.onSend(nameField.getText());
Reply all
Reply to author
Forward
0 new messages