When this combination of code is used, ListGrid editing in Internet Explorer is problematic. The next mouse click after the double-click to begin editing a record causes the editing mode to exit. I've tested this against IE 8.0.6001.187021C (on Windows XP) and IE 9.0.8112.16421 (on Windows 7). (I do not see this problem on Firefox or Chrome.)
INFO level event log:
Datasource:
Sites.java:
Pong.java:
The problem seems to be related to the "RootPanel.get().add()". If scaffoldLayout.draw() is used, the ListGrid editing work as expected.
I'm seeing this with SC_SNAPSHOT-2011-04-11/PowerEdition Deployment (built 2011-04-11); both in compiled mode and hosted mode.
INFO level event log:
16:03:57.697:MDN2:INFO:EventHandler:Target Canvas for event 'mousedown': [GridBody ID:isc_ListGrid_0_body]
16:03:57.760:MUP7:INFO:EventHandler:Target Canvas for event 'mouseup': [GridBody ID:isc_ListGrid_0_body]
16:03:57.991:MUP2:INFO:EventHandler:Target Canvas for event 'mouseup': [GridBody ID:isc_ListGrid_0_body]
16:04:00.809:MDN1:INFO:EventHandler:Target Canvas for event 'mousedown': [ScreenSpan ID:isc_EH_screenSpan]
16:04:00.920:MUP6:INFO:EventHandler:Target Canvas for event 'mouseup': [GridBody ID:isc_ListGrid_0_body]
16:03:57.760:MUP7:INFO:EventHandler:Target Canvas for event 'mouseup': [GridBody ID:isc_ListGrid_0_body]
16:03:57.991:MUP2:INFO:EventHandler:Target Canvas for event 'mouseup': [GridBody ID:isc_ListGrid_0_body]
16:04:00.809:MDN1:INFO:EventHandler:Target Canvas for event 'mousedown': [ScreenSpan ID:isc_EH_screenSpan]
16:04:00.920:MUP6:INFO:EventHandler:Target Canvas for event 'mouseup': [GridBody ID:isc_ListGrid_0_body]
Code:
<DataSource schema="ADENT" dbName="adme2" tableName="SITE" ID="SITE" serverType="sql" > <fields> <field sequenceName="SITE_ID_SEQ" primaryKey="true" name="id" type="sequence" hidden="true"></field> <field name="display_name" length="100" type="text"> </field> <field name="host_name" length="250" type="text"> <validators> <validator type="isUnique" requiresServer="true" /> <validator type="doesntContain" substring=" " /> </validators> </field> <field name="username" length="50" type="text"> </field> <field name="pw" length="50" type="password"> </field> <field name="db_port" type="number" align="center" > <validators> <validator type="isInteger" /> </validators> </field> <field name="service_name" length="250" type="text"> </field> <field name="db_link_name" length="100" type="text" > </field> <field name="active" length="1" type="text" align="center" canEdit="true" width="50"> <valueMap> <value ID="Y">Y</value> <value ID="N">N</value> </valueMap> </field> <field name="last_alive" type="datetime" width="120" > </field> </fields> </DataSource>
Code:
package com.smartgwt.sample.client; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.layout.VLayout; public class Sites extends VLayout { private final static String SITE_DATASOURCE_NAME = "SITE"; private ListGrid mainGrid; public Sites() { super(); setWidth100(); setHeight100(); setMembersMargin(10); addMember(buildMainGrid()); } private ListGrid buildMainGrid() { mainGrid = new ListGrid(); mainGrid.setMargin(5); mainGrid.setWidth100(); mainGrid.setHeight("*"); mainGrid.setDataSource(DataSource.get(SITE_DATASOURCE_NAME)); mainGrid.setAutoFetchData(true); mainGrid.setAutoSaveEdits(false); return mainGrid; } }
Code:
package com.smartgwt.sample.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.ui.RootPanel; import com.smartgwt.client.widgets.layout.HLayout; public class Pong implements EntryPoint { private HLayout scaffoldLayout = null; public void onModuleLoad() { scaffoldLayout = new HLayout(); scaffoldLayout.setWidth100(); scaffoldLayout.setHeight100(); final Sites site = new Sites(); scaffoldLayout.addMember(site); RootPanel.get().add(scaffoldLayout); RootPanel.get().setWidgetPosition(scaffoldLayout, 0, 0); } }
I'm seeing this with SC_SNAPSHOT-2011-04-11/PowerEdition Deployment (built 2011-04-11); both in compiled mode and hosted mode.
Comment