Пример #1
0
 private void customerSelected1(ClientItem selectItem) {
   status1.setValue(selectItem.isActive());
   if (selectItem.getType() == 1) {
     itemType1.setValue(messages.service());
   } else if (selectItem.getType() == 3) {
     itemType1.setValue(messages.product());
   }
   price1.setValue(String.valueOf(selectItem.getSalesPrice()));
 }
Пример #2
0
  private void createControls() {
    Label lab1 = new Label(messages.mergeItems());
    lab1.setStyleName("label-title");

    form = new DynamicForm("form");
    form1 = new DynamicForm("form1");
    StyledPanel layout = new StyledPanel("layout");
    StyledPanel layout1 = new StyledPanel("layout1");
    StyledPanel horizontalPanel = new StyledPanel("horizontalPanel");
    itemCombo = createItemCombo();
    itemCombo1 = createItemCombo1();

    status = new CheckboxItem(messages.active(), "status");
    status.setValue(false);

    status1 = new CheckboxItem(messages.active(), "status1");
    status1.setValue(false);

    itemType = new TextItem(messages.itemType(), "itemType");
    itemType.setEnabled(false);

    itemType1 = new TextItem(messages.itemType(), "itemType1");
    itemType1.setEnabled(false);

    price = new TextItem(messages.salesPrice(), "price");
    price.setEnabled(false);

    price1 = new TextItem(messages.salesPrice(), "price1");
    price1.setEnabled(false);

    form.add(itemCombo, itemType, status, price);
    form1.add(itemCombo1, itemType1, status1, price1);
    // form.setItems(getTextItems());
    layout.add(form);
    layout1.add(form1);
    horizontalPanel.add(lab1);
    horizontalPanel.add(layout);
    horizontalPanel.add(layout1);
    this.add(horizontalPanel);
  }