[PJUG Javamail] GWT 2.0

James Perkins jrperkinsjr at gmail.com
Wed Dec 16 16:15:59 EST 2009


Last discussion on why Seans layout was not working correctly got me
curious. I can't remember exactly what he said the issue was, but I think I
remember seeing in the code:

RootPanel.get("gui").add(layout);
RootPanelLayout.get().add(layout);

After reading the documentation on RootPanelLayout and looking at the
source, it appears as if it should be adding the "layout" widget twice.

Per the RootLayoutPanel JavaDoc:
get

public static RootLayoutPanel get()

    Gets the singleton instance of RootLayoutPanel. This instance will
always be attached to the document body via RootPanel.get().

    Note that, unlike RootPanel.get(String), this class provides no way to
get an instance for any element on the page other than the document body.
This is because we know of no way to get resize events for anything but the
window.


So it seems as you no longer create your DIV with the "gui" id in the HTML
file and it should be created in the Java code. Obviously you can use the
RootPanel.get(id) static method, but the RootLayoutPanel calls
RequiresResize.onResize() when it's instantiated or the window is resized.

It should also be noted that the RootLayoutPanel can only be used in
standards mode.

Just thought I would share. Here are the supporting links as well.
http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/index.html?overview-summary.html
http://code.google.com/p/google-web-toolkit/source/browse/releases/2.0/user/src/com/google/gwt/user/client/ui/RootLayoutPanel.java?spec=svn6637&r=6637

--
James R. Perkins
http://twitter.com/the_jamezp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pjug.org/pipermail/javamail/attachments/20091216/cb8e48a6/attachment.html 


More information about the Javamail mailing list