PDA

View Full Version : FillToolItem does not work, at least in UiBinder.



Konstantin.Scheglov
6 Feb 2012, 1:36 PM
public FillToolItem() { setElement(DOM.createDiv());

BoxLayoutData data = new BoxLayoutData();
data.setFlex(1.0);
setLayoutData(data);
}


but in BoxLayoutContainer:

@UiChild(tagname = "child") public void add(IsWidget child, BoxLayoutData layoutData) {
if (child != null) {
child.asWidget().setLayoutData(layoutData);
}
super.add(child);
}


By default "layoutData" is "null".
So, it clears BoxLayoutData set in FillToolItem constructor.