Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
how to get fields in form from bean
hello everyone,
I am having a bean from which I am getting fields on form and all fields are put in grid layout.
But I want to do that some fields in different grid layout and then all these layout in a single vertical layout.
this is the code that i am using in form right now
public void setItemDataSource(Item newDataSource) {
if (newDataSource != null) {
newTradeshowMode = false;
List<Object> orderedProperties = Arrays.asList(TradeshowContainer.NATURAL_COL_ORDER);
super.setItemDataSource(newDataSource, orderedProperties);
v1.addComponent(h1);
v1.addComponent(h2);
v1.addComponent(h3);
h1.addComponent(getField("show_ref"));
h1.addComponent(getField("show_name"));
h1.addComponent(getField("show_retail"));
h2.addComponent(getField("prod_category_id"));
h2.addComponent(getField("is_active"));
h2.addComponent(getField("currency"));
h3.addComponent(getField("show_master_id"));
h3.addComponent(getField("start_dt"));
h3.addComponent(getField("end_dt"));
setReadOnly(true);
getFooter().setVisible(true);
currentRecord = newDataSource;
} else {
super.setItemDataSource(null);
getFooter().setVisible(false);
}
}
and this is the code that is using for displaying form
VerticalLayout vert = new VerticalLayout();
setFirstComponent(tradeshowList);
VerticalLayout v2 = new VerticalLayout();
GridLayout layout = new GridLayout(4,1);
layout.setSpacing(true);
layout.setSpacing(true);
tradeshowForm.setLayout(layout);
layout.setMargin(true, false, false, true);
tradeshowForm.setStyleName("detailForm");
Panel formPanel = new Panel("Tradeshow Details");
formPanel.setStyleName("formPanel");
formPanel.setHeight("95%");
formPanel.setWidth("70%");
vert.addComponent(tradeshowForm);
formPanel.setContent(vert);
//setSecondComponent(formPanel);
setSplitPosition(1000, SplitPanel.UNITS_PIXELS);
}
}
Plz help me..
Vikas