1. #1
    Ext User
    Join Date
    Mar 2009
    Posts
    1
    Vote Rating
    0
    dleblanc is on a distinguished road

      0  

    Default [FIXED] Defect when tabbing to field with checkbox in editable grid

    [FIXED] Defect when tabbing to field with checkbox in editable grid


    In an EditorGrid, with GXT 1.1, we have a problem where you can't tab to a field that is a checkbox. This is with web mode (hosted mode in Linux ignores the tab key). This is with IE6 and Firefox 3, on Linux (firefox) and Windows (both).

    This is with GXT 1.1, but also appears to be the case on the GXT explorer with 1.2.3.

    The behaviour I'm seeing is that I start editing on the 1st editable field, hit tab, it highlights the checkbox for a split second, then looses focus (but the checkbox appears editable, in a left justified fashion). I can then tab to other components, but they aren't in the edit mode anymore, they just get selected, and the first checkbox still remains in it's edit state. After I tab beyond that last item, it then tabs onto the single editable checkbox again. (Please run the attached code to see, it's hard to explain).

    If however, when I tab onto the checkbox, I edit it with my mouse, then I can proceed to tab to other components correctly (this doesn't help me, it's just interesting info on the bug).

    A workaround for 1.1 would be preferred, as we're doing a release soon.

    Thanks,

    -Dave LeBlanc, IMP Solutions.

    Some sample code follows:

    package bugdemo.client;

    import java.util.ArrayList;
    import java.util.List;

    import com.extjs.gxt.ui.client.data.BaseModelData;
    import com.extjs.gxt.ui.client.store.ListStore;
    import com.extjs.gxt.ui.client.widget.form.CheckBox;
    import com.extjs.gxt.ui.client.widget.form.TextField;
    import com.extjs.gxt.ui.client.widget.grid.CellEditor;
    import com.extjs.gxt.ui.client.widget.grid.CheckColumnConfig;
    import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
    import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
    import com.extjs.gxt.ui.client.widget.grid.EditorGrid;
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.ui.RootPanel;

    @SuppressWarnings("serial")
    class EditablePojo extends BaseModelData {
    private static final String NAME = "name";
    private static final String BOOL_VALUE = "boolValue";

    public EditablePojo() {
    set(NAME, "initial name");
    set(BOOL_VALUE, false);
    }

    public String getName() {
    return get(NAME);
    }
    public void setName(String name) {
    set(NAME, name);
    }
    public Boolean getBoolValue() {
    return get(BOOL_VALUE);
    }
    public void setBoolValue(Boolean boolValue) {
    set(BOOL_VALUE, boolValue);
    }
    }

    public class BugDemo implements EntryPoint {

    public void onModuleLoad() {

    List<ColumnConfig> configs = new ArrayList<ColumnConfig>();

    ColumnConfig strColumn = new ColumnConfig();
    strColumn.setId("name");
    strColumn.setHeader("String Name");
    strColumn.setWidth(220);
    strColumn.setEditor(new CellEditor(new TextField<String>()));

    ColumnConfig boolColumn = new CheckColumnConfig("boolValue", "Boolean Value", 100);
    boolColumn.setEditor(new CellEditor(new CheckBox()));

    configs.add(strColumn);
    configs.add(boolColumn);

    ColumnModel cm = new ColumnModel(configs);

    final ListStore<EditablePojo> store = new ListStore<EditablePojo>();
    store.add(new EditablePojo());
    store.add(new EditablePojo());

    final EditorGrid<EditablePojo> grid = new EditorGrid<EditablePojo>(store, cm);
    grid.setWidth(600);
    grid.setHeight(600);

    RootPanel.get().add(grid);
    }
    }

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Fixed it for trunk and 1.2 branche. Will be in SVN soon.

  3. #3
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Fixed in SVN.

Thread Participants: 1