editPanel.addStyleName("form-edit-panel");
RenderMetaData metaData = new RenderMetaData();
metaData.setNumColumns(numColumns);
GroupRenderer groupRenderer = new DefaultGroupRenderer();;
Map<String, FormItem> groupItems = new LinkedHashMap<String, FormItem>();
for(FormItem item : items)
{
groupItems.put(item.getName(), item);
}
// edit view
Widget widget = groupRenderer.render(metaData, "default", groupItems);
editPanel.add(widget);
// plain view
PlainFormView plainView = new PlainFormView(items);
plainView.setNumColumns(numColumns);
plainViews.add(plainView);
viewPanel.add(groupRenderer.renderPlain(metaData, "default", plainView));
deck.add(editPanel);
// toggle default view
toggleViews();