View Full Version : [2.0 M2] LabelField, TextArea no longer visible

Curt Arnold
22 May 2009, 2:02 PM
I've just update my app to 2.0 M2 and now half of my fields no longer appear (though the labels do appear). LabelField, TextArea are affected while TextField is unaffected.

I've inspected the value of getElement().getString() in LabelField.setValue() and the generated element did not appear to change significantly between M1 and M2.

I can switch one of fields from LabelField to TextField<String> and it reappears.

Anybody encounter a similar problem when switching from M1 to M2? Any suggestions on possible culprits?

23 May 2009, 1:14 AM
Can you please post some simple testcase that demonstrates it? I am unable to reproduce it.

Curt Arnold
23 May 2009, 2:32 PM
Here is a sample case that reproduces the problem. In the M1 build (and likely 1.2.x, but I didn't test it), the following code would result in a label field, two text fields and a text area being visible and taking the entire width of the form on all browsers tested. With M2, the page is properly displayed with Firefox, however IE6 does not display the label or text area, but does display the text fields, IE7 displays all the fields, but the label and text area are slightly below the caption. Reducing the FormData("100%") to FormData("95%") results in the fields being visible on IE6.

package com.example.form100.client;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.form.FormPanel;
import com.extjs.gxt.ui.client.widget.form.LabelField;
import com.extjs.gxt.ui.client.widget.form.TextArea;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.layout.FormData;
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.logical.shared.ResizeEvent;
import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;
public class Sample implements EntryPoint, ResizeHandler {

private LayoutContainer container;

public void onModuleLoad() {
container = new FormPanel();
// Change RESIZE to 95% or so and problem goes away
final String RESIZE = "100%";
container.setLayout(new FormLayout());
LabelField label1 = new LabelField();
label1.setValue("Label should be visible");
container.add(label1, new FormData(RESIZE));

TextField<String> txtField1 = new TextField<String>();
container.add(txtField1, new FormData(RESIZE));
TextField<String> txtField2 = new TextField<String>();
container.add(txtField2, new FormData(RESIZE));

TextArea txtArea1 = new TextArea();
container.add(txtArea1, new FormData(RESIZE));
container.setSize(Window.getClientWidth(), Window.getClientHeight());

public void onResize(ResizeEvent event) {
container.setSize(event.getWidth(), event.getHeight());

8 Jun 2010, 10:11 AM
whatever happened to this issue? ever get resolved?

I am experiencing the same thing, but only in IE. works in FF.