Ejemplo n.º 1
0
 /** @return */
 private Field<?> getComboBox(String requiredErrorMsg, Collection<?> items) {
   ComboBox comboBox = new ComboBox();
   comboBox.setNullSelectionAllowed(true);
   IndexedContainer container = new IndexedContainer(items);
   comboBox.setContainerDataSource(container);
   comboBox.setRequired(true);
   comboBox.setRequiredError(requiredErrorMsg);
   return comboBox;
 }
Ejemplo n.º 2
0
  private void initComponents() {
    nameField.setNullRepresentation("");
    descriptionField.setNullRepresentation("");
    commentField.setNullRepresentation("");
    codeField.setNullRepresentation("");
    vatField.setNullRepresentation("");
    phoneField.setNullRepresentation("");
    faxField.setNullRepresentation("");
    mobileField.setNullRepresentation("");
    facebookIdField.setNullRepresentation("");
    emailField.setNullRepresentation("");

    userOrganizationCollectionField.setCaption("Organizaciones");

    codeField.setRequiredError(codeField.getCaption() + " es un campo requerido");
    clientGroupField.setRequiredError(clientGroupField.getCaption() + " es un campo requerido");
    clientTypeField.setRequiredError(clientTypeField.getCaption() + " es un campo requerido");

    codeField.focus();
  }