google-code-export / gwt-ext

Automatically exported from code.google.com/p/gwt-ext
0 stars 0 forks source link

Javascript Error when calling Button.hide() before calling Form.render() #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. add button to a form
2. call button.hide()
3. call form.render()

What is the expected output? What do you see instead?
No JavaScript error

What version of the product are you using? On what operating system?
Revision 526

Please provide any additional information below.
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.form.Form;
import com.gwtext.client.widgets.form.TextField;
import com.gwtext.client.widgets.form.TextFieldConfig;

public class TestCase implements EntryPoint {

        /*
         * (non-Javadoc)
         *
         * @see com.google.gwt.core.client.EntryPoint#onModuleLoad()
         */
        public void onModuleLoad() {
                VerticalPanel vp = new VerticalPanel();
                vp.setSpacing(15);
                Button hiddenButton = null;
                Form form = new Form();
                form.add(new TextField(new TextFieldConfig()));
                form.addButton(hiddenButton = new Button("Hidden Button"));

                hiddenButton.hide(); // javascript error occurs
                form.render();

                vp.add(form);
                RootPanel.get().add(vp);
        } 
}

Original issue reported on code.google.com by ashleywong1015 on 30 Aug 2007 at 6:56

GoogleCodeExporter commented 9 years ago
Fixed in GWT-Ext 2.0

Original comment by sanjiv.j...@gmail.com on 11 Feb 2008 at 8:28