Hello everyone.

  I watched Ray's talk, and have been reworking my project to follow
many of his suggestions/standards, and have been quite happy with the
results.  Today, however, I ran into a small problem.  I am making a
website that has a layout fairly similar to an email program -- that
is, there are a variety of buttons/widgets/whatever in the interface,
plus a set of some number of rows in a table, essentially.  (Email
header info, basically?).  Here's the Presenter/Display idea:
  class ExampleEmailPresenter {
    interface Display {
      HasClickHandlers getComposeNewEmailButton();
      ... various other buttons

      HasValue<String> getSearchEmailField();
      ... etc -- all this makes sense to me, and I've done it on my
less complex pages and it works

      // Now, how do you handle the display of a set of emails?
      // ArrayList<EmailOverviewPresenter.Display> getEmailDisplays
() // ?
      // HasListOfValue<EmailOverview> getEmailOverviewList(); // a
new Has* idea?
      // Something I'm not thinking of? (this is what I'm assming)
    }

    ArrayList<EmailOverview> emails;
    // Then register on the EventBus to receive alerts when the email
list is updated, and call:
    public emailListUpdated() {
      // This would be code to connect up the Email list Displays to
the emails.
    }
  }

  Basically, I can think of a few ways that I could connect them up,
but every way I think of feels like a hack, like I'm missing the
really smooth, clean way to have a list of something.  I mean, even if
it's just an unknown number of Strings you want in your display...
How does one Presenter's Display have a set of child displays (even if
they are jut HasText's or something simple) without crossing borders,
or having a lot of ugly maintenence code?  Any examples or suggestions
out there?  Basically, what I'd like to see is what structure you put
in the Display, what structure you put in the Presenter, and what
logic would go into the "The Data Was Updated" function...  Even just
a description of what you'd do is fine, this entire Email example is
made up for discussion anyway, I'm just looking for help with
understanding the design paradigm.

Thanks in advance,

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