smartGWT: 4.1d Build date: Wed Feb 12 17:15:00 GMT 200 2014
Linux Mint 14
Firefox 25.01
I've copied the code of the Smart GWT Showcase example Grids->Nested Form
and made my own testcase
The problem is when you save the expanded record, it automatically collapse the record.
The code did not do that in version smartGWT 3.1p.
Interesting enough the exact code seems to work in the showcase example.(It does not auto collapse)
Is there a new setting to prevent the auto collapse or is it a problem in the current version ?
Linux Mint 14
Firefox 25.01
I've copied the code of the Smart GWT Showcase example Grids->Nested Form
and made my own testcase
Code:
final UserGroupDS usergroupDS = UserGroupDS.getInstance(); final ListGrid listGrid = new ListGrid() { @Override protected Canvas getExpansionComponent(final ListGridRecord record) { final ListGrid grid = this; VLayout layout = new VLayout(5); layout.setPadding(5); final DynamicForm df = new DynamicForm(); df.setNumCols(4); df.setDataSource(usergroupDS); df.addDrawHandler(new DrawHandler() { public void onDraw(DrawEvent event) { df.editRecord(record); } }); IButton saveButton = new IButton("Save"); saveButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { df.saveData(); } }); IButton cancelButton = new IButton("Done"); cancelButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { grid.collapseRecord(record); } }); HLayout hLayout = new HLayout(10); hLayout.setAlign(Alignment.CENTER); hLayout.addMember(saveButton); hLayout.addMember(cancelButton); layout.addMember(df); layout.addMember(hLayout); return layout; } }; listGrid.setWidth(600); listGrid.setHeight(500); listGrid.setDrawAheadRatio(4); listGrid.setCanExpandRecords(true); listGrid.setAutoFetchData(true); listGrid.setDataSource(usergroupDS); ListGridField nameField = new ListGridField("name"); ListGridField descriptionField = new ListGridField("description"); listGrid.setFields(nameField, descriptionField); listGrid.draw();
The code did not do that in version smartGWT 3.1p.
Interesting enough the exact code seems to work in the showcase example.(It does not auto collapse)
Is there a new setting to prevent the auto collapse or is it a problem in the current version ?
Comment