On Dec 21, 12:13 pm, Rick <rick4...@gmail.com> wrote: > Hi all > > As GWT is adding widgets in Horizontal panel, in the same way I want > to get element in my composite widgets so that I can manage their > layout in onAttach means I want to get label and html in RComposite > widget's on attach. > > ui.xml > <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' > xmlns:g='urn:import:com.google.gwt.user.client.ui' > xmlns:my='urn:import:gwt.testui.client'> > > <my:RCompositeWidget> > > <g:Label>My Widgets</g:Label> > <g:HTML>in a row</g:HTML> > > </my:RCompositeWidget> > > </ui:UiBinder> > -->RCompositeWidget > public class RCompositeWidget extends Composite { > public RCompositeWidget() { > HorizontalPanel hp = new HorizontalPanel(); > initWidget(hp); > } > > } > > But I am getting following exception: > In com.google.gwt.uibinder.rebind.xmlelemen...@870aad, found > unexpected child "<g:Label>"
RCompositeWidget has to implement HasWidgets if it's meant to be a widget container, otherwise how would UiBinder add the widgets to it? Actually, UiBinder does not know that RCompositeWidget internally uses an HorizontalPanel. -- 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-tool...@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.