how to add field set in vaadin panel ?

how to create field set in the panel ?

Hi,

I’m going to guess that you are new to Vaadin.

Have you gone through the
tutorial
, and read
The Book Of Vaadin
? I strongly recommend that you do; they are the main documentation sources, and will show you how to do most things with Vaadin.

To answer your questions briefly : you build your UI by constructing components and layouts in code, and you create a Form to present fields.

Cheers,

CHarles.

yes i refer the book but i am not able to see how to add field set in the panel

i want create this type of form

i am not able to identify the which control is use in the
“Information”
this indicated as a 3
12380.png

Well use a Label as indicated
here
.


i am use the label at that indicated point
but i don’t know the which control is us to display like HTML field set

Are you using the term “fieldset” to mean “border around the outside of the form with a caption”? ('cos an HTML Fieldset is more than that)

FWIW, from a aesthetic point of view, I’m cringing a little : what’s with all the lines? What’s wrong with whitespace and plain old captions? But ignoring that…

OK : Well, I don’t know how precise you want to be on matching the look and feel, but the equivalent is probably simply panel with a caption. I’ve started to knock together the beginnings of an example layout. Screenshot at the end.

Cheers,

Charles.

public class TestApp extends Application {
  public void init() {

    Window mainWindow = new TestWindow();
    setMainWindow(mainWindow);
  }


  public class TestWindow extends Window {
    public TestWindow() {

      VerticalLayout vl = new VerticalLayout();
      vl.setSizeUndefined();
      vl.setMargin(true);
      vl.setSpacing(true);
      vl.addComponent(createDematLayout());
      vl.addComponent(createInformationSection());
      vl.addComponent(createCustomerDocumentsSection());
      vl.addComponent(createScannersSection());
      setContent(vl);
    }

    private Component createCustomerDocumentsSection() {
      return new Panel("Customer Documents");
    }

    private Component createInformationSection() {
      Panel panel = new Panel("Information");
      Label text = new Label("Here's some informational text.<br/> More text. La-la-la", Label.CONTENT_XHTML );
      panel.addComponent(text);
      return panel;
    }

    private Component createDematLayout() {
      HorizontalLayout dematLayout = new HorizontalLayout();
      dematLayout.setSpacing(true);
      Label captionLabel = new Label("Demat");
      dematLayout.addComponent(captionLabel);
      ComboBox combo = new ComboBox();
      // Yes : You'd set the refresh icon on this button, prob doesn't need caption
      Button refresh = new Button("Refresh");

      dematLayout.addComponent(combo);
      dematLayout.addComponent(refresh);
      dematLayout.setExpandRatio(combo, 1);
      dematLayout.setComponentAlignment(captionLabel, Alignment.MIDDLE_LEFT);
      return dematLayout;
    }

    private Component createScannersSection() {
      Panel panel = new Panel("Scanners");
      ComboBox scannersCombo = new ComboBox();
      scannersCombo.addItem("Scanner 1");
      scannersCombo.setValue("Scanner 1");
      panel.addComponent(scannersCombo);
      return panel;

    }
  }
} 

12382.png


tx

buddy

form in— 2 ----no BUTTON to click and all componets refresh?
how to all componets refresh in vaddin application?
12380.png