// MEngeset data dari FormData ke form
  private void setData(FormDeletion data) {
    // untuk kebutuhan edit

    inputDeletionDate.setValue(data.getDeletionDate());
    information.setValue(data.getInformation());
    inputGoodsQuantity.setValue(data.getQuantity());
    inputGoodsSelect.setValue(data.getIdGoods());
    this.deletionId = data.getDeletionId();
    inputGoodsPrice.setValue(data.getPrice());
  }
 private DateField getDateField(TimeZone timezone, SimpleDateFormat dateformat) {
   final DateField dateField = new DateField();
   try {
     Date initialDate = dateformat.parse(initialDateString);
     dateField.setResolution(Resolution.DAY);
     dateField.setTimeZone(timezone);
     dateField.setValue(initialDate);
   } catch (ParseException e) {
     e.printStackTrace();
   }
   return dateField;
 }
  @Override
  public void setFormData(DeletedGoods deletion) {
    this.deletionId = deletion.getIdDeletedGoods();
    buttonSubmit.setCaption("Simpan Perubahan");

    inputDeletionDate.setValue(deletion.getDeletionDate());
    information.setValue(deletion.getInformation());
    inputGoodsQuantity.setValue(deletion.getQuantity() + "");
    inputGoodsSelect.setValue(deletion.getGoods().getIdGoods());
    inputGoodsPrice.setValue(deletion.getPrice() + "");
    System.out.println("deletionDate " + deletion.getDeletionDate());
    System.out.println("inputGoodsQuantity " + deletion.getQuantity());
    System.out.println("deletionDate " + deletion.getPrice());
  }
  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);
  }
예제 #5
0
  @Override
  protected void setup() {

    Locale locale = new Locale("fi", "FI");
    Calendar cal = Calendar.getInstance();
    cal.set(2010, 0, 1);

    DateField df = new DateField();
    df.setResolution(Resolution.DAY);
    df.setLocale(locale);
    df.setWidth("300px");

    String pattern = "d. MMMM'ta 'yyyy 'klo 'H.mm.ss";
    df.setDateFormat(pattern);

    df.setValue(cal.getTime());

    addComponent(df);
  }
 public void setDateValue(Date fromDate, Date toDate) {
   dfFrom.setValue(fromDate);
   dfTo.setValue(toDate);
 }
예제 #7
0
 private void setDate(DateField date) {
   date.setValue(getDefaultDate());
 }
  @Override
  public void init() {
    buttonCancel = new Button("Batalkan");
    buttonCancel.addClickListener(this);

    buttonShow = new Button("Tampilkan Laporan");
    buttonShow.addClickListener(this);

    buttonPrint = new Button("Cetak");
    buttonPrint.addClickListener(this);
    buttonPrint.setIcon(new ThemeResource("icons/image/icon-print.png"));

    opener = new BrowserWindowOpener(ReportPrint.class);
    opener.setFeatures("height=200,width=400,resizable");
    // A button to open the printer-friendly page.
    opener.extend(buttonPrint);

    DateTime now = DateTime.now();
    Date beginYear =
        now.withDayOfYear(now.dayOfYear().getMinimumValue())
            .withHourOfDay(now.hourOfDay().getMinimumValue())
            .toDate();
    Date endYear =
        now.withDayOfYear(now.dayOfYear().getMaximumValue())
            .withHourOfDay(now.hourOfDay().getMaximumValue())
            .toDate();

    selectStartDate = new DateField("Dari Tanggal");
    selectStartDate.setImmediate(true);
    selectStartDate.setWidth(function.FORM_WIDTH);
    selectStartDate.setValue(beginYear);

    selectEndDate = new DateField("Hingga Tanggal");
    selectEndDate.setImmediate(true);
    selectEndDate.setWidth(function.FORM_WIDTH);
    selectEndDate.setValue(endYear);
    selectAcceptance = new OptionGroup("Persetujuan");
    Item itemType1 = selectAcceptance.addItem("diterima");
    Item itemType2 = selectAcceptance.addItem("belumditerima");
    selectAcceptance.setImmediate(true);
    selectAcceptance.setValue("diterima");

    selectAcceptance.setItemCaption("diterima", "Barang Kadaluarsa Disetujui");

    selectAcceptance.setItemCaption("belumditerima", "Barang Kadaluarsa Belum Disetujui");
    selectContent = new ComboBox("Pilih Tampilan");
    selectContent.setImmediate(true);
    selectContent.addItem(ReportContent.CHART);
    selectContent.addItem(ReportContent.TABLE);
    selectContent.addItem(ReportContent.TABLE_CHART);
    selectContent.setItemCaption(ReportContent.CHART, "Tampilkan Chart");
    selectContent.setItemCaption(ReportContent.TABLE, "Tampilkan Tabel");
    selectContent.setItemCaption(ReportContent.TABLE_CHART, "Tampilkan Tabel dan Chart");
    selectContent.setItemCaption(4, "Minggu Ke-4");
    selectContent.setValue(ReportContent.TABLE);

    selectAcceptance.addValueChangeListener(this);
    selectStartDate.addValueChangeListener(this);
    selectEndDate.addValueChangeListener(this);
    selectContent.addValueChangeListener(this);
    updateWindowOpener();

    construct();
  }