PDA

View Full Version : FORM PANEL: FIELD ICON POSITION ERROR ON IE7



drenda81
7 Jul 2008, 9:44 AM
Hello,
I tried this code:

ContentPanel outer = new ContentPanel();
outer.setFrame(true);
outer.setCollapsible(false);
outer.setAnimCollapse(false);
outer.setButtonAlign(HorizontalAlignment.CENTER);
outer.setIconStyle("icon-table");
outer.setHeading("Secondo pannello");
outer.setLayout(new FitLayout());
outer.setHeaderVisible(true);
outer.setScrollMode(Scroll.ALWAYS);

final FormPanel panel = new FormPanel();
panel.setAutoHeight(true);
panel.setFrame(false);
panel.setHeaderVisible(false);
panel.setScrollMode(Scroll.AUTO);
panel.setFieldWidth(210);
panel.setLabelWidth(100);
panel.setButtonAlign(HorizontalAlignment.LEFT);
panel.setWidth(400);
panel.setStyleAttribute("padding", "10");

TextField cognome = new TextField();
cognome.setFieldLabel("Cognome");
cognome.setName("cognome");
cognome.setEmptyText("Inserire il cognome");
cognome.setAllowBlank(false);
cognome.setMinLength(4);
panel.add(cognome);

TextField nome = new TextField();
nome.setFieldLabel("Nome");
nome.setEmptyText("Inserire il nome");
nome.setAllowBlank(false);
panel.add(nome);

TextField email = new TextField();
email.setFieldLabel("Email");
panel.add(email);

TextField username = new TextField();
username.setFieldLabel("Username");
panel.add(username);

TextField password = new TextField();
password.setFieldLabel("Password");
password.setPassword(true);
panel.add(password);

NumberField telefono = new NumberField();
telefono.setFieldLabel("Telefono");
panel.add(telefono);

Button save = new Button("Save");
panel.addButton(save);
panel.addButton(new Button("Cancel"));
outer.add(panel);

the Panel outer is inside a ContentPanel as this:

centerPanel = new ContentPanel();
centerPanel.setBorders(false);
centerPanel.setHeaderVisible(false);
centerPanel.setLayout(new FitLayout());

BorderLayoutData data = new BorderLayoutData(LayoutRegion.CENTER);
data.setMargins(new Margins(5, 5, 5, 5));
viewport.add(centerPanel, data);

In IE7 the icon that report a not valid data on a field is inside the textbox (see the image attached).

Thanks

koneru
19 Jul 2008, 10:58 PM
Hi drenda81,

Were you able to fix this by any chance? I am in a similar situation.

drenda81
22 Jul 2008, 12:37 AM
Hi,
I've deleted the parent Content Panel and I have insert the form panel in a LayoutContainer.

It works for me.

Bye