Example #1
0
 @UiHandler("clearSessionFiltersButton")
 void handleClearSessionFiltersButtonClick(ClickEvent e) {
   sessionsTo.setValue(null, true);
   sessionsFrom.setValue(null, true);
   sessionIdsTextBox.setText(null);
   stopTypingSessionIdsTimer.schedule(10);
 }
  public EditProblemInterview(JSONObject interview) {

    this.setSpacing(20);

    this.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);

    String companyUniqueID = ConvertJson.convertToString(interview.get("company"));
    if (companyUniqueID == null) {

      companyUniqueID =
          ConvertJson.convertToString(UniqueIDGlobalVariables.companyUniqueID.get("ID"));

      ConvertJson.setStringValue(interview, companyUniqueID, "company");
    }

    String interviewerUniqueID = ConvertJson.convertToString(interview.get("interviewer"));
    if (interviewerUniqueID == null && UniqueIDGlobalVariables.uniqueID != null) {

      interviewerUniqueID = ConvertJson.convertToString(UniqueIDGlobalVariables.uniqueID.get("ID"));

      ConvertJson.setStringValue(interview, interviewerUniqueID, "interviewer");
    }
    this.add(FormField.getStringField("Interviewer", interviewerUniqueID));

    String date = ConvertJson.convertToString(interview.get("datetime"));
    if (date == null) {
      dateTime.setValue(new Date());
    } else {
      dateTime.setValue(new Date(new Long(date)));
    }

    this.add(FormField.getFormField("<font color=red>*</font> Date", dateTime));

    String problem = ConvertJson.convertToString(interview.get("problem"));
    problemField = new ProblemsListbox(problem);
    this.add(FormField.getFormField("<font color=red>*</font> Problem", problemField));

    String customerName = ConvertJson.convertToString(interview.get("customerName"));
    customerNameField.setValue(customerName);
    this.add(FormField.getFormField("<font color=red>*</font> Customer Name", customerNameField));

    String customerUniqueID = ConvertJson.convertToString(interview.get("customerUniqueID"));
    customerUniqueIDField.setValue(customerUniqueID);
    this.add(FormField.getFormField("Customer UniqueID", customerUniqueIDField));

    String videoURLValue = ConvertJson.convertToString(interview.get("videoURL"));
    videoURLField.setValue(videoURLValue);
    this.add(FormField.getFormField("Video URL", videoURLField));
    videoURLField.setWidth("300px");

    String notesValue = ConvertJson.convertToString(interview.get("notes"));
    notes.setHTML(notesValue);
    this.add(FormField.getFormField("Notes", notes));
    notes.setSize("300px", "100px");
  }
  @Override
  public void resetFilterWidgets() {

    castb_patient_identifiantBox.setValue(null);
    castb_patient_nomBox.setValue(null);
    dateExamenBeforeBox.setValue(null);
    dateExamenAfterBox.setValue(null);
    raisonDepistageBox.setSelectedIndex(0);
    resultatBox.setValue(null);

    deletedEntityBox.setValue(false);
  }
Example #4
0
 private void addDatePanel() {
   Grid datePanel = new Grid(2, 2);
   datePanel.setText(0, 0, "Departure Date:");
   DateBox departureBox = new DateBox();
   Date departureDate = new Date();
   departureBox.setValue(departureDate);
   datePanel.setWidget(0, 1, departureBox);
   datePanel.setText(1, 0, "Return Date:");
   DateBox returnBox = new DateBox();
   Date returnDate = DateUtils.datePlusWeek(departureDate);
   returnBox.setValue(returnDate);
   datePanel.setWidget(1, 1, returnBox);
   RootPanel.get("date-panel").add(datePanel);
 }
  public void setCustomer(CustomerModel c) {
    customer = c;

    if (customer != null) {
      // Display the fields
      firstname.setText(customer.getFirstname());
      lastname.setText(customer.getLastname());
      birthdate.setValue(customer.getBirthdate());
    }
  }
Example #6
0
  @Override
  public void clear() {
    rewardsName.setTitle("");
    /* 增加请选择下拉选项 */
    // rewardsType.setSelectedIndex(0);
    rewardsDefinition.setText("");
    standard.setText("");
    startTime.setValue(null);

    peopleSizeLimit.setValue("");
    frequency = null;
    settingText.setText("");
    autoCbx.setValue(false, true);
    specialCbx.setValue(false, true);
    birthRadio.setValue(false, true);

    // nextPublicTime.setValue(null);
    nextRewardsTime.setValue(null);
    // lastRewardsTime.setText("");
    // 清空设定规则为为设定
    // setIsAmountLevel("未设定");
  }
  public TiempoServicioReconocidoEditor(TiempoServicioReconocido periodoAporteReconocidoEdit) {

    this.tiempoServicioReconocido = periodoAporteReconocidoEdit;

    initWidget(GWT.<Binder>create(Binder.class).createAndBindUi(this));

    if (tiempoServicioReconocido == null) {
      tiempoServicioReconocido = new TiempoServicioReconocido();
    } else {
      inicio.setValue(tiempoServicioReconocido.getInicio());
      fin.setValue(tiempoServicioReconocido.getFin());
      empleador = tiempoServicioReconocido.getEmpleador();
      empleadorNombre.setText(tiempoServicioReconocido.getEmpleador().getNombre());
    }

    DateTimeFormat dateFormat = DateTimeFormat.getFormat("dd/MM/yyyy");
    inicio.setFormat(new DateBox.DefaultFormat(dateFormat));
    inicio.getDatePicker().setYearAndMonthDropdownVisible(true);
    inicio.getDatePicker().setVisibleYearCount(99);

    fin.setFormat(new DateBox.DefaultFormat(dateFormat));
    fin.getDatePicker().setYearAndMonthDropdownVisible(true);
    fin.getDatePicker().setVisibleYearCount(99);
  }
Example #8
0
  /**
   * Sets the format used to control formatting and parsing of dates in this {@link DateBox}. If
   * this {@link DateBox} is not empty, the contents of date box will be replaced with current
   * contents in the new format.
   *
   * @param format the new date format
   */
  public void setFormat(Format format) {
    assert format != null : "A Date box may not have a null format";
    if (this.format != format) {
      Date date = getValue();

      // This call lets the formatter do whatever other clean up is
      // required to
      // switch formatters.
      //
      this.format.reset(this, true);

      // Now update the format and show the current date using the new
      // format.
      this.format = format;
      setValue(date);
    }
  }
Example #9
0
  /**
   * Create a new date box.
   *
   * @param date the default date.
   * @param picker the picker to drop down from the date box
   * @param format to use to parse and format dates
   */
  public DateBox(DatePicker picker, Date date, Format format) {
    this.picker = picker;
    this.popup = new PopupPanel(true);
    assert format != null : "You may not construct a date box with a null format";
    this.format = format;

    popup.addAutoHidePartner(box.getElement());
    popup.setWidget(picker);
    popup.setStyleName("dateBoxPopup");

    initWidget(box);
    setStyleName(DEFAULT_STYLENAME);

    handler = new DateBoxHandler();
    picker.addValueChangeHandler(handler);
    box.addFocusHandler(handler);
    box.addBlurHandler(handler);
    box.addClickHandler(handler);
    box.addKeyDownHandler(handler);
    box.setDirectionEstimator(false);
    popup.addCloseHandler(handler);
    setValue(date);
  }
Example #10
0
  public void showRewardsItem(RewardsItemClient rewardsItem, boolean isItemStore) {
    if (rewardsItem.getFrequency() != null) {
      // 显示出下次颁奖时间
      nextRewardsTime
          .getElement()
          .getParentElement()
          .getParentElement()
          .removeClassName(CssStyleConstants.hidden);
      // 把开始时间设成只读
      // startTime.setEnabled(false);

    }
    if (isItemStore == false) { // 维护按钮的状态
      saveStore.setVisible(false);
      backStore.setVisible(false);
      save.setVisible(true);
      back.setVisible(true);
    } else {
      backStore.setVisible(true);
      saveStore.setVisible(true);
      save.setVisible(false);
      back.setVisible(false);
    }
    rewardsName.setText(rewardsItem.getName());
    rewardsDefinition.setText(rewardsItem.getDefinition());
    standard.setText(rewardsItem.getStandard());
    rewardsUnit = rewardsItem.getRewardsUnit();

    showJudgeInfo(rewardsItem); // 显示要修改的提名人
    startTime.setValue(rewardsItem.getStartTime());
    nextRewardsTime.setValue(rewardsItem.getNextTime());
    nextPublicTime.setValue(rewardsItem.getNextPublishTime());
    peopleSizeLimit.setValue(StringUtil.valueOf(rewardsItem.getSizeLimit()));
    rewardsFrom.setValue(StringUtil.valueOf(rewardsItem.getRewardsFrom()));
    tmday.setValue(StringUtil.valueOf(rewardsItem.getTmdays()));
    tmdays.setValue(StringUtil.valueOf(rewardsItem.getTmdays()));
    totalJF.setValue(StringUtil.valueOf(rewardsItem.getTotalJF()));
    expectTime.setValue(rewardsItem.getNextTime());
    nextPublicTime.setValue(rewardsItem.getNextPublishTime());
    showFrequencyInfo(rewardsItem.getFrequency());
    autoCbx.setValue(rewardsItem.isAuto(), true);
    if (rewardsItem.isAuto() == false) // 隐藏提名
    chooseBtns
          .getElement()
          .getParentElement()
          .getParentElement()
          .removeClassName(CssStyleConstants.hidden);
    else
      chooseBtns
          .getElement()
          .getParentElement()
          .getParentElement()
          .addClassName(CssStyleConstants.hidden);
    specialCbx.setValue(rewardsItem.isHasSpecialCondition(), true);
    if (SpecialCondition.birth == rewardsItem.getCondition()) {
      birthRadio.setValue(true);
    } else {
      birthRadio.setValue(false);
    }
    if (rewardsItem.isPeriodEnable() == true) {
      moretimes.setValue(true, true);
    } else {
      onetimes.setValue(true, true);
    }
  }
Example #11
0
 private void updateDateFromTextBox() {
   Date parsedDate = parseDate(true);
   if (fireNullValues || (parsedDate != null)) {
     setValue(picker.getValue(), parsedDate, true, false);
   }
 }
Example #12
0
 public void setValue(Date date, boolean fireEvents) {
   setValue(picker.getValue(), date, fireEvents, true);
 }
Example #13
0
 /** Set the date. */
 public void setValue(Date date) {
   setValue(date, false);
 }
Example #14
0
 @Override
 public void setValue(Date value) {
   dateBox.setValue(value);
 }