sjivan / gwt-ext

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

com.gwtext.client.widgets.Component.getAttributeAsBoolean() make some mistake #470

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. just see the source code of 
com.gwtext.client.widgets.Component.getAttributeAsBoolean()
2. now in if condition is isRendered(), but in other getAttributeAs***() 
method is isCreated()
3. if I create a TextField, when the TextField is created and before 
rendered, and I setReadOnly(true),but in this case, isReadOnly() results 
false.

What is the expected output? What do you see instead?
in com.gwtext.client.widgets.Component, the getAttributeAsBoolean() should 
be replaced with
if (isCreated()) {
            return JavaScriptObjectHelper.getAttributeAsBoolean(getJsObj
(), attribute);
        } else {
            return JavaScriptObjectHelper.getAttributeAsBoolean(config, 
attribute);
        }

Please use labels and text to provide additional information.
I use GWT-Ext2.0.4 and I find GWT-Ext2.0.5 still has this problem.

Original issue reported on code.google.com by sharemet...@gmail.com on 3 Feb 2009 at 2:36