Using SmartClient Version: v9.0p_2013-07-10/Enterprise Deployment (built 2013-07-10) with IE9.
Added new records with embedded components to a List Grid causes existing embedded components to disappear from the existing records.
I have included code below that works in v8.3p_2013-04-13/Enterprise Deployment (2013-04-13) but exhibits the problem when in used in the 4.0p-2013-07-10 code base.
Add record...update name...select new record...click Add Embedded...Add another record the same way and the first embeded component is removed from the screen.
Added new records with embedded components to a List Grid causes existing embedded components to disappear from the existing records.
I have included code below that works in v8.3p_2013-04-13/Enterprise Deployment (2013-04-13) but exhibits the problem when in used in the 4.0p-2013-07-10 code base.
Add record...update name...select new record...click Add Embedded...Add another record the same way and the first embeded component is removed from the screen.
Code:
@Override public void onModuleLoad() { final ListGrid grid = new ListGrid(); VLayout groupingLayout = new VLayout(); groupingLayout.setSize("100%", "100%"); ToolStrip strip = new ToolStrip(); ToolStripButton button = new ToolStripButton("Add"); button.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { grid.startEditingNew(); } }); strip.addButton(button); button = new ToolStripButton("Add Embedded"); button.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { if ( grid.getSelectedRecord() != null) { grid.addEmbeddedComponent(new ListGrid(), grid.getSelectedRecord()); } else { SC.say("Select record to add embedded component"); } } }); strip.addButton(button); groupingLayout.addMember(strip); grid.setSize("100%", "*"); ListGridField name = new ListGridField("name"); grid.setFields(name); groupingLayout.addMember(grid); groupingLayout.draw(); }
Comment