Version: SmartClient Version: v8.3p_2013-06-13/PowerEdition Deployment (built 2013-06-13)
Description: If you edit a cell in a tree grid (F2 or dbl-click) and then cursor down, then next cell is opened and text is selected but then focus is lost a split second later, preventing you from typing.
This happens only when the tree grid has a single field, if a second field is added, the focus is held properly.
Additional note: Under IE 9 and 10, focus and selection is lost/confused even when multiple columns are visible, although you can still cursor up/down.
Showcase sample to demonstrate:
Description: If you edit a cell in a tree grid (F2 or dbl-click) and then cursor down, then next cell is opened and text is selected but then focus is lost a split second later, preventing you from typing.
This happens only when the tree grid has a single field, if a second field is added, the focus is held properly.
Additional note: Under IE 9 and 10, focus and selection is lost/confused even when multiple columns are visible, although you can still cursor up/down.
Showcase sample to demonstrate:
Code:
/* * Isomorphic SmartGWT web presentation layer * Copyright 2000 and beyond Isomorphic Software, Inc. * * OWNERSHIP NOTICE * Isomorphic Software owns and reserves all rights not expressly granted in this source code, * including all intellectual property rights to the structure, sequence, and format of this code * and to all designs, interfaces, algorithms, schema, protocols, and inventions expressed herein. * * If you have any questions, please email <sourcecode@isomorphic.com>. * * This entire comment must accompany any portion of Isomorphic Software source code that is * copied or moved from this file. */ package com.smartgwt.sample.showcase.client.dataintegration.java.datasource; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.types.FetchMode; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.grid.ListGridField; import com.smartgwt.client.widgets.layout.VLayout; import com.smartgwt.client.widgets.tree.TreeGrid; import com.smartgwt.sample.showcase.client.PanelFactory; import com.smartgwt.sample.showcase.client.ShowcasePanel; import com.smartgwt.sample.showcase.client.SourceEntity; public class SimpleCustomDataSourceSample extends ShowcasePanel { private static final String DESCRIPTION = "<p>This example shows an entirely custom DataSource. It is created by extending <b>BasicDataSource</b> and implementing the four core CRUD methods. In this case, we maintain a static List of Maps that is initialized with hard-coded data every time the server starts; but of course, this code could do anything. This approach allows completely custom data operations to be simply plugged in to the SmartGWT Server framework.</p>" + "<p>Note also that this code deals directly with Java <code>Maps</code> and <code>Lists</code>, without worrying about format conversions - even custom code leverages the SmartGWT Server's automatic and transparent translation of request data, from JSON to Java and back to JSON.</p>"; public static class Factory implements PanelFactory { private String id; public Canvas create() { SimpleCustomDataSourceSample panel = new SimpleCustomDataSourceSample(); id = panel.getID(); return panel; } public String getID() { return id; } public String getDescription() { return DESCRIPTION; } } protected boolean isTopIntro() { return true; } public Canvas getViewPanel() { DataSource customDS = DataSource.get("customDataSource_user"); final TreeGrid userList = new TreeGrid(); userList.setWidth(600); userList.setHeight(224); userList.setDataSource(customDS); userList.setCanEdit(true); // userList.setCanRemoveRecords(true); userList.setLeaveScrollbarGap(false); userList.setDataFetchMode(FetchMode.LOCAL); userList.setAutoFetchData(true); userList.setFields( new ListGridField("userName") ); IButton addButton = new IButton("Create User"); addButton.setWidth(110); addButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { userList.startEditingNew(); } }); VLayout layout = new VLayout(15); layout.addMember(userList); layout.addMember(addButton); return layout; } public String getIntro() { return DESCRIPTION; } public SourceEntity[] getSourceUrls() { return new SourceEntity[] { new SourceEntity("UserDataSource.java", JAVA, "source/datasource/UserDataSource.java.html", true) }; } }
Comment