private void assembleSearchLayout() {
   logger.info(
       "Company ID : "
           + companyId
           + " | User Name : "
           + userName
           + " > "
           + "Assembling search layout");
   // Remove all components in User Search Layout
   hlSearchLayout.removeAllComponents();
   cbPayPeried.setRequired(true);
   cbBranch.setRequired(true);
   vlSrchRsltContainer.setVisible(true);
   hlCmdBtnLayout.setVisible(false);
   // Add components for Search Layout
   FormLayout formLayout1 = new FormLayout();
   FormLayout formLayout2 = new FormLayout();
   FormLayout formLayout3 = new FormLayout();
   FormLayout formLayout4 = new FormLayout();
   formLayout1.addComponent(cbPayPeried);
   formLayout1.setSpacing(true);
   formLayout2.addComponent(tfProcessPeriod);
   formLayout2.setSpacing(true);
   formLayout3.addComponent(cbBranch);
   formLayout3.setSpacing(true);
   formLayout4.addComponent(cbEmployeeName);
   formLayout4.setSpacing(true);
   HorizontalLayout hlAttendanceProc1 = new HorizontalLayout();
   hlAttendanceProc1.addComponent(formLayout1);
   hlAttendanceProc1.addComponent(formLayout2);
   hlAttendanceProc1.addComponent(formLayout3);
   hlAttendanceProc1.addComponent(formLayout4);
   hlAttendanceProc1.addComponent(btnSearchStaff);
   hlAttendanceProc1.setComponentAlignment(btnSearchStaff, Alignment.MIDDLE_RIGHT);
   hlAttendanceProc1.setSpacing(true);
   HorizontalLayout hlAttendanceProc2 = new HorizontalLayout();
   hlAttendanceProc2.addComponent(btnAttendanceProc);
   hlAttendanceProc2.setSizeFull();
   hlAttendanceProc2.setComponentAlignment(btnAttendanceProc, Alignment.MIDDLE_RIGHT);
   VerticalLayout vlAttendanceProc1 = new VerticalLayout();
   vlAttendanceProc1.addComponent(hlAttendanceProc1);
   vlAttendanceProc1.addComponent(hlAttendanceProc2);
   hlSearchLayout.addComponent(vlAttendanceProc1);
   hlSearchLayout.setSpacing(true);
   hlSearchLayout.setMargin(true);
   btnSearch.setVisible(false);
 }
 @Override
 protected void addDetails() {
   logger.info(
       "Company ID : "
           + companyid
           + " | User Name : "
           + username
           + " > "
           + "Adding new record...");
   // remove the components in the search layout and input controls in the same container
   hlUserInputLayout.removeAllComponents();
   hlUserIPContainer.addComponent(GERPPanelGenerator.createPanel(hlUserInputLayout));
   assembleInputUserLayout();
   // reset the input controls to default value
   tblMstScrSrchRslt.setVisible(false);
   hlCmdBtnLayout.setVisible(false);
   btnaddSpec.setCaption("Add");
   tblSmsEnqDtl.setVisible(true);
   cbBranch.setRequired(true);
   lsVendorName.setRequired(true);
   tfEnqNo.setReadOnly(true);
   lsProduct.setRequired(true);
   lsProduct.setComponentError(null);
   dfEnqDate.setComponentError(null);
   cbUom.setRequired(true);
   loadPurDtl();
   resetFields();
   tfEnqNo.setReadOnly(true);
   try {
     tfEnqNo.setReadOnly(false);
     SlnoGenDM slnoObj =
         serviceSlnogen.getSequenceNumber(companyid, branchId, moduleId, "SM_ENQRYNO ").get(0);
     if (slnoObj.getAutoGenYN().equals("Y")) {
       tfEnqNo.setValue(slnoObj.getKeyDesc());
       tfEnqNo.setReadOnly(true);
     } else {
       tfEnqNo.setReadOnly(false);
     }
   } catch (Exception e) {
     logger.info(e.getMessage());
   }
   comments =
       new SmsComments(
           vlTableForm,
           null,
           companyid,
           null,
           null,
           null,
           null,
           null,
           null,
           null,
           null,
           null,
           null,
           null);
 }
 /** @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;
 }
 @Override
 protected void cancelDetails() {
   logger.info(
       "Company ID : " + companyid + " | User Name : " + username + " > " + "Canceling action ");
   hlUserIPContainer.removeAllComponents();
   assembleSearchLayout();
   hlCmdBtnLayout.setVisible(true);
   tblSmsEnqDtl.removeAllItems();
   tblMstScrSrchRslt.setVisible(true);
   tfEnqNo.setReadOnly(false);
   cbBranch.setRequired(false);
   lsVendorName.setRequired(false);
   lsVendorName.setComponentError(null);
   enqDtlresetFields();
   resetFields();
   loadSrchRslt();
 }
 @Override
 protected void editDetails() {
   hlUserInputLayout.removeAllComponents();
   hlUserIPContainer.addComponent(GERPPanelGenerator.createPanel(hlUserInputLayout));
   assembleInputUserLayout();
   tblMstScrSrchRslt.setVisible(false);
   hlCmdBtnLayout.setVisible(false);
   tblSmsEnqDtl.setVisible(true);
   if (tfEnqNo.getValue() == null || tfEnqNo.getValue().trim().length() == 0) {
     tfEnqNo.setReadOnly(false);
   }
   cbBranch.setRequired(true);
   lsVendorName.setRequired(true);
   resetFields();
   editPurHdr();
   editSmsPurDetail();
   lsProduct.setRequired(true);
   cbUom.setRequired(true);
 }
 /* (non-Javadoc)
  * @see com.vaadin.ui.FormFieldFactory#createField(com.vaadin.data.Item, java.lang.Object, com.vaadin.ui.Component)
  */
 public Field createField(Item item, Object propertyId, Component uiContext) {
   if ("name".equals(propertyId)) {
     final TextField f = new TextField("Group Name");
     f.setRequired(true);
     f.setWidth("100%");
     return f;
   }
   if ("ifType".equals(propertyId)) {
     final ComboBox f = new ComboBox("ifType Filter");
     f.addItem("ignore");
     f.addItem("all");
     f.setNullSelectionAllowed(false);
     f.setRequired(true);
     f.setImmediate(true);
     f.setNewItemsAllowed(true);
     f.setNewItemHandler(
         new NewItemHandler() {
           public void addNewItem(String newItemCaption) {
             if (!f.containsId(newItemCaption)) {
               f.addItem(newItemCaption);
               f.setValue(newItemCaption);
             }
           }
         });
     return f;
   }
   if ("mibObjCollection".equals(propertyId)) {
     final MibObjField f = new MibObjField(resourceTypes);
     f.setCaption("MIB Objects");
     f.setRequired(true);
     f.setImmediate(true);
     f.setWidth("100%");
     return f;
   }
   return null;
 }
Exemple #7
0
  @AutoGenerated
  private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);
    mainLayout.setWidth("560px");
    mainLayout.setHeight("280px");
    mainLayout.setMargin(true);

    // top-level component properties
    setWidth("560px");
    setHeight("280px");

    // commentField
    commentField = new TextField();
    commentField.setCaption("Comentario");
    commentField.setImmediate(false);
    commentField.setWidth("520px");
    commentField.setHeight("120px");
    commentField.setTabIndex(9);
    mainLayout.addComponent(commentField, "top:140.0px;left:20.0px;");

    // kmField
    kmField = new TextField();
    kmField.setCaption("Km");
    kmField.setImmediate(false);
    kmField.setWidth("80px");
    kmField.setHeight("-1px");
    kmField.setTabIndex(7);
    mainLayout.addComponent(kmField, "top:98.0px;left:260.0px;");

    // punctureField
    punctureField = new TextField();
    punctureField.setCaption("Pinchazos");
    punctureField.setImmediate(false);
    punctureField.setWidth("140px");
    punctureField.setHeight("-1px");
    punctureField.setTabIndex(5);
    mainLayout.addComponent(punctureField, "top:56.0px;left:400.0px;");

    // serialNumberField
    serialNumberField = new TextField();
    serialNumberField.setCaption("Número  de serie");
    serialNumberField.setImmediate(false);
    serialNumberField.setWidth("160px");
    serialNumberField.setHeight("-1px");
    serialNumberField.setTabIndex(1);
    serialNumberField.setRequired(true);
    mainLayout.addComponent(serialNumberField, "top:17.0px;left:20.0px;");

    // vehicleLocationField
    vehicleLocationField = new TextField();
    vehicleLocationField.setCaption("Ubicación vehículo");
    vehicleLocationField.setImmediate(false);
    vehicleLocationField.setWidth("120px");
    vehicleLocationField.setHeight("-1px");
    vehicleLocationField.setTabIndex(4);
    mainLayout.addComponent(vehicleLocationField, "top:56.0px;left:260.0px;");

    // supplierField
    supplierField = new ComboBox();
    supplierField.setCaption("Proveedor");
    supplierField.setImmediate(false);
    supplierField.setWidth("220px");
    supplierField.setHeight("-1px");
    supplierField.setTabIndex(6);
    mainLayout.addComponent(supplierField, "top:100.0px;left:20.0px;");

    // tireTypeField
    tireTypeField = new ComboBox();
    tireTypeField.setCaption("Tipo neumático");
    tireTypeField.setImmediate(false);
    tireTypeField.setWidth("168px");
    tireTypeField.setHeight("-1px");
    tireTypeField.setTabIndex(8);
    tireTypeField.setRequired(true);
    mainLayout.addComponent(tireTypeField, "top:97.0px;left:372.0px;");

    // vehicleField
    vehicleField = new ComboBox();
    vehicleField.setCaption("Vehículo");
    vehicleField.setImmediate(false);
    vehicleField.setWidth("220px");
    vehicleField.setHeight("-1px");
    vehicleField.setTabIndex(3);
    vehicleField.setRequired(true);
    mainLayout.addComponent(vehicleField, "top:56.0px;left:20.0px;");

    // tireStatusField
    tireStatusField = new ComboBox();
    tireStatusField.setCaption("Estado neumático");
    tireStatusField.setImmediate(false);
    tireStatusField.setWidth("168px");
    tireStatusField.setHeight("-1px");
    tireStatusField.setTabIndex(2);
    tireStatusField.setRequired(true);
    mainLayout.addComponent(tireStatusField, "top:17.0px;left:372.0px;");

    return mainLayout;
  }
  /**
   * Instantiates a new include collection window.
   *
   * @param dataCollectionConfigDao the data collection configuration DAO
   * @param container the source list of elements
   * @param wrapper the current selected value
   */
  public IncludeCollectionWindow(
      final DataCollectionConfigDao dataCollectionConfigDao,
      final BeanItemContainer<IncludeCollectionWrapper> container,
      final IncludeCollectionWrapper wrapper) {

    setCaption("Include SystemDef/DataCollectionGroup");
    setModal(true);
    setWidth("400px");
    setHeight("180px");
    setResizable(false);
    setClosable(false);
    addStyleName(Runo.WINDOW_DIALOG);

    form.setImmediate(true);
    form.setWidth("100%");
    form.setWriteThrough(false);
    form.getLayout().setMargin(true);

    final ComboBox valueField = new ComboBox("Value");
    valueField.setEnabled(false);
    valueField.setRequired(true);
    valueField.setImmediate(true);
    valueField.setNewItemsAllowed(false);
    valueField.setNullSelectionAllowed(false);

    final ComboBox typeField = new ComboBox("Type");
    typeField.setRequired(true);
    typeField.setImmediate(true);
    typeField.setNewItemsAllowed(false);
    typeField.setNullSelectionAllowed(false);
    typeField.addItem(IncludeCollectionWrapper.DC_GROUP);
    typeField.addItem(IncludeCollectionWrapper.SYSTEM_DEF);
    typeField.addListener(
        new Property.ValueChangeListener() {
          @Override
          public void valueChange(Property.ValueChangeEvent event) {
            String selected = (String) typeField.getValue();
            if (selected == null) {
              return;
            }
            // Get available fields.
            // FIXME If a new dcGroup is added, DataCollectionConfigDao is not able to reach it.
            List<String> values =
                selected.equals(IncludeCollectionWrapper.SYSTEM_DEF)
                    ? dataCollectionConfigDao.getAvailableSystemDefs()
                    : dataCollectionConfigDao.getAvailableDataCollectionGroups();
            // Remove already selected
            for (IncludeCollectionWrapper obj : container.getItemIds()) {
              if (obj.getType().equals(selected)) {
                values.remove(obj.getValue());
              }
            }
            // Updating combo-box
            valueField.removeAllItems();
            for (String v : values) {
              valueField.addItem(v);
            }
            if (wrapper.getValue() != null) {
              valueField.addItem(wrapper.getValue());
            }
            valueField.setEnabled(valueField.getItemIds().size() > 1);
          }
        });

    form.setFormFieldFactory(
        new FormFieldFactory() {
          @Override
          public Field createField(Item item, Object propertyId, Component uiContext) {
            if (propertyId.equals("type")) return typeField;
            if (propertyId.equals("value")) return valueField;
            return null;
          }
        });

    okButton = new Button("Update");
    okButton.addListener(this);

    cancelButton = new Button("Cancel");
    cancelButton.addListener(this);

    HorizontalLayout toolbar = new HorizontalLayout();
    toolbar.addComponent(okButton);
    toolbar.addComponent(cancelButton);

    addComponent(form);
    addComponent(toolbar);

    ((VerticalLayout) getContent()).setComponentAlignment(toolbar, Alignment.BOTTOM_RIGHT);

    form.setItemDataSource(new BeanItem<IncludeCollectionWrapper>(wrapper));
  }
  @AutoGenerated
  private VerticalLayout buildVerticalLayout_3() {
    // common part: create layout
    verticalLayout_3 = new VerticalLayout();
    verticalLayout_3.setStyleName("h1");
    verticalLayout_3.setCaption("Administracion del Usuario");
    verticalLayout_3.setImmediate(false);
    verticalLayout_3.setWidth("-1px");
    verticalLayout_3.setHeight("-1px");
    verticalLayout_3.setMargin(true);
    verticalLayout_3.setSpacing(true);

    // txtUsuario
    txtUsuario = new TextField();
    txtUsuario.setCaption("Usuario:");
    txtUsuario.setImmediate(false);
    txtUsuario.setWidth("-1px");
    txtUsuario.setHeight("-1px");
    txtUsuario.setRequired(true);
    txtUsuario.setInputPrompt("Usuario de logueo ");
    verticalLayout_3.addComponent(txtUsuario);

    // horizontalLayout_1
    horizontalLayout_1 = buildHorizontalLayout_1();
    verticalLayout_3.addComponent(horizontalLayout_1);

    // txtNombres
    txtNombres = new TextField();
    txtNombres.setCaption("Nombre:");
    txtNombres.setImmediate(false);
    txtNombres.setWidth("164px");
    txtNombres.setHeight("-1px");
    txtNombres.setRequired(true);
    txtNombres.setInputPrompt("Nombre de inicio de sesión");
    verticalLayout_3.addComponent(txtNombres);

    // txtApellidoPaterno
    txtApellidoPaterno = new TextField();
    txtApellidoPaterno.setCaption("Paterno");
    txtApellidoPaterno.setImmediate(false);
    txtApellidoPaterno.setWidth("250px");
    txtApellidoPaterno.setHeight("-1px");
    txtApellidoPaterno.setRequired(true);
    txtApellidoPaterno.setInputPrompt("Apellido Paterno");
    verticalLayout_3.addComponent(txtApellidoPaterno);

    // txtApellidoMaterno
    txtApellidoMaterno = new TextField();
    txtApellidoMaterno.setCaption("Materno");
    txtApellidoMaterno.setImmediate(false);
    txtApellidoMaterno.setWidth("250px");
    txtApellidoMaterno.setHeight("-1px");
    txtApellidoMaterno.setRequired(true);
    txtApellidoMaterno.setInputPrompt("Apellido Materno");
    verticalLayout_3.addComponent(txtApellidoMaterno);

    // cmbOficina
    cmbOficina = new ComboBox();
    cmbOficina.setCaption("Oficina");
    cmbOficina.setImmediate(false);
    cmbOficina.setWidth("204px");
    cmbOficina.setHeight("-1px");
    cmbOficina.setRequired(true);
    verticalLayout_3.addComponent(cmbOficina);

    // cmbRol
    cmbRol = new ComboBox();
    cmbRol.setCaption("Rol");
    cmbRol.setImmediate(false);
    cmbRol.setWidth("194px");
    cmbRol.setHeight("-1px");
    cmbRol.setRequired(true);
    verticalLayout_3.addComponent(cmbRol);

    // txtCargo
    txtCargo = new TextField();
    txtCargo.setCaption("Cargo");
    txtCargo.setImmediate(false);
    txtCargo.setWidth("250px");
    txtCargo.setHeight("-1px");
    txtCargo.setRequired(true);
    txtCargo.setInputPrompt("Cargo que desempeña");
    verticalLayout_3.addComponent(txtCargo);

    // txtCargoDescripcion
    txtCargoDescripcion = new TextField();
    txtCargoDescripcion.setCaption("Descripcion del Cargo");
    txtCargoDescripcion.setImmediate(false);
    txtCargoDescripcion.setWidth("250px");
    txtCargoDescripcion.setHeight("-1px");
    txtCargoDescripcion.setRequired(true);
    txtCargoDescripcion.setInputPrompt("Breve descripcion del Cargo que desempeña");
    verticalLayout_3.addComponent(txtCargoDescripcion);

    // horizontalLayout_2
    horizontalLayout_2 = buildHorizontalLayout_2();
    verticalLayout_3.addComponent(horizontalLayout_2);
    verticalLayout_3.setComponentAlignment(horizontalLayout_2, new Alignment(48));

    return verticalLayout_3;
  }
Exemple #10
0
  @AutoGenerated
  private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);
    mainLayout.setWidth("650px");
    mainLayout.setHeight("220px");
    mainLayout.setMargin(true);

    // top-level component properties
    setWidth("650px");
    setHeight("220px");

    // jobGroupField
    jobGroupField = new TextField();
    jobGroupField.setCaption("Grupo");
    jobGroupField.setImmediate(false);
    jobGroupField.setWidth("140px");
    jobGroupField.setHeight("-1px");
    jobGroupField.setRequired(true);
    mainLayout.addComponent(jobGroupField, "top:20.0px;left:180.0px;");

    // jobIntervalField
    jobIntervalField = new TextField();
    jobIntervalField.setCaption("Intervalo");
    jobIntervalField.setImmediate(false);
    jobIntervalField.setWidth("60px");
    jobIntervalField.setHeight("-1px");
    mainLayout.addComponent(jobIntervalField, "top:180.0px;left:20.0px;");

    // jobNameField
    jobNameField = new TextField();
    jobNameField.setCaption("Nombre");
    jobNameField.setImmediate(false);
    jobNameField.setWidth("140px");
    jobNameField.setHeight("-1px");
    jobNameField.setRequired(true);
    mainLayout.addComponent(jobNameField, "top:20.0px;left:20.0px;");

    // jobTriggerPriorityField
    jobTriggerPriorityField = new TextField();
    jobTriggerPriorityField.setCaption("Job Trigger Priority");
    jobTriggerPriorityField.setImmediate(false);
    jobTriggerPriorityField.setWidth("160px");
    jobTriggerPriorityField.setHeight("-1px");
    mainLayout.addComponent(jobTriggerPriorityField, "top:140.0px;left:200.0px;");

    // jobTriggerTypeField
    jobTriggerTypeField = new ComboBox();
    jobTriggerTypeField.setCaption("Tipo Disparador");
    jobTriggerTypeField.setImmediate(true);
    jobTriggerTypeField.setWidth("160px");
    jobTriggerTypeField.setHeight("-1px");
    jobTriggerTypeField.setRequired(true);
    mainLayout.addComponent(jobTriggerTypeField, "top:140.0px;left:20.0px;");

    // cronExpressionField
    cronExpressionField = new TextField();
    cronExpressionField.setCaption("Expresión Cron ");
    cronExpressionField.setImmediate(false);
    cronExpressionField.setWidth("340px");
    cronExpressionField.setHeight("-1px");
    mainLayout.addComponent(cronExpressionField, "top:180.0px;left:20.0px;");

    // descriptionField
    descriptionField = new TextField();
    descriptionField.setCaption("Descripción");
    descriptionField.setImmediate(false);
    descriptionField.setWidth("620px");
    descriptionField.setHeight("-1px");
    mainLayout.addComponent(descriptionField, "top:100.0px;left:20.0px;");

    // endTimeField
    endTimeField = new DateField();
    endTimeField.setCaption("Fecha Finalización");
    endTimeField.setImmediate(false);
    endTimeField.setWidth("-1px");
    endTimeField.setHeight("-1px");
    endTimeField.setInvalidAllowed(false);
    mainLayout.addComponent(endTimeField, "top:60.0px;left:225.0px;");

    // futureField
    futureField = new CheckBox();
    futureField.setCaption("Futuro");
    futureField.setImmediate(false);
    futureField.setWidth("-1px");
    futureField.setHeight("-1px");
    mainLayout.addComponent(futureField, "top:140.0px;left:585.0px;");

    // future_timeField
    future_timeField = new TextField();
    future_timeField.setCaption("Future_time");
    future_timeField.setImmediate(false);
    future_timeField.setWidth("160px");
    future_timeField.setHeight("-1px");
    mainLayout.addComponent(future_timeField, "top:140.0px;left:400.0px;");

    // repeatCountField
    repeatCountField = new TextField();
    repeatCountField.setCaption("Repeticiones");
    repeatCountField.setImmediate(false);
    repeatCountField.setWidth("60px");
    repeatCountField.setHeight("24px");
    mainLayout.addComponent(repeatCountField, "top:180.0px;right:290.0px;");

    // startTimeField
    startTimeField = new DateField();
    startTimeField.setCaption("Fecha Comienzo");
    startTimeField.setImmediate(false);
    startTimeField.setWidth("-1px");
    startTimeField.setHeight("-1px");
    startTimeField.setInvalidAllowed(false);
    mainLayout.addComponent(startTimeField, "top:60.0px;left:20.0px;");

    // areaField
    areaField = new ComboBox();
    areaField.setCaption("Area Trabajo");
    areaField.setImmediate(false);
    areaField.setWidth("-1px");
    areaField.setHeight("-1px");
    areaField.setRequired(true);
    mainLayout.addComponent(areaField, "top:60.0px;left:420.0px;");

    // jobCalendarField
    jobCalendarField = new JobTriggerCalendarField();
    jobCalendarField.setImmediate(false);
    jobCalendarField.setWidth("-1px");
    jobCalendarField.setHeight("-1px");
    mainLayout.addComponent(jobCalendarField, "top:167.0px;left:397.0px;");

    // jobIntervalTypeField
    jobIntervalTypeField = new ComboBox();
    jobIntervalTypeField.setCaption("Tipo Intervalo");
    jobIntervalTypeField.setImmediate(false);
    jobIntervalTypeField.setWidth("175px");
    jobIntervalTypeField.setHeight("-1px");
    mainLayout.addComponent(jobIntervalTypeField, "top:180.0px;left:100.0px;");

    return mainLayout;
  }
  public void initComponent() {

    tableList =
        new Table() {
          @Override
          protected String formatPropertyValue(Object rowId, Object colId, Property property) {
            // Format by property type
            if (property.getType() == Date.class && property.getValue() != null) {
              SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy");
              return df.format((Date) property.getValue());
            }

            //		        if (property.getType()==Boolean.class){
            //		        	if ((Boolean) property.getValue()==true) {
            //		        		return "Active";
            //		        	} else {
            //		        		return "-";
            //		        	}
            //		        }

            return super.formatPropertyValue(rowId, colId, property);
          }
        };
    tableDetil =
        new Table() {
          @Override
          protected String formatPropertyValue(Object rowId, Object colId, Property property) {
            // Format by property type
            if (property.getType() == Date.class && property.getValue() != null) {
              SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy");
              return df.format((Date) property.getValue());
            }

            //		        if (property.getType()==Boolean.class){
            //		        	if ((Boolean) property.getValue()==true) {
            //		        		return "Active";
            //		        	} else {
            //		        		return "-";
            //		        	}
            //		        }

            return super.formatPropertyValue(rowId, colId, property);
          }
        };

    // ::LIST
    fieldSearch1.setWidth("100px");
    fieldSearch2.setWidth("100px");
    fieldSearch2.setWidth("100px");
    comboSearch1.setWidth("200px");
    comboSearch2.setWidth("200px");

    // ::DETIL
    fieldNomor.setNullRepresentation("");
    fieldInvoiceno.setNullRepresentation("");

    fieldNomor.setWidth("100px");
    fieldInvoiceno.setWidth("100px");
    comboTipeopname.setWidth("200px");
    comboTipeopname.setFilteringMode(FilteringMode.CONTAINS);
    comboWarehouse.setWidth("200px");
    comboWarehouse.setFilteringMode(FilteringMode.CONTAINS);

    dateFieldTrdate.setDateFormat("dd/MM/yyyy");
    dateFieldEntrydate.setDateFormat("dd/MM/yyyy");
    dateFieldTrdate.setWidth("100px");
    dateFieldEntrydate.setWidth("100px");

    btnSearch.setIcon(new ThemeResource("../images/navigation/12x12/Find.png"));
    btnNewForm.setIcon(new ThemeResource("../images/navigation/12x12/Create.png"));
    btnEditForm.setIcon(new ThemeResource("../images/navigation/12x12/Pencil.png"));
    btnDeleteForm.setIcon(new ThemeResource("../images/navigation/12x12/Erase.png"));
    //		btnPrint.setIcon(new ThemeResource("../images/navigation/12x12/Print.png"));

    btnSaveForm.setIcon(new ThemeResource("../images/navigation/12x12/Save.png"));
    btnCancelForm.setIcon(new ThemeResource("../images/navigation/12x12/Undo.png"));

    btnAddItem.setIcon(new ThemeResource("../images/navigation/12x12/Create.png"));
    btnEditForm.setIcon(new ThemeResource("../images/navigation/12x12/Pencil.png"));
    btnRemoveItem.setIcon(new ThemeResource("../images/navigation/12x12/Erase.png"));

    btnPosting.setIcon(new ThemeResource("../images/navigation/12x12/OK.png"));
    //		btnPostingBatal.setIcon(new ThemeResource("../images/navigation/12x12/OK.png"));
    btnLapselisih.setIcon(new ThemeResource("../images/navigation/12x12/Print.png"));

    tableList.setSelectable(true);
    tableList.setImmediate(true);
    tableList.setBuffered(false);
    tableList.setFooterVisible(true);

    tableDetil.setSelectable(true);
    tableDetil.setImmediate(true);
    tableDetil.setBuffered(false);
    tableDetil.setFooterVisible(true);

    // VALIDATOR
    fieldNomor.setRequired(true);
    comboTipeopname.setRequired(true);
    comboWarehouse.setRequired(true);
    dateFieldTrdate.setRequired(true);
    //		fieldDescription.setRequired(true);

    btnSeparator1.setEnabled(false);
    btnSeparator2.setEnabled(false);

    // FIELD FOOTER
    fieldDisc1 = new TextField();
    fieldDisc1rp = new TextField();
    fieldDisc1rpafterppn = new TextField();
    fieldDisc1.setWidth("50px");
    fieldDisc1rp.setWidth("50px");
    fieldDisc1rpafterppn.setWidth("150px");
    fieldDisc1rpafterppn.addStyleName("numerical");

    fieldDisc2 = new TextField();
    fieldDisc2rp = new TextField();
    fieldDisc2rpafterppn = new TextField();
    fieldDisc2.setWidth("50px");
    fieldDisc2rp.setWidth("50px");
    fieldDisc2rpafterppn.setWidth("150px");
    fieldDisc2rpafterppn.addStyleName("numerical");

    fieldDisc = new TextField();
    fieldDiscrp = new TextField();
    fieldDiscrpafterppn = new TextField();
    fieldDisc.setWidth("50px");
    fieldDiscrp.setWidth("50px");
    fieldDiscrpafterppn.setWidth("150px");
    fieldDiscrpafterppn.addStyleName("numerical");

    fieldAmount.setWidth("200px");
    fieldAmount.addStyleName("numerical");
    fieldAmountafterdisc.setWidth("200px");
    fieldAmountafterdisc.addStyleName("numerical");
    fieldAmountafterdiscafterppn.setWidth("200px");
    fieldAmountafterdiscafterppn.addStyleName("numerical");
    fieldAmountafterppn.setWidth("200px");
    fieldAmountafterppn.addStyleName("numerical");
    fieldAmountpay.setWidth("200px");
    fieldAmountpay.addStyleName("numerical");
    fieldAmountpayfaterppn.setWidth("200px");
    fieldAmountpayfaterppn.addStyleName("numerical");
    fieldPpnrp.setWidth("200px");
    fieldPpnrp.addStyleName("numerical");

    fieldPpnpercent.setWidth("50px");
  }
  @AutoGenerated
  private AbsoluteLayout buildGeneralLayout() {
    // common part: create layout
    generalLayout = new AbsoluteLayout();
    generalLayout.setImmediate(false);
    generalLayout.setWidth("100.0%");
    generalLayout.setHeight("100.0%");
    generalLayout.setMargin(false);

    // photoField
    photoField = new ImageField();
    photoField.setImmediate(false);
    photoField.setWidth("420px");
    photoField.setHeight("140px");
    generalLayout.addComponent(photoField, "top:20.0px;left:10.0px;");

    // vatField
    vatField = new TextField();
    vatField.setCaption("CIF/NIF");
    vatField.setImmediate(false);
    vatField.setWidth("120px");
    vatField.setHeight("-1px");
    generalLayout.addComponent(vatField, "top:16.0px;left:435.0px;");

    // clientTypeField
    clientTypeField = new ComboBox();
    clientTypeField.setCaption("Tipo");
    clientTypeField.setImmediate(false);
    clientTypeField.setDescription("Tipo Cliente");
    clientTypeField.setWidth("-1px");
    clientTypeField.setHeight("-1px");
    clientTypeField.setRequired(true);
    generalLayout.addComponent(clientTypeField, "top:54.0px;left:435.0px;");

    // clientGroupField
    clientGroupField = new ComboBox();
    clientGroupField.setCaption("Grupo");
    clientGroupField.setImmediate(false);
    clientGroupField.setWidth("-1px");
    clientGroupField.setHeight("-1px");
    clientGroupField.setRequired(true);
    generalLayout.addComponent(clientGroupField, "top:92.0px;left:435.0px;");

    // phoneField
    phoneField = new TextField();
    phoneField.setCaption("Teléfono 01");
    phoneField.setImmediate(false);
    phoneField.setWidth("115px");
    phoneField.setHeight("-1px");
    generalLayout.addComponent(phoneField, "top:16.0px;left:653.0px;");

    // faxField
    faxField = new TextField();
    faxField.setCaption("Fax");
    faxField.setImmediate(false);
    faxField.setWidth("115px");
    faxField.setHeight("-1px");
    generalLayout.addComponent(faxField, "top:54.0px;left:779.0px;");

    // facebookIdField
    facebookIdField = new TextField();
    facebookIdField.setCaption("Facebook Id");
    facebookIdField.setImmediate(false);
    facebookIdField.setWidth("242px");
    facebookIdField.setHeight("24px");
    generalLayout.addComponent(facebookIdField, "top:90.0px;left:653.0px;");

    // mobileField
    mobileField = new TextField();
    mobileField.setCaption("Teléfono 02");
    mobileField.setImmediate(false);
    mobileField.setWidth("115px");
    mobileField.setHeight("-1px");
    generalLayout.addComponent(mobileField, "top:16.0px;left:780.0px;");

    // descriptionField
    descriptionField = new TextField();
    descriptionField.setCaption("Descripción");
    descriptionField.setImmediate(false);
    descriptionField.setWidth("460px");
    descriptionField.setHeight("-1px");
    generalLayout.addComponent(descriptionField, "top:132.0px;left:435.0px;");

    // commentField
    commentField = new TextArea();
    commentField.setCaption("Comentarios");
    commentField.setImmediate(false);
    commentField.setWidth("885px");
    commentField.setHeight("70px");
    generalLayout.addComponent(commentField, "top:206.0px;left:11.0px;");

    // emailField
    emailField = new TextField();
    emailField.setCaption("Email");
    emailField.setImmediate(false);
    emailField.setWidth("460px");
    emailField.setHeight("-1px");
    generalLayout.addComponent(emailField, "top:172.0px;left:435.0px;");

    return generalLayout;
  }