PDA

View Full Version : window + form + only in firefox broken



fother
28 Aug 2009, 1:29 PM
compile.. open firefox.. and click in the button reset..
will appears scroll in all fields.. but this layout only broken in ff.. :-?



public void onModuleLoad() {

final TextField<String> master = new TextField<String>();
master.setAllowBlank(false);
master.setMaxLength(100);
master.setFieldLabel("master");

final ListStore<BeanModel> unMedidaStore = new ListStore<BeanModel>();

final ComboBox<BeanModel> comboBox = new ComboBox<BeanModel>();
comboBox.setFieldLabel("combo");
comboBox.setStore(unMedidaStore);
comboBox.setAllowBlank(false);
comboBox.setDisplayField("combo");

final NumberField precisao = new NumberField();
precisao.setAllowBlank(false);
precisao.setMaxLength(9);
precisao.setFieldLabel("field");

final FormData formData = new FormData("100%");

final LayoutContainer left = new LayoutContainer();
left.setStyleAttribute("paddingRight", "17px");
FormLayout layout = new FormLayout();
layout.setLabelAlign(LabelAlign.TOP);
left.setLayout(layout);
left.add(comboBox, formData);

final LayoutContainer right = new LayoutContainer();
right.setStyleAttribute("paddingRight", "17px");
layout = new FormLayout();
layout.setLabelAlign(LabelAlign.TOP);
right.setLayout(layout);
right.add(precisao, formData);

final LayoutContainer main = new LayoutContainer();
main.setWidth(554);
main.setLayout(new ColumnLayout());
main.add(left, new ColumnData(.5));
main.add(right, new ColumnData(.5));

final FormPanel form = new FormPanel();
form.setHeaderVisible(false);
form.setBorders(false);
form.setLabelAlign(LabelAlign.TOP);
form.setButtonAlign(HorizontalAlignment.CENTER);
form.setFieldWidth(537);
form.setBodyBorder(false);
form.add(master);
form.add(main);

final Button button1 = new Button("reset");
button1.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(final ButtonEvent ce) {
form.reset();
}
});

form.addButton(button1);

final Window window = new Window();
window.setSize(600, 365);
window.setModal(true);
window.setBlinkModal(true);
window.setFrame(true);
window.setPlain(true);
window.setResizable(false);
window.setHeading("window");
window.setLayout(new RowLayout(Orientation.VERTICAL));

final ContentPanel formPanel = new ContentPanel();
formPanel.setHeaderVisible(false);
formPanel.add(form);
formPanel.setStyleAttribute("padding", "5px");

window.add(formPanel, new RowData(1, 1));
window.show();
}