@Override
 public void selectionValueChanged(SelectionValueChangedEvent selectionValueChangedEvent) {
   if (selectionValueChangedEvent.getBean() == getParentData()) {
     for (Object eachRowId : getItemIds()) {
       CheckBox checkBox = getCheckBoxForRow(eachRowId);
       updateCheckBox(checkBox, eachRowId, selectionValueChangedEvent.getNewValue());
       checkBox.setEnabled(
           selectionValueChangedEvent
               .getNewValue()); // we have to check/uncheck the checkbox according to the parent's
                                // selection
     }
   }
 }
  public void setDisplay() {
    comboGroup0.setContainerDataSource(model.getBeanItemContainerFSalesman());
    comboGroup0.setNewItemsAllowed(false);
    comboGroup0.setFilteringMode(FilteringMode.CONTAINS);
    comboGroup0.setNullSelectionAllowed(true);

    comboGroup1.setContainerDataSource(model.getBeanItemContainerFVendor());
    comboGroup1.setNewItemsAllowed(false);
    comboGroup1.setFilteringMode(FilteringMode.CONTAINS);
    comboGroup1.setNullSelectionAllowed(true);

    comboGroup2.setContainerDataSource(model.getBeanItemContainerFCustomer());
    comboGroup2.setNewItemsAllowed(false);
    comboGroup2.setFilteringMode(FilteringMode.CONTAINS);
    comboGroup2.setNullSelectionAllowed(true);

    comboGroup3.setContainerDataSource(model.getBeanItemContainerFArea());
    comboGroup3.setNewItemsAllowed(false);
    comboGroup3.setFilteringMode(FilteringMode.CONTAINS);
    comboGroup3.setNullSelectionAllowed(true);

    comboGroup4.setContainerDataSource(model.getBeanItemContainerFSubArea());
    comboGroup4.setNewItemsAllowed(false);
    comboGroup4.setFilteringMode(FilteringMode.CONTAINS);
    comboGroup4.setNullSelectionAllowed(true);

    comboGroup5.setContainerDataSource(model.getBeanItemContainerFProductGroup());
    comboGroup5.setNewItemsAllowed(false);
    comboGroup5.setFilteringMode(FilteringMode.CONTAINS);
    comboGroup5.setNullSelectionAllowed(true);

    dateField1From.setValue(model.getTransaksiHelper().getCurrentTransDate());
    dateField1To.setValue(model.getTransaksiHelper().getCurrentTransDate());

    checkBoxFaktur.setEnabled(false);
  }
Beispiel #3
0
  // Build the UI components
  private void buildview() {
    logger.info(
        "Company ID : "
            + companyid
            + " | User Name : "
            + username
            + " > "
            + "Painting Email logger UI");
    btnAdd.setVisible(false);
    btnDownload.setVisible(false);
    btnEdit.setVisible(false);
    btnAuditRecords.setVisible(false);
    // Email-id text box
    tfemailid = new TextField("Email Id");
    // product combo box
    cbproduct = new GERPComboBox("Product Name");
    cbproduct.setItemCaptionPropertyId("prodname");
    loadProductList();
    // Email start date
    dfemailStartdate = new GERPPopupDateField("Log Start Dt");
    dfemailStartdate.setInputPrompt("Select Date");
    // Email End date
    dfemailEndDate = new GERPPopupDateField("Log End Dt");
    dfemailEndDate.setInputPrompt("Select Date");
    btndelete = new Button("Delete");
    btndelete.addStyleName("delete");
    btndelete.setEnabled(true);
    btndelete.setVisible(true);
    btndelete.addClickListener(
        new ClickListener() {
          private static final long serialVersionUID = 1L;

          @Override
          public void buttonClick(ClickEvent event) {
            btndelete.setEnabled(true);
            if (cockeckall.getValue().equals(true)) {
              for (EmailLoggerDM obj : emailList) {
                serviceemailLogger.delete(obj.getEmaillogId());
              }

            } else {
              delete();
            }

            loadSrchRslt();
            /*	btndelete.setEnabled(false);
            cockeckall.setValue(false);*/
          }
        });
    cockeckall = new CheckBox("Select All");
    cockeckall.addStyleName("delete");
    cockeckall.setEnabled(true);
    cockeckall.setVisible(true);
    setCheckBoxTable();
    cockeckall.setImmediate(true);
    cockeckall.addValueChangeListener(
        new Property.ValueChangeListener() {
          private static final long serialVersionUID = 1L;

          public void valueChange(ValueChangeEvent event) {
            if (event.getProperty().getValue().equals(true)) {
              loadSrchRslt();
              btndelete.setEnabled(true);
            } else {
              loadSrchRslt();
              btndelete.setEnabled(false);
            }
          }
        });
    hlCmdBtnLayout.addComponent(cockeckall);
    hlCmdBtnLayout.setSpacing(true);
    hlCmdBtnLayout.setComponentAlignment(cockeckall, Alignment.MIDDLE_RIGHT);
    hlCmdBtnLayout.addComponent(btndelete);
    hlCmdBtnLayout.setComponentAlignment(btndelete, Alignment.MIDDLE_RIGHT);
    hlCmdBtnLayout.setExpandRatio(btndelete, 1);
    // build search layout
    hlSearchLayout = new GERPAddEditHLayout();
    assembleSearchLayout();
    hlSrchContainer.addComponent(GERPPanelGenerator.createPanel(hlSearchLayout));
    resetFields();
    loadSrchRslt();
  }