SplitLayoutPanel is a DockLayoutPanel and a DockLayoutPanel requirement is 
that the center layer is added last. Once the center layer is added you can 
not add anything else. Thats because the center panel takes the remaining 
space and thus the panel needs to know what is already inside that panel to 
calculate the remaining space.

So using stock GWT classes there is no way to change that behavior. You 
would need to implement it yourself. Your best bet is probably writing a 
custom composite that is backed by a SplitLayoutPanel and provides @UiChild 
methods for north/east/south/center. These methods just store the widgets 
you add, and in Composite.onLoad() you would build the SplitLayoutPanel 
based on the added panels. That way the @UiChild methods can be called in 
any order and in onLoad() you can still build the SplitLayoutPanel with the 
center panel added last to satisfy DockLayoutPanel requirements.

http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/uibinder/client/UiChild.html


As an alternative try to refactor your code so that you dont need to access 
the center panel inside the constructor of the north panel. You could add a 
ui:field to the north and center panel and in your UiBinder's Java file 
"connect" both panels *after* binder.createAndBindUi(this) is called. With 
your current constructor approach you are trying to "connect" both panels 
*during 
the execution* of binder.createAndBindUi(this).


-- J.




-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to