Search code examples
gwtgwt-2.2-celltable

realizing questionnaire (survey) constructor using gwt


in my current project i need to realize questionnaire (survey) constructor functionality (kind of google forms). In my case there is list of questionnaires, every questionnaire has list of question groups, every question group has list of questions and every question can have some number of answers. It should be possible to add/edit/delete such composite object inline.

To present such nested (kind of tree) data structure I thought of using CellTable, containing CompositeCells but I have come to necessity of doing second and third level composition (e.g. every CompositeCell will contain another CompositeCell etc.)

So finally it turned out to be a bit tricky to populate/update such a table using CellTable and ListDataProvider.

With one nesting (Questionnaire->Criterias) it was simple but not with second and third level composition Questionnaire->Criterias->Questions->Answers.

I thought maybe you have some ready tips regarding presenting such data structure? What is better to use FlexTable or CellTable?

Thanks in advance


Solution

  • If you want to (or have to) use Widgets go with FlexTable, otherwise go with CellTable.

    CellTable will have better performance, and you get a lot out of the box.

    Widgets in a FlexTable can offer a better (richer) user experience in some cases (DND, etc).