Split Form with Grids

Hi,

I have a requirement and am wondering how best to approach it. I have a split form, split across multiple tabs, similar to the example in the showcase at http://www.smartclient.com/smartgwt/showcase/#layout_form_splitting.

Similar to the example, some of the tabs have standard form controls, i.e. Combo Boxes, Text Boxes, Check Boxes etc.
Now, I have one complication, on a couple of the tabs I need to show editable grids, on which the user can view, update, add and remove rows. They can then click on the next button to continue to the next tab where they again enter data into a standard form.

On the last tab, when they click “Finish”, all the form data should be submitted. The data on the server should only be updated at this point, not before.

I am clear as to how I can manage the standard forms using the “ValuesManager”, but am not clear about how to integrate the grids into the final submit.

Any ideas would be appreciated.

Just to add, I guess I certainly wouldn’t get stuck with this problem, as I can implement one form per tab, and manage the data across the tabs in the http session on the server side. Then, when “finish” is clicked I could write from the session to the database on the server.

However, I’m just wondering is there a better way to do this within the smartgwt framework.

Hi vividapp,

Both DynamicForm and ValuesManager can retain and save data that is not represented by any FormItem. So one approach here is that, right before you call valuesManager.saveData(), gather the data you want to save from the grid and call valuesManager.setValue() with that.

Thanks, I’ll give that a try