Example usage for com.vaadin.server ThemeResource ThemeResource

List of usage examples for com.vaadin.server ThemeResource ThemeResource

Introduction

In this page you can find the example usage for com.vaadin.server ThemeResource ThemeResource.

Prototype

public ThemeResource(String resourceId) 

Source Link

Document

Creates a resource.

Usage

From source file:com.gnts.pem.txn.sbi.SBIFlat.java

@SuppressWarnings("deprecation")
void populateAndConfig(boolean search) {
    try {// ww  w  . ja  v  a2  s.  co  m
        tblEvalDetails.removeAllItems();
        tblEvalDetails.setImmediate(true);
        List<TPemCmEvalDetails> evalList = null;
        evalList = new ArrayList<TPemCmEvalDetails>();
        if (search) {
            String evalno = tfSearchEvalNumber.getValue();
            String customer = tfSearchCustomer.getValue();
            String bankbranch = (String) slSearchBankbranch.getValue();
            evalList = beanEvaluation.getSearchEvalDetailnList(null, evalno, null, customer, bankbranch,
                    selectedBankid, selectCompanyid, null);
        } else {

            evalList = beanEvaluation.getSearchEvalDetailnList(selectedFormName, null, null, null, null,
                    selectedBankid, selectCompanyid, null);
            total = evalList.size();
        }
        if (total == 0) {
            lblNotificationIcon.setIcon(new ThemeResource("img/msg_info.png"));
            lblSaveNotification.setValue("No Records found");
        } else {
            lblNotificationIcon.setIcon(null);
            lblSaveNotification.setValue("");
        }
        lblNoofRecords.setValue(
                "<font size=\"2\" color=\"black\">No.of Records:</font> <font size=\"2\" color=\"#1E90FF\"> "
                        + total + "</font>");

        beans = new BeanItemContainer<TPemCmEvalDetails>(TPemCmEvalDetails.class);
        beans.addAll(evalList);
        btnEdit.setEnabled(false);
        tblEvalDetails.setContainerDataSource(beans);
        tblEvalDetails.setSelectable(true);
        tblEvalDetails.setColumnFooter("lastUpdateDt", "No. of Records:" + total);
        tblEvalDetails.setVisibleColumns(new Object[] { "evalNo", "docDate", "bankBranch", "custName",
                "docStatus", "lastUpdtedBy", "lastUpdateDt" });
        tblEvalDetails.setColumnHeaders(new String[] { "Evaluation Number", "Evaluation Date", "Bank Branch",
                "Customer Name", "Status", "Last Updated By", "Last Updated Date" });
        tblEvalDetails.addValueChangeListener(new Property.ValueChangeListener() {
            /**
            * 
            */
            private static final long serialVersionUID = 3729824796823933688L;

            @Override
            public void valueChange(ValueChangeEvent event) {
                StreamResource sr = getPDFStream();

                if (sr != null) {

                    if (filedownloader == null) {
                        filedownloader = new FileDownloader(getPDFStream());
                        filedownloader.extend(btnView);

                    } else {
                        filedownloader.setFileDownloadResource(sr);
                    }
                } else {
                    lblNotificationIcon.setIcon(new ThemeResource("img/msg_info.png"));
                    lblSaveNotification.setValue("No document is there");
                    //   notif.show(Page.getCurrent());
                    if (filedownloader != null) {
                        filedownloader.setFileDownloadResource(null); // reset
                    }

                }

                TPemCmEvalDetails syncList = (TPemCmEvalDetails) event.getProperty().getValue();
                if (syncList != null) {

                    if (syncList.getDocStatus().equals("Draft") || syncList.getDocStatus().equals("Rejected")) {
                        btnEdit.setEnabled(true);
                        btnView.setEnabled(false);
                    } else {
                        btnEdit.setEnabled(false);
                        btnView.setEnabled(true);

                    }

                    btnAdd.setEnabled(false);
                } else {
                    btnEdit.setEnabled(false);
                    btnAdd.setEnabled(true);
                }
            }

        });
        tblEvalDetails.setImmediate(true);
        tblEvalDetails.addItemClickListener(new ItemClickListener() {

            @Override
            public void itemClick(ItemClickEvent event) {
                // TODO Auto-generated method stub
                if (tblEvalDetails.isSelected(event.getItemId())) {

                    btnView.setEnabled(false);
                } else {

                    btnView.setEnabled(true);
                }
            }
        });
    } catch (Exception e) {
        e.printStackTrace();
        logger.info("Error-->" + e);
    }
    getExportTableDetails();
}

From source file:com.gnts.pem.txn.sbi.SBIFlat.java

private void updateEvaluationDetails() {

    try {/*w  w  w.j av a 2 s .  c om*/
        boolean valid = false;
        TPemCmEvalDetails evalobj = new TPemCmEvalDetails();
        evalNumber = tfEvaluationNumber.getValue();
        customer = tfCustomerName.getValue();
        propertyType = "FLAT";
        String basepath = VaadinService.getCurrent().getBaseDirectory().getAbsolutePath();
        File file = new File(
                basepath + "/WEB-INF/PEM-DOCS/" + evalNumber + "_" + customer + "_" + propertyType + ".doc");
        FileInputStream fin = new FileInputStream(file);
        byte fileContent[] = new byte[(int) file.length()];
        fin.read(fileContent);
        fin.close();
        evalobj.setDocId(headerid);
        evalobj.setEvalDoc(fileContent);
        evalobj.setDocStatus(Common.DOC_PENDING);
        evalobj.setEvalNo(tfEvaluationNumber.getValue());
        evalobj.setValuationBy(tfValuatedBy.getValue());
        MPemCmBank bankid = new MPemCmBank();
        bankid.setBankId(selectedBankid);
        evalobj.setBankId(bankid);
        evalobj.setDoctype(screenName);
        evalobj.setCompanyId(selectCompanyid);
        evalobj.setBankBranch((String) slBankBranch.getValue());
        evalobj.setEvalPurpose(tfEvaluationPurpose.getValue());
        evalobj.setEvalDate(dfDateofValuation.getValue());
        evalobj.setCheckedBy(tfVerifiedBy.getValue());
        evalobj.setCheckedDt(dfVerifiedDate.getValue());
        evalobj.setInspectionDt(dfDateofValuation.getValue());
        evalobj.setInspectionBy(tfValuatedBy.getValue());
        evalobj.setLastUpdateDt(new Date());
        evalobj.setLastUpdtedBy(loginusername);
        evalobj.setCustName(tfCustomerName.getValue());

        if (tfDynamicEvaluation1.getValue() != null && tfDynamicEvaluation1.getValue().trim().length() > 0) {
            evalobj.setCustomLbl1(tfDynamicEvaluation1.getCaption());
            evalobj.setCustomValue1(tfDynamicEvaluation1.getValue());
        }
        if (tfDynamicEvaluation2.getValue() != null && tfDynamicEvaluation2.getValue().trim().length() > 0) {
            evalobj.setCustomValue2(tfDynamicEvaluation2.getCaption());
            evalobj.setCustomValue2(tfDynamicEvaluation2.getValue());
        }
        String numberOnly = tfCostOfConstAsAtSite.getValue().replaceAll("[^\\d.]", "");
        uiflowdata.setAmountInWords(beanEvaluation.getAmountInWords(numberOnly));
        if (numberOnly.trim().length() == 0) {
            numberOnly = "0";
        }
        evalobj.setPropertyValue(Double.valueOf(numberOnly));
        //beanEvaluation.saveorUpdateEvalDetails(evalobj);
        uiflowdata.setEvalDtls(evalobj);
        if (tfEvaluationNumber.isValid() && slBankBranch.isValid() && tfEvaluationPurpose.isValid()
                && dfDateofValuation.isValid()) {

            if (count == 0) {
                beanEvaluation.saveorUpdateEvalDetails(evalobj);

                valid = true;
            }
            lblNotificationIcon.setIcon(new ThemeResource("img/success_small.png"));
            lblSaveNotification.setValue("Successfully Submitted");
        }

        if (valid) {
            /*populateAndConfig(false);
            resetAllFieldsFields();*/
            btnSubmit.setEnabled(false);
        } else {
            btnSubmit.setComponentError(new UserError("Form is invalid"));
        }
    } catch (Exception e) {
        lblNotificationIcon.setIcon(new ThemeResource("img/failure.png"));
        lblSaveNotification.setValue("Submit failed, please check the data and try again ");
        logger.info("Error on SaveApproveReject Status function--->" + e);
    }
}

From source file:com.gnts.pem.txn.sbi.SBIFlat.java

void setComponentError() {
    tfEvaluationNumber.setComponentError(null);
    dfDateofValuation.setComponentError(null);
    tfEvaluationPurpose.setComponentError(null);
    slBankBranch.setComponentError(null);
    tfCustomerName.setComponentError(null);

    String Error = "Enter";
    if (tfEvaluationNumber.getValue() == null || tfEvaluationNumber.getValue().trim().length() == 0) {
        tfEvaluationNumber.setComponentError(new UserError("Enter Evaluation Number"));
        Error = Error + " " + "Evaluation number";
    }/* w  w  w.j  av  a  2 s.c  o m*/
    if (dfDateofValuation.getValue() == null) {
        dfDateofValuation.setComponentError(new UserError("Select Evaluation Date"));
        Error = Error + " " + "Evaluation Date";
    }
    if (tfEvaluationPurpose.getValue() == null || tfEvaluationPurpose.getValue().trim().length() == 0) {
        tfEvaluationPurpose.setComponentError(new UserError("Select Evaluation Date"));
        Error = Error + " " + "Evaluation Purpose";
    }
    if (slBankBranch.getValue() == null) {
        slBankBranch.setComponentError(new UserError("Select Bank Branch"));
        Error = Error + " " + "Bank Branch";
    }
    if (tfCustomerName == null || tfCustomerName.getValue().trim().length() == 0) {
        tfCustomerName.setComponentError(new UserError("Enter Customer Name"));
        Error = Error + " " + "Customer Name";
    }

    lblNotificationIcon.setIcon(new ThemeResource("img/failure.png"));
    lblSaveNotification.setValue(Error);

}

From source file:com.gnts.pem.txn.sbi.SBIFlat.java

private void saveEvaluationDetails() {
    // TODO Auto-generated method stub
    uiflowdata = new UIFlowData();
    // for save evaluation details
    boolean valid = false;
    try {//from  w  w w . j a v a 2  s  .  co  m
        TPemCmEvalDetails evalobj = new TPemCmEvalDetails();

        evalobj.setDocId(headerid);
        System.out.println("Headerid-->" + headerid);
        evalobj.setDocDate(dfDateofValuation.getValue());
        evalobj.setEvalNo(tfEvaluationNumber.getValue());
        evalobj.setEvalDate(dfDateofValuation.getValue());
        evalobj.setValuationBy(tfValuatedBy.getValue());
        MPemCmBank bankid = new MPemCmBank();
        bankid.setBankId(selectedBankid);
        evalobj.setBankId(bankid);
        evalobj.setDoctype(screenName);
        evalobj.setCompanyId(selectCompanyid);
        evalobj.setBankBranch((String) slBankBranch.getValue());
        evalobj.setEvalPurpose(tfEvaluationPurpose.getValue());
        evalobj.setEvalDate(dfDateofValuation.getValue());
        evalobj.setCheckedBy(tfVerifiedBy.getValue());
        evalobj.setCheckedDt(dfVerifiedDate.getValue());
        evalobj.setInspectionDt(dfDateofValuation.getValue());
        evalobj.setInspectionBy(tfValuatedBy.getValue());
        evalobj.setDocStatus(Common.DOC_DRAFT);
        evalobj.setLastUpdateDt(new Date());
        evalobj.setLastUpdtedBy(loginusername);
        evalobj.setCustName(tfCustomerName.getValue());

        if (tfDynamicEvaluation1.getValue() != null && tfDynamicEvaluation1.getValue().trim().length() > 0) {
            evalobj.setCustomLbl1(tfDynamicEvaluation1.getCaption());
            evalobj.setCustomValue1(tfDynamicEvaluation1.getValue());
        }
        if (tfDynamicEvaluation2.getValue() != null && tfDynamicEvaluation2.getValue().trim().length() > 0) {
            evalobj.setCustomValue2(tfDynamicEvaluation2.getCaption());
            evalobj.setCustomValue2(tfDynamicEvaluation2.getValue());
        }
        try {
            saveOwnerDetails();
        } catch (Exception e) {
        }

        try {
            saveAssetDetails();
        } catch (Exception e) {
        }

        try {
            saveNormalDocuments();
        } catch (Exception e) {
        }

        try {
            saveLegalDocuments();
        } catch (Exception e) {
        }

        try {
            saveAdjoinPropertyDetails();
        } catch (Exception e) {
        }

        try {
            saveDimensionValues();
        } catch (Exception e) {
        }

        try {
            saveDescriptionDetails();
        } catch (Exception e) {
        }

        try {
            saveCharacterDetails();
        } catch (Exception e) {
        }
        try {
            saveDetailsofApartment();
        } catch (Exception e) {
        }
        try {
            saveFlatValuation();
        } catch (Exception e) {
        }

        try {
            savePlanApprovalDetails();
        } catch (Exception e) {
        }
        try {
            saveBuildSpecDetails();
        } catch (Exception e) {
        }

        try {
            saveConstValuationDetails();
        } catch (Exception e) {
        }
        try {
            savePlinthAreaDetails();
        } catch (Exception e) {
        }
        try {
            saveFloorDetails();
        } catch (Exception e) {
        }
        try {
            savePropertyValueDetails();
        } catch (Exception e) {
        }
        try {
            uiflowdata.setPropertyAddress(tfPropertyAddress.getValue());
            uiflowdata.setBankBranch((String) slBankBranch.getValue());
            uiflowdata.setEvalnumber(tfEvaluationNumber.getValue());
            uiflowdata.setCustomername(tfCustomerName.getValue());
            if (dfDateofValuation.getValue() != null) {
                SimpleDateFormat dt1 = new SimpleDateFormat("dd-MMM-yyy");
                uiflowdata.setInspectionDate(dt1.format(dfDateofValuation.getValue()));
            }
            uiflowdata.setPropDesc((String) slPropertyDesc.getValue());

        } catch (Exception e) {
        }

        try {
            uiflowdata.setPropDesc((String) slPropertyDesc.getValue());
            uiflowdata.setMarketValue(XMLUtil.IndianFormat(new BigDecimal(tfCostOfConstAsAtSite.getValue())));
            uiflowdata.setGuidelinevalue(
                    XMLUtil.IndianFormat(new BigDecimal(tfCostOfConstAsPerAgree.getValue())));

            String numberOnly = tfCostOfConstAsAtSite.getValue().replaceAll("[^\\d.]", "");
            uiflowdata.setAmountInWords(beanEvaluation.getAmountInWords(numberOnly));
            //Bill
        } catch (Exception e) {
        }
        evalNumber = tfEvaluationNumber.getValue();
        customer = tfCustomerName.getValue();
        propertyType = "FLAT";
        ByteArrayOutputStream recvstram = XMLUtil.doMarshall(uiflowdata);
        XMLUtil.getWordDocument(recvstram, evalNumber + "_" + customer + "_" + propertyType, strXslFile);
        //beanEvaluation.saveorUpdateEvalDetails(evalobj);
        uiflowdata.setEvalDtls(evalobj);
        if (tfEvaluationNumber.isValid() && slBankBranch.isValid() && tfEvaluationPurpose.isValid()
                && dfDateofValuation.isValid()) {
            if (count == 0) {
                beanEvaluation.saveorUpdateEvalDetails(evalobj);

                valid = true;
            }
            lblNotificationIcon.setIcon(new ThemeResource("img/success_small.png"));
            lblSaveNotification.setValue(ApplicationConstants.saveMsg);
        }

        if (valid) {
            /*populateAndConfig(false);
            resetAllFieldsFields();*/
            btnSave.setEnabled(false);
        } else {
            btnSave.setComponentError(new UserError("Form is invalid"));
        }
    } catch (Exception e) {
        e.printStackTrace();
        lblNotificationIcon.setIcon(new ThemeResource("img/failure.png"));
        lblSaveNotification.setValue("Saved failed, please check the data and try again ");
        logger.info("Error on SaveApproveReject Status function--->" + e);

    }

}

From source file:com.gnts.pem.txn.sbi.SBIFlat.java

private void setComponentStyle() {
    // TODO Auto-generated method stub
    slSearchBankbranch.setNullSelectionAllowed(false);
    slSearchBankbranch.setInputPrompt(Common.SELECT_PROMPT);
    tfSearchCustomer.setInputPrompt("Enter Customer");
    tfSearchEvalNumber.setInputPrompt("Enter Evaluation Number");

    tfEvaluationNumber.setWidth(strComponentWidth);
    slBankBranch.setWidth(strComponentWidth);
    tfEvaluationPurpose.setWidth(strComponentWidth);
    dfDateofValuation.setWidth("150px");
    tfValuatedBy.setWidth(strComponentWidth);
    dfVerifiedDate.setWidth("150px");
    tfVerifiedBy.setWidth(strComponentWidth);
    tfDynamicEvaluation1.setWidth(strComponentWidth);
    tfDynamicEvaluation2.setWidth(strComponentWidth);

    dfDateofValuation.addValidator(new DateValidation("Invalid date entered"));
    dfDateofValuation.setImmediate(true);

    dfVerifiedDate.addValidator(new DateValidation("Invalid date entered"));
    dfVerifiedDate.setImmediate(true);/* w ww .  j  av a  2 s  .  c o  m*/

    dfDateofValuation.setDateFormat("dd-MMM-yyy");
    dfVerifiedDate.setDateFormat("dd-MMM-yyy");
    dfSearchEvalDate.setDateFormat("dd-MMM-yyy");

    // for dynamic
    btnDynamicEvaluation1.setIcon(new ThemeResource(Common.strAddIcon));
    btnDynamicEvaluation1.setStyleName(Runo.BUTTON_LINK);
    btnDynamicConstValuation.setIcon(new ThemeResource(Common.strAddIcon));
    btnDynamicConstValuation.setStyleName(Runo.BUTTON_LINK);
    btnDynamicApartment.setIcon(new ThemeResource(Common.strAddIcon));
    btnDynamicApartment.setStyleName(Runo.BUTTON_LINK);

    btnDynamicFlatValuation.setIcon(new ThemeResource(Common.strAddIcon));
    btnDynamicFlatValuation.setStyleName(Runo.BUTTON_LINK);
    btnDynamicPlanApproval.setIcon(new ThemeResource(Common.strAddIcon));
    btnDynamicPlanApproval.setStyleName(Runo.BUTTON_LINK);
    btnDynamicDescProp.setIcon(new ThemeResource(Common.strAddIcon));
    btnDynamicDescProp.setStyleName(Runo.BUTTON_LINK);
    btnDynamicCharacter.setIcon(new ThemeResource(Common.strAddIcon));
    btnDynamicCharacter.setStyleName(Runo.BUTTON_LINK);
    btnDynamicForFlat.setIcon(new ThemeResource(Common.strAddIcon));
    btnDynamicForFlat.setStyleName(Runo.BUTTON_LINK);
    btnAddBuildSpec.setStyleName(Runo.BUTTON_LINK);
    btnAddBuildSpec.setIcon(new ThemeResource(Common.strAddIcon));

    btnAddPlinth.setIcon(new ThemeResource(Common.strAddIcon));
    btnAddPlinth.setStyleName(Runo.BUTTON_LINK);
    // for default values
    tfCoverUnderStatCentral.setValue(Common.strNA);
    tfAnyConversionLand.setValue(Common.strNA);
    tfMonthlyRent.setValue(Common.strNA);
    tfElecServiceConnNo.setValue(Common.strNA);
    tfProTaxReceipt.setValue(Common.strNA);
    tfFlood.setValue(Common.strNil);
    tfGeneralRemarks.setValue(Common.strNil);
    tfUDSArea.setValue("Total No.of flats/Site area");
    tfIndexCalculation.setValue("Total built up area/Site area");

    // for owner/asset
    tfCustomerName.setWidth(strComponentWidth);
    slPropertyDesc.setWidth(strComponentWidth);
    tfCustomerAddr.setWidth(strComponentWidth);
    tfCustomerAddr.setHeight("130px");
    slPropertyDesc.setNullSelectionAllowed(false);

    tfLandMark.setWidth(strComponentWidth);
    tfPropertyAddress.setWidth(strComponentWidth);
    tfPropertyAddress.setHeight("130px");
    tfDynamicAsset1.setWidth(strComponentWidth);
    tfDynamicAsset2.setWidth(strComponentWidth);
    btnDynamicAsset.setIcon(new ThemeResource(Common.strAddIcon));
    btnDynamicAsset.setStyleName(Runo.BUTTON_LINK);
    btnAddOwner.setIcon(new ThemeResource(Common.strAddIcon));
    btnAddOwner.setStyleName(Runo.BUTTON_LINK);

    // for document
    btnAddLegalDoc.setIcon(new ThemeResource(Common.strAddIcon));
    btnAddNorDoc.setIcon(new ThemeResource(Common.strAddIcon));
    btnAddNorDoc.setStyleName(Runo.BUTTON_LINK);
    btnAddLegalDoc.setStyleName(Runo.BUTTON_LINK);

    // /for adjoin property and dimension
    btnAddAdjoinProperty.setIcon(new ThemeResource(Common.strAddIcon));
    btnAddAdjoinProperty.setStyleName(Runo.BUTTON_LINK);
    btnAddDimension.setIcon(new ThemeResource(Common.strAddIcon));
    btnAddDimension.setStyleName(Runo.BUTTON_LINK);

    // for description of the property
    tfPostalAddress.setWidth(strComponentWidth);
    tfSiteNumber.setWidth(strComponentWidth);
    tfSFNumber.setWidth(strComponentWidth);
    tfNewSFNumber.setWidth(strComponentWidth);
    tfVillage.setWidth(strComponentWidth);
    tfTaluk.setWidth(strComponentWidth);
    tfDistCorpPanc.setWidth(strComponentWidth);
    tfLocationSketch.setWidth(strComponentWidth);
    tfProTaxReceipt.setWidth(strComponentWidth);
    tfElecServiceConnNo.setWidth(strComponentWidth);
    tfElecConnecName.setWidth(strComponentWidth);
    slHighMiddPoor.setWidth(strComponentWidth);
    slUrbanSemiRural.setWidth(strComponentWidth);
    slResiIndustCommer.setWidth(strComponentWidth);
    slProOccupiedBy.setWidth(strComponentWidth);
    tfMonthlyRent.setWidth(strComponentWidth);
    tfCoverUnderStatCentral.setWidth(strComponentWidth);
    tfAnyConversionLand.setWidth(strComponentWidth);
    tfExtentSite.setWidth(strComponentWidth);
    tfYearAcquistion.setWidth(strComponentWidth);
    tfPurchaseValue.setWidth(strComponentWidth);
    tfPropLandmark.setWidth(strComponentWidth);
    tfDynamicDescProp1.setWidth(strComponentWidth);
    tfDynamicDescProp2.setWidth(strComponentWidth);
    // for Charcteristics of the site
    slLocalClass.setWidth(strComponentWidth);
    slSurroundDevelop.setWidth(strComponentWidth);
    tfFlood.setWidth(strComponentWidth);
    slFeasibility.setWidth(strComponentWidth);
    slLandLevel.setWidth(strComponentWidth);
    slLandShape.setWidth(strComponentWidth);
    slTypeUse.setWidth(strComponentWidth);
    tfUsageRestriction.setWidth(strComponentWidth);
    slIsPlot.setWidth(strComponentWidth);
    tfApprveNo.setWidth(strComponentWidth);
    tfNoReason.setWidth(strComponentWidth);
    tfSubdivide.setWidth(strComponentWidth);
    slDrawApproval.setWidth(strComponentWidth);
    slCornerInter.setWidth(strComponentWidth);
    slRoadFacility.setWidth(strComponentWidth);
    slTypeRoad.setWidth(strComponentWidth);
    slRoadWidth.setWidth(strComponentWidth);
    slLandLock.setWidth(strComponentWidth);
    slWaterPotential.setWidth(strComponentWidth);
    slUnderSewerage.setWidth(strComponentWidth);
    slPowerSupply.setWidth(strComponentWidth);
    tfAdvantageSite.setWidth(strComponentWidth);
    tfDisadvantageSite.setWidth(strComponentWidth);
    tfGeneralRemarks.setWidth(strComponentWidth);
    tfDynamicCharacter1.setWidth(strComponentWidth);
    tfDynamicCharacter2.setWidth(strComponentWidth);
    // details of apartment
    slNatureofApartment.setWidth(strComponentWidth);
    tfNameofApartment.setWidth(strComponentWidth);
    tfPostalAddressLoc.setWidth(strComponentWidth);
    tfApartmant.setWidth(strComponentWidth);
    tfFlatNumber.setWidth(strComponentWidth);
    tfSFNumberLoc.setWidth(strComponentWidth);
    tfNewSFNumberLoc.setWidth(strComponentWidth);
    tfFloor.setWidth(strComponentWidth);
    tfVillageLoc.setWidth(strComponentWidth);
    tfTalukLoc.setWidth(strComponentWidth);
    tfDisrictLoc.setWidth(strComponentWidth);
    slDescriptionofLocality.setWidth(strComponentWidth);
    tfNoofFloors.setWidth(strComponentWidth);
    slTypeofStructure.setWidth(strComponentWidth);
    tfNumberofFlats.setWidth(strComponentWidth);
    tfDynamicApartment1.setWidth(strComponentWidth);
    tfDynamicApartment2.setWidth(strComponentWidth);

    // for flat valuation
    tfFlatisSituated.setWidth(strComponentWidth);
    tfDynamicFlatValuation1.setWidth(strComponentWidth);
    tfDynamicFlatValuation2.setWidth(strComponentWidth);

    // for details of plan approval
    tfLandandBuilding.setWidth(strComponentWidth);
    tfPlanApprovedBy.setWidth(strComponentWidth);
    dfLicenseFrom.setWidth(strComponentWidth);
    tfDynamicPlanApproval1.setWidth(strComponentWidth);
    slIsLicenceForced.setWidth(strComponentWidth);
    slAllApprovalRecved.setWidth(strComponentWidth);
    slConstAsperAppPlan.setWidth(strComponentWidth);
    tfReason.setWidth(strComponentWidth);
    tfDynamicPlanApproval2.setWidth(strComponentWidth);

    // for land valuation
    tfUndividedShare.setWidth(strComponentWidth);
    tfSuperBuiltupArea.setWidth(strComponentWidth);
    tfCostofApartment.setWidth(strComponentWidth);
    tfRateofApartment.setWidth(strComponentWidth);
    slIsRateReasonable.setWidth(strComponentWidth);
    tfStageOfConstruction.setWidth(strComponentWidth);
    tfCostOfConstAsAtSite.setWidth(strComponentWidth);
    tfCostOfConstAsPerAgree.setWidth(strComponentWidth);
    tfDynamicConstValuation1.setWidth(strComponentWidth);
    tfDynamicConstValuation2.setWidth(strComponentWidth);

    tfLandMark.setWidth(strComponentWidth);
    tfPropertyAddress.setWidth(strComponentWidth);
    tfPropertyAddress.setHeight("130px");
    tfDynamicAsset1.setWidth(strComponentWidth);
    tfDynamicAsset2.setWidth(strComponentWidth);

    // for flats
    slUndivideShare.setWidth(strComponentWidth);
    tfUDSproportion.setWidth(strComponentWidth);
    tfUDSArea.setWidth(strComponentWidth);
    tfDynamicForFlat1.setWidth(strComponentWidth);
    tfDynamicForFlat2.setWidth(strComponentWidth);
    tfFlatsApproved.setWidth(strComponentWidth);
    tfFlatsWorkplan.setWidth(strComponentWidth);
    lblFloorIndex.setWidth(strComponentWidth);
    tfIndexPlan.setWidth(strComponentWidth);
    tfIndexSite.setWidth(strComponentWidth);
    tfIndexCalculation.setWidth(strComponentWidth);
    slUnderPermissable.setWidth(strComponentWidth);

    //set Null representation

    tfEvaluationNumber.setNullRepresentation("");
    slBankBranch.setNullSelectionAllowed(false);
    tfEvaluationPurpose.setNullRepresentation("");
    tfValuatedBy.setNullRepresentation("");
    tfVerifiedBy.setNullRepresentation("");
    tfDynamicEvaluation1.setNullRepresentation("");
    tfDynamicEvaluation2.setNullRepresentation("");
    slSearchBankbranch.setNullSelectionAllowed(false);

    // for owner/asset
    tfCustomerName.setNullRepresentation("");
    slPropertyDesc.setNullSelectionAllowed(false);
    tfCustomerAddr.setNullRepresentation("");
    slPropertyDesc.setNullSelectionAllowed(false);

    tfLandMark.setNullRepresentation("");
    tfPropertyAddress.setNullRepresentation("");
    tfDynamicAsset1.setNullRepresentation("");
    tfDynamicAsset2.setNullRepresentation("");

    // for description of the property
    tfPostalAddress.setNullRepresentation("");
    tfSiteNumber.setNullRepresentation("");
    tfSFNumber.setNullRepresentation("");
    tfNewSFNumber.setNullRepresentation("");
    tfVillage.setNullRepresentation("");
    tfTaluk.setNullRepresentation("");
    tfDistCorpPanc.setNullRepresentation("");
    tfLocationSketch.setNullRepresentation("");
    tfProTaxReceipt.setNullRepresentation("");
    tfElecServiceConnNo.setNullRepresentation("");
    tfElecConnecName.setNullRepresentation("");
    slHighMiddPoor.setNullSelectionAllowed(false);
    slUrbanSemiRural.setNullSelectionAllowed(false);
    slResiIndustCommer.setNullSelectionAllowed(false);
    slProOccupiedBy.setNullSelectionAllowed(false);
    tfMonthlyRent.setNullRepresentation("");
    tfCoverUnderStatCentral.setNullRepresentation("");
    tfAnyConversionLand.setNullRepresentation("");
    tfExtentSite.setNullRepresentation("");
    tfYearAcquistion.setNullRepresentation("");
    tfPurchaseValue.setNullRepresentation("");
    tfPropLandmark.setNullRepresentation("");
    tfDynamicDescProp1.setNullRepresentation("");
    tfDynamicDescProp2.setNullRepresentation("");
    // for Charcteristics of the site
    slLocalClass.setNullSelectionAllowed(false);
    slSurroundDevelop.setNullSelectionAllowed(false);
    tfFlood.setNullRepresentation("");
    slFeasibility.setNullSelectionAllowed(false);
    slLandLevel.setNullSelectionAllowed(false);
    slLandShape.setNullSelectionAllowed(false);
    slTypeUse.setNullSelectionAllowed(false);
    tfUsageRestriction.setNullRepresentation("");
    slIsPlot.setNullSelectionAllowed(false);
    tfApprveNo.setNullRepresentation("");
    tfNoReason.setNullRepresentation("");
    tfSubdivide.setNullRepresentation("");
    slDrawApproval.setNullSelectionAllowed(false);
    slCornerInter.setNullSelectionAllowed(false);
    slRoadFacility.setNullSelectionAllowed(false);
    slTypeRoad.setNullSelectionAllowed(false);
    slRoadWidth.setNullSelectionAllowed(false);
    slLandLock.setNullSelectionAllowed(false);
    slWaterPotential.setNullSelectionAllowed(false);
    slUnderSewerage.setNullSelectionAllowed(false);
    slPowerSupply.setNullSelectionAllowed(false);
    tfAdvantageSite.setNullRepresentation("");
    tfDisadvantageSite.setNullRepresentation("");
    tfGeneralRemarks.setNullRepresentation("");
    tfDynamicCharacter1.setNullRepresentation("");
    tfDynamicCharacter2.setNullRepresentation("");
    // details of apartment
    slNatureofApartment.setNullSelectionAllowed(false);
    tfNameofApartment.setNullRepresentation("");
    tfPostalAddressLoc.setNullRepresentation("");
    tfApartmant.setNullRepresentation("");
    tfFlatNumber.setNullRepresentation("");
    tfSFNumberLoc.setNullRepresentation("");
    tfNewSFNumberLoc.setNullRepresentation("");
    tfFloor.setNullRepresentation("");
    tfVillageLoc.setNullRepresentation("");
    tfTalukLoc.setNullRepresentation("");
    tfDisrictLoc.setNullRepresentation("");
    slDescriptionofLocality.setNullSelectionAllowed(false);
    tfNoofFloors.setNullRepresentation("");
    slTypeofStructure.setNullSelectionAllowed(false);
    tfNumberofFlats.setNullRepresentation("");
    tfDynamicApartment1.setNullRepresentation("");
    tfDynamicApartment2.setNullRepresentation("");

    // for flat valuation
    tfFlatisSituated.setNullRepresentation("");
    tfDynamicFlatValuation1.setNullRepresentation("");
    tfDynamicFlatValuation2.setNullRepresentation("");

    // for details of plan approval
    tfLandandBuilding.setNullRepresentation("");
    tfPlanApprovedBy.setNullRepresentation("");
    dfLicenseFrom.setNullRepresentation("");
    tfDynamicPlanApproval1.setNullRepresentation("");
    slIsLicenceForced.setNullSelectionAllowed(false);
    slAllApprovalRecved.setNullSelectionAllowed(false);
    slConstAsperAppPlan.setNullSelectionAllowed(false);
    tfReason.setNullRepresentation("");
    tfDynamicPlanApproval2.setNullRepresentation("");

    // for land valuation
    tfUndividedShare.setNullRepresentation("");
    tfSuperBuiltupArea.setNullRepresentation("");
    tfCostofApartment.setNullRepresentation("");
    tfRateofApartment.setNullRepresentation("");
    slIsRateReasonable.setNullSelectionAllowed(false);
    tfStageOfConstruction.setNullRepresentation("");
    tfCostOfConstAsAtSite.setNullRepresentation("");
    tfCostOfConstAsPerAgree.setNullRepresentation("");
    tfDynamicConstValuation1.setNullRepresentation("");
    tfDynamicConstValuation2.setNullRepresentation("");

    tfLandMark.setNullRepresentation("");
    tfPropertyAddress.setNullRepresentation("");
    tfDynamicAsset1.setNullRepresentation("");
    tfDynamicAsset2.setNullRepresentation("");

    // for flats
    slUndivideShare.setNullSelectionAllowed(false);
    tfUDSproportion.setNullRepresentation("");
    tfUDSArea.setNullRepresentation("");
    tfDynamicForFlat1.setNullRepresentation("");
    tfDynamicForFlat2.setNullRepresentation("");
    tfFlatsApproved.setNullRepresentation("");
    tfFlatsWorkplan.setNullRepresentation("");
    tfIndexPlan.setNullRepresentation("");
    tfIndexSite.setNullRepresentation("");
    tfIndexCalculation.setNullRepresentation("");
    slUnderPermissable.setNullSelectionAllowed(false);
    /*   tfEvaluationNumber.addValidator(new IntegerValidator("Enter numbers only"));
    tfEvaluationNumber.addBlurListener(new SaarcValidate(tfEvaluationNumber));*/
    tfEvaluationNumber.setImmediate(true);

    tfEvaluationNumber.addBlurListener(new BlurListener() {

        private static final long serialVersionUID = 1L;

        public void blur(BlurEvent event) {
            // TODO Auto-generated method stub
            if (!tfEvaluationNumber.isReadOnly()) {
                tfEvaluationNumber.setComponentError(null);
                try {
                    tfEvaluationNumber.setComponentError(null);
                    String evalno = tfEvaluationNumber.getValue().toString();
                    count = beanEvaluation.getEvalNoCount(evalno);

                    if (tfEvaluationNumber.getValue() != null
                            && tfEvaluationNumber.getValue().trim().length() > 0) {

                        if (count == 0) {

                            tfEvaluationNumber.setComponentError(null);

                        } else {

                            tfEvaluationNumber
                                    .setComponentError(new UserError("Evaluation number is already Exist"));

                        }
                    }
                } catch (Exception e) {

                }
            }

        }
    });
    tfSiteNumber.setImmediate(true);
    tfSiteNumber.addBlurListener(new BlurListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void blur(BlurEvent event) {
            tfFlatNumber.setValue(tfSiteNumber.getValue());
        }
    });
    tfSFNumber.setImmediate(true);
    tfSFNumber.addBlurListener(new BlurListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void blur(BlurEvent event) {
            tfSFNumberLoc.setValue(tfSFNumber.getValue());
        }
    });
    tfNewSFNumber.setImmediate(true);
    tfNewSFNumber.addBlurListener(new BlurListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void blur(BlurEvent event) {
            tfNewSFNumberLoc.setValue(tfNewSFNumber.getValue());
        }
    });
    tfVillage.setImmediate(true);
    tfVillage.addBlurListener(new BlurListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void blur(BlurEvent event) {
            tfVillageLoc.setValue(tfVillage.getValue());
        }
    });
    tfTaluk.setImmediate(true);
    tfTaluk.addBlurListener(new BlurListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void blur(BlurEvent event) {
            tfTalukLoc.setValue(tfTaluk.getValue());
        }
    });
    tfDistCorpPanc.setImmediate(true);
    tfDistCorpPanc.addBlurListener(new BlurListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void blur(BlurEvent event) {
            tfDisrictLoc.setValue(tfDistCorpPanc.getValue());
        }
    });
    tfNumberofFlats.setImmediate(true);
    tfNumberofFlats.addBlurListener(new BlurListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void blur(BlurEvent event) {
            tfFlatsApproved.setValue(tfNumberofFlats.getValue());
        }
    });

}

From source file:com.gnts.pem.txn.sbi.SBIFlat.java

@Override
public void buttonClick(ClickEvent event) {
    notifications.close();//  ww  w  .  ja  va 2s .c o m
    if (btnAdd == event.getButton()) {
        btnSave.setVisible(true);
        btnCancel.setVisible(true);
        btnSubmit.setVisible(true);
        tablePanel.setVisible(false);
        searchPanel.setVisible(false);
        mainPanel.setVisible(true);
        headerid = beanEvaluation.getNextSequnceId("seq_pem_evaldtls_docid");
        lblAddEdit.setValue("&nbsp;>&nbsp;Add New");
        lblAddEdit.setVisible(true);
        lblFormTittle.setVisible(false);
        hlBreadCrumbs.setVisible(true);
        resetAllFieldsFields();

    } else if (btnEdit == event.getButton()) {
        btnSave.setVisible(true);
        btnCancel.setVisible(true);
        btnSubmit.setVisible(true);
        tablePanel.setVisible(false);
        searchPanel.setVisible(false);
        mainPanel.setVisible(true);
        resetAllFieldsFields();
        editDetails();
        lblAddEdit.setValue("&nbsp;>&nbsp;Modify");
        lblAddEdit.setVisible(true);
        lblFormTittle.setVisible(false);
        hlBreadCrumbs.setVisible(true);

    }
    if (btnSave == event.getButton()) {
        setComponentError();
        if (tfEvaluationNumber.isValid() && slBankBranch.isValid() && tfEvaluationPurpose.isValid()
                && dfDateofValuation.isValid()) {

            saveEvaluationDetails();
        }
        //btnSave.setVisible(false);
    }
    if (btnSubmit == event.getButton()) {
        setComponentError();
        if (tfEvaluationNumber.isValid() && slBankBranch.isValid() && tfEvaluationPurpose.isValid()
                && dfDateofValuation.isValid()) {
            saveEvaluationDetails();
            updateEvaluationDetails();
            btnSubmit.setEnabled(false);
            btnSave.setEnabled(false);
        }
        //   saveExcel.setVisible(true);

    }
    if (btnCancel == event.getButton()) {
        btnSave.setVisible(false);
        btnSubmit.setVisible(false);
        btnCancel.setVisible(false);
        //saveExcel.setVisible(false);
        btnSave.setEnabled(true);
        btnSubmit.setEnabled(true);
        tablePanel.setVisible(true);
        searchPanel.setVisible(true);
        mainPanel.setVisible(false);
        btnEdit.setEnabled(false);
        btnAdd.setEnabled(true);
        populateAndConfig(false);
        lblFormTittle.setValue("&nbsp;&nbsp;<b>" + screenName + "</b>&nbsp;::&nbsp;Search");
        lblNotificationIcon.setIcon(null);
        lblSaveNotification.setValue("");
        lblFormTittle.setVisible(true);
        hlBreadCrumbs.setVisible(false);
        lblAddEdit.setVisible(false);
        btnView.setEnabled(false);

        hlFileDownloadLayout.removeAllComponents();
        hlFileDownloadLayout.addComponent(btnDownload);
        getExportTableDetails();

    } else if (btnSearch == event.getButton()) {
        populateAndConfig(true);
        if (total == 0) {
            lblNotificationIcon.setIcon(new ThemeResource("img/msg_info.png"));
            lblSaveNotification.setValue("No Records found");
        } else {
            lblNotificationIcon.setIcon(null);
            lblSaveNotification.setValue("");
        }
        hlFileDownloadLayout.removeAllComponents();
        hlFileDownloadLayout.addComponent(btnDownload);
        getExportTableDetails();
    } else if (btnReset == event.getButton()) {
        tfSearchEvalNumber.setValue("");
        dfSearchEvalDate.setValue(null);
        tfSearchCustomer.setValue("");
        slSearchBankbranch.setValue(null);
        populateAndConfig(false);
    }

    if (btnAddAdjoinProperty == event.getButton()) {

        panelAdjoinProperties.addComponent(new ComponentIteratorAdjoinProperty(null, true, true, false));
    }

    if (btnAddDimension == event.getButton()) {
        panelDimension.addComponent(new ComponentIterDimensionofPlot(null, true, true, false));
    }

    else if (btnAddNorDoc == event.getButton()) {

        panelNormalDocumentDetails.addComponent(new ComponentIteratorNormlDoc(null, null, "", ""));
    }

    else if (btnAddLegalDoc == event.getButton()) {

        panelLegalDocumentDetails.addComponent(new ComponentIteratorLegalDoc("", "", null));
    }

    else if (btnAddOwner == event.getButton()) {

        layoutOwnerDetails1.addComponent(new ComponentIterOwnerDetails("", ""));
    } else if (btnDynamicEvaluation1 == event.getButton()) {

        strSelectedPanel = "1";
        showSubWindow();

    }
    if (btnAddPlinth == event.getButton()) {

        layoutPlintharea.addComponent(new ComponentIterPlinthArea("", "", ""));
    }
    if (btnDynamicAsset == event.getButton()) {
        strSelectedPanel = "3";
        showSubWindow();

    }
    if (btnAddBuildSpec == event.getButton()) {
        panelBuildSpecfication.addComponent(new ComponentIterBuildingSpecfication(null, true, true, true));
    }
    if (btnDynamicApartment == event.getButton()) {
        strSelectedPanel = "4";
        showSubWindow();

    }
    if (btnDynamicFlatValuation == event.getButton()) {
        strSelectedPanel = "5";
        showSubWindow();

    }
    if (btnDynamicPlanApproval == event.getButton()) {
        strSelectedPanel = "6";
        showSubWindow();

    }
    if (btnDynamicConstValuation == event.getButton()) {
        strSelectedPanel = "7";
        showSubWindow();

    }
    if (btnDynamicDescProp == event.getButton()) {
        strSelectedPanel = "8";
        showSubWindow();

    }
    if (btnDynamicCharacter == event.getButton()) {
        strSelectedPanel = "9";
        showSubWindow();

    }
    if (btnDynamicForFlat == event.getButton()) {
        strSelectedPanel = "10";
        showSubWindow();

    } else if (btnBack == event.getButton()) {
        resetAllFieldsFields();
        btnSave.setVisible(false);
        btnCancel.setVisible(false);
        btnSubmit.setVisible(false);
        //saveExcel.setVisible(false);
        tablePanel.setVisible(true);
        searchPanel.setVisible(true);
        mainPanel.setVisible(false);
        btnEdit.setEnabled(false);
        btnAdd.setEnabled(true);
        populateAndConfig(false);
        lblFormTittle.setValue("&nbsp;&nbsp;<b>" + screenName + "</b>&nbsp;::&nbsp;Search");
        lblNotificationIcon.setIcon(null);
        lblSaveNotification.setValue("");
        lblFormTittle.setVisible(true);
        hlBreadCrumbs.setVisible(false);
        lblAddEdit.setVisible(false);
        btnView.setEnabled(false);
    } else if (myButton == event.getButton()) {
        if (tfCaption.getValue() != null && tfCaption.getValue().trim().length() > 0) {
            if (strSelectedPanel.equals("1")) {
                if (tfDynamicEvaluation1.isVisible()) {
                    tfDynamicEvaluation2.setCaption(tfCaption.getValue());
                    tfDynamicEvaluation2.setVisible(true);
                } else {
                    tfDynamicEvaluation1.setCaption(tfCaption.getValue());
                    tfDynamicEvaluation1.setVisible(true);
                }
            }

            else if (strSelectedPanel.equals("3")) {
                if (tfDynamicAsset1.isVisible()) {
                    tfDynamicAsset2.setCaption(tfCaption.getValue());
                    tfDynamicAsset2.setVisible(true);
                } else {
                    tfDynamicAsset1.setCaption(tfCaption.getValue());
                    tfDynamicAsset1.setVisible(true);
                }
            } else if (strSelectedPanel.equals("4")) {
                if (tfDynamicApartment1.isVisible()) {
                    tfDynamicApartment2.setCaption(tfCaption.getValue());
                    tfDynamicApartment2.setVisible(true);
                } else {
                    tfDynamicApartment1.setCaption(tfCaption.getValue());
                    tfDynamicApartment1.setVisible(true);
                }
            } else if (strSelectedPanel.equals("5")) {
                if (tfDynamicFlatValuation1.isVisible()) {
                    tfDynamicFlatValuation2.setCaption(tfCaption.getValue());
                    tfDynamicFlatValuation2.setVisible(true);
                } else {
                    tfDynamicFlatValuation1.setCaption(tfCaption.getValue());
                    tfDynamicFlatValuation1.setVisible(true);
                }
            } else if (strSelectedPanel.equals("6")) {
                if (tfDynamicPlanApproval1.isVisible()) {
                    tfDynamicPlanApproval2.setCaption(tfCaption.getValue());
                    tfDynamicPlanApproval2.setVisible(true);
                } else {
                    tfDynamicPlanApproval1.setCaption(tfCaption.getValue());
                    tfDynamicPlanApproval1.setVisible(true);
                }
            } else if (strSelectedPanel.equals("7")) {
                if (tfDynamicConstValuation1.isVisible()) {
                    tfDynamicConstValuation2.setCaption(tfCaption.getValue());
                    tfDynamicConstValuation2.setVisible(true);
                } else {
                    tfDynamicConstValuation1.setCaption(tfCaption.getValue());
                    tfDynamicConstValuation1.setVisible(true);
                }
            } else if (strSelectedPanel.equals("8")) {
                if (tfDynamicDescProp1.isVisible()) {
                    tfDynamicDescProp2.setCaption(tfCaption.getValue());
                    tfDynamicDescProp2.setVisible(true);
                } else {
                    tfDynamicDescProp1.setCaption(tfCaption.getValue());
                    tfDynamicDescProp1.setVisible(true);
                }
            }

            else if (strSelectedPanel.equals("9")) {
                if (tfDynamicCharacter1.isVisible()) {
                    tfDynamicCharacter2.setCaption(tfCaption.getValue());
                    tfDynamicCharacter2.setVisible(true);
                } else {
                    tfDynamicCharacter1.setCaption(tfCaption.getValue());
                    tfDynamicCharacter1.setVisible(true);
                }
            } else if (strSelectedPanel.equals("10")) {
                if (tfDynamicForFlat1.isVisible()) {
                    tfDynamicForFlat2.setCaption(tfCaption.getValue());
                    tfDynamicForFlat2.setVisible(true);
                } else {
                    tfDynamicForFlat1.setCaption(tfCaption.getValue());
                    tfDynamicForFlat1.setVisible(true);
                }
            }

        }
        mywindow.close();
    }
}

From source file:com.gnts.pem.txn.sbi.SBILand.java

@SuppressWarnings("deprecation")
void populateAndConfig(boolean search) {
    try {//from   w w w  . j a v a2  s.  c o  m
        tblEvalDetails.removeAllItems();
        tblEvalDetails.setImmediate(true);
        List<TPemCmEvalDetails> evalList = null;
        evalList = new ArrayList<TPemCmEvalDetails>();
        if (search) {
            String evalno = tfSearchEvalNumber.getValue();
            String customer = tfSearchCustomer.getValue();
            String bankbranch = (String) slSearchBankbranch.getValue();
            evalList = beanEvaluation.getSearchEvalDetailnList(null, evalno, null, customer, bankbranch,
                    selectedBankid, selectCompanyid, null);
        } else {

            evalList = beanEvaluation.getSearchEvalDetailnList(selectedFormName, null, null, null, null,
                    selectedBankid, selectCompanyid, null);
            total = evalList.size();
        }
        if (total == 0) {
            lblNotificationIcon.setIcon(new ThemeResource("img/msg_info.png"));
            lblSaveNotification.setValue("No Records found");
        } else {
            lblNotificationIcon.setIcon(null);
            lblSaveNotification.setValue("");
        }
        lblNoofRecords.setValue(
                "<font size=\"2\" color=\"black\">No.of Records:</font> <font size=\"2\" color=\"#1E90FF\"> "
                        + total + "</font>");

        beans = new BeanItemContainer<TPemCmEvalDetails>(TPemCmEvalDetails.class);
        beans.addAll(evalList);
        btnEdit.setEnabled(false);
        tblEvalDetails.setContainerDataSource(beans);
        tblEvalDetails.setSelectable(true);
        tblEvalDetails.setColumnFooter("lastUpdateDt", "No. of Records:" + total);
        tblEvalDetails.setVisibleColumns(new Object[] { "evalNo", "docDate", "bankBranch", "custName",
                "docStatus", "lastUpdtedBy", "lastUpdateDt" });
        tblEvalDetails.setColumnHeaders(new String[] { "Evaluation Number", "Evaluation Date", "Bank Branch",
                "Customer Name", "Status", "Last Updated By", "Last Updated Date" });
        /*      tblEvalDetails.addListener(new ItemClickListener() {
                 private static final long serialVersionUID = 1L;
                
                 public void itemClick(ItemClickEvent event) {
                    if (tblEvalDetails.isSelected(event.getItemId())) {
          btnEdit.setEnabled(false);
          btnAdd.setEnabled(true);
                
                    } else {
          btnEdit.setEnabled(true);
          btnAdd.setEnabled(false);
                
                    }
                
                 }
              });
              */
        tblEvalDetails.addValueChangeListener(new Property.ValueChangeListener() {
            /**
            * 
            */
            private static final long serialVersionUID = 3729824796823933688L;

            @Override
            public void valueChange(ValueChangeEvent event) {

                StreamResource sr = getPDFStream();

                if (sr != null) {

                    if (filedownloader == null) {
                        filedownloader = new FileDownloader(getPDFStream());
                        filedownloader.extend(btnView);
                    } else {
                        filedownloader.setFileDownloadResource(sr);
                    }
                } else {

                    //   notif.show(Page.getCurrent());
                    if (filedownloader != null) {
                        filedownloader.setFileDownloadResource(null); // reset
                    }

                }
                TPemCmEvalDetails syncList = (TPemCmEvalDetails) event.getProperty().getValue();
                if (syncList != null) {

                    if (syncList.getDocStatus().equals("Draft") || syncList.getDocStatus().equals("Rejected")) {
                        btnEdit.setEnabled(true);
                        btnView.setEnabled(false);
                    } else {
                        btnEdit.setEnabled(false);
                        btnView.setEnabled(true);

                    }
                    btnAdd.setEnabled(false);

                } else {
                    btnEdit.setEnabled(false);
                    btnAdd.setEnabled(true);

                }
            }

        });
        tblEvalDetails.setImmediate(true);
        tblEvalDetails.addItemClickListener(new ItemClickListener() {

            @Override
            public void itemClick(ItemClickEvent event) {
                // TODO Auto-generated method stub
                if (tblEvalDetails.isSelected(event.getItemId())) {

                    btnView.setEnabled(false);
                } else {

                    btnView.setEnabled(true);
                }
            }
        });
    } catch (Exception e) {
        e.printStackTrace();
        logger.info("Error-->" + e);
    }
    getExportTableDetails();
}

From source file:com.gnts.pem.txn.sbi.SBILand.java

private void updateEvaluationDetails() {
    try {//w w  w . j  a  va  2  s  . c o m
        boolean valid = false;
        TPemCmEvalDetails evalobj = new TPemCmEvalDetails();
        evalNumber = tfEvaluationNumber.getValue();
        customer = tfCustomerName.getValue();
        propertyType = "LAND";
        String basepath = VaadinService.getCurrent().getBaseDirectory().getAbsolutePath();
        File file = new File(
                basepath + "/WEB-INF/PEM-DOCS/" + evalNumber + "_" + customer + "_" + propertyType + ".doc");
        FileInputStream fin = new FileInputStream(file);
        byte fileContent[] = new byte[(int) file.length()];
        fin.read(fileContent);
        fin.close();
        evalobj.setDocId(headerid);
        evalobj.setEvalDoc(fileContent);
        evalobj.setDocStatus(Common.DOC_PENDING);
        evalobj.setEvalNo(tfEvaluationNumber.getValue());
        evalobj.setValuationBy(tfValuatedBy.getValue());
        MPemCmBank bankid = new MPemCmBank();
        bankid.setBankId(selectedBankid);
        evalobj.setBankId(bankid);
        evalobj.setDoctype(screenName);
        evalobj.setCompanyId(selectCompanyid);
        evalobj.setBankBranch((String) slBankBranch.getValue());
        evalobj.setEvalPurpose(tfEvaluationPurpose.getValue());
        evalobj.setEvalDate(dfDateofValuation.getValue());
        evalobj.setCheckedBy(tfVerifiedBy.getValue());
        evalobj.setCheckedDt(dfVerifiedDate.getValue());
        evalobj.setLastUpdateDt(new Date());
        evalobj.setLastUpdtedBy(loginusername);
        evalobj.setCustName(tfCustomerName.getValue());

        if (tfDynamicEvaluation1.getValue() != null && tfDynamicEvaluation1.getValue().trim().length() > 0) {
            evalobj.setCustomLbl1(tfDynamicEvaluation1.getCaption());
            evalobj.setCustomValue1(tfDynamicEvaluation1.getValue());
        }
        if (tfDynamicEvaluation2.getValue() != null && tfDynamicEvaluation2.getValue().trim().length() > 0) {
            evalobj.setCustomValue2(tfDynamicEvaluation2.getCaption());
            evalobj.setCustomValue2(tfDynamicEvaluation2.getValue());
        }

        String numberOnly = tfFairMarketRate.getValue().replaceAll("[^\\d.]", "");
        uiflowdata.setAmountInWords(beanEvaluation.getAmountInWords(numberOnly));
        if (numberOnly.trim().length() == 0) {
            numberOnly = "0";
        }
        evalobj.setPropertyValue(Double.valueOf(numberOnly));
        //beanEvaluation.saveorUpdateEvalDetails(evalobj);
        uiflowdata.setEvalDtls(evalobj);
        if (tfEvaluationNumber.isValid() && slBankBranch.isValid() && tfEvaluationPurpose.isValid()
                && dfDateofValuation.isValid()) {

            if (count == 0) {
                beanEvaluation.saveorUpdateEvalDetails(evalobj);

                valid = true;
            }
            lblNotificationIcon.setIcon(new ThemeResource("img/success_small.png"));
            lblSaveNotification.setValue("Successfully Submitted");
        }

        if (valid) {
            /*populateAndConfig(false);
            resetAllFieldsFields();*/
            btnSubmit.setEnabled(false);
        } else {
            btnSubmit.setComponentError(new UserError("Form is invalid"));
        }
    } catch (Exception e) {
        lblNotificationIcon.setIcon(new ThemeResource("img/failure.png"));
        lblSaveNotification.setValue("Submit failed, please check the data and try again ");
        logger.info("Error on SaveApproveReject Status function--->" + e);
    }
}

From source file:com.gnts.pem.txn.sbi.SBILand.java

private void saveEvaluationDetails() {
    // TODO Auto-generated method stub
    uiflowdata = new UIFlowData();
    // for save evaluation details
    boolean valid = false;
    try {/*from  w ww .j  av  a  2s. c  o m*/
        TPemCmEvalDetails evalobj = new TPemCmEvalDetails();

        evalobj.setDocId(headerid);
        System.out.println("Headerid-->" + headerid);
        evalobj.setDocDate(dfDateofValuation.getValue());
        evalobj.setEvalNo(tfEvaluationNumber.getValue());
        /*if(tfEvaluationNumber.getValue()!=null || tfEvaluationNumber.getValue().trim().length()>0){
        tfEvaluationNumber.setComponentError(null);
        }else
        {
           tfEvaluationNumber.setComponentError(new UserError("Evaluation number is already Exist"));   
        }*/
        evalobj.setEvalDate(dfDateofValuation.getValue());
        evalobj.setValuationBy(tfValuatedBy.getValue());
        MPemCmBank bankid = new MPemCmBank();
        bankid.setBankId(selectedBankid);
        evalobj.setBankId(bankid);
        evalobj.setDoctype(screenName);
        evalobj.setCompanyId(selectCompanyid);
        evalobj.setBankBranch((String) slBankBranch.getValue());
        evalobj.setEvalPurpose(tfEvaluationPurpose.getValue());
        evalobj.setCheckedBy(tfVerifiedBy.getValue());
        evalobj.setCheckedDt(dfVerifiedDate.getValue());
        evalobj.setInspectionDt(dfDateofValuation.getValue());
        evalobj.setInspectionBy(tfValuatedBy.getValue());
        evalobj.setDocStatus(Common.DOC_DRAFT);
        evalobj.setLastUpdateDt(new Date());
        evalobj.setLastUpdtedBy(loginusername);
        evalobj.setCustName(tfCustomerName.getValue());

        if (tfDynamicEvaluation1.getValue() != null && tfDynamicEvaluation1.getValue().trim().length() > 0) {
            evalobj.setCustomLbl1(tfDynamicEvaluation1.getCaption());
            evalobj.setCustomValue1(tfDynamicEvaluation1.getValue());
        }
        if (tfDynamicEvaluation2.getValue() != null && tfDynamicEvaluation2.getValue().trim().length() > 0) {
            evalobj.setCustomValue2(tfDynamicEvaluation2.getCaption());
            evalobj.setCustomValue2(tfDynamicEvaluation2.getValue());
        }
        beanEvaluation.saveorUpdateEvalDetails(evalobj);
        uiflowdata.setEvalDtls(evalobj);
        try {
            saveOwnerDetails();
        } catch (Exception e) {
        }

        try {
            saveAssetDetails();
        } catch (Exception e) {
        }

        try {
            saveNormalDocuments();
        } catch (Exception e) {
        }

        try {
            saveLegalDocuments();
        } catch (Exception e) {
        }

        try {
            saveAdjoinPropertyDetails();
        } catch (Exception e) {
        }

        try {
            saveDimensionValues();
        } catch (Exception e) {
        }

        try {
            saveDescriptionDetails();
        } catch (Exception e) {
        }

        try {
            saveCharacterDetails();
        } catch (Exception e) {

        }
        try {
            savePlanApprovalDetails();
        } catch (Exception e) {
        }
        try {
            saveGuidelineValue();
        } catch (Exception e) {
        }
        try {
            saveProductImageDetails();
        } catch (Exception e) {
        }
        try {
            uiflowdata.setValuationPurpose(tfEvaluationPurpose.getValue());
            uiflowdata.setPropertyAddress(tfPropertyAddress.getValue());
            uiflowdata.setBankBranch((String) slBankBranch.getValue());
            uiflowdata.setEvalnumber(tfEvaluationNumber.getValue());
            uiflowdata.setCustomername(tfCustomerName.getValue());
            if (dfDateofValuation.getValue() != null) {
                SimpleDateFormat dt1 = new SimpleDateFormat("dd-MMM-yyy");
                uiflowdata.setValuationDate(dt1.format(dfDateofValuation.getValue()));
            }
            if (dfVerifiedDate.getValue() != null) {
                SimpleDateFormat dt1 = new SimpleDateFormat("dd-MMM-yyy");
                uiflowdata.setInspectionDate(dt1.format(dfVerifiedDate.getValue()));
            }
            BigDecimal site = new BigDecimal(0.00);
            BigDecimal fair = new BigDecimal(1.00);
            BigDecimal salbale = new BigDecimal(435.60);
            try {
                site = new BigDecimal(tfAreaofLand.getValue().replaceAll("[^\\d.]", ""));
            } catch (Exception e) {
                site = new BigDecimal("0.00");

            }
            try {
                site.divide(salbale, 2, RoundingMode.HALF_UP).toPlainString();
                fair.multiply(site.divide(salbale, 2, RoundingMode.HALF_UP))
                        .multiply(new BigDecimal(tfAdopetdMarketRate.getValue().replaceAll("[^\\d.]", "")));
                tfAreaofLand.setValue(site.toString() + " sft (or) "
                        + site.divide(salbale, 2, RoundingMode.HALF_UP).toPlainString() + " cents");
                tfFairMarketRate.setValue(XMLUtil.IndianFormat(new BigDecimal(fair
                        .multiply(site.divide(salbale, 2, RoundingMode.HALF_UP))
                        .multiply(new BigDecimal(tfAdopetdMarketRate.getValue().replaceAll("[^\\d.]", "")))
                        .toString())));
            } catch (Exception e) {
            }
            uiflowdata.setPropDesc((String) slPropertyDesc.getValue());
            uiflowdata.setCustomername(tfCustomerName.getValue());
            uiflowdata.setMarketValue(XMLUtil.IndianFormat(new BigDecimal(
                    tfFairMarketRate.getValue().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", ""))));
            uiflowdata.setGuidelinevalue(XMLUtil.IndianFormat(new BigDecimal(tfGuidelineRate.getValue())));
            uiflowdata.setRealizablevalue(XMLUtil.IndianFormat(new BigDecimal(tfRealziableRate.getValue())));
            uiflowdata.setDistressvalue(XMLUtil.IndianFormat(new BigDecimal(tfDistressRate.getValue())));
            String numberOnly = tfFairMarketRate.getValue().replaceAll("[^\\d.]", "");
            uiflowdata.setAmountInWords(beanEvaluation.getAmountInWords(numberOnly));
            String numberOnly1 = tfGuidelineRate.getValue().replaceAll("[^0-9]", "");
            uiflowdata.setAmountWordsGuideline(beanEvaluation.getAmountInWords(numberOnly1));
            //Bill
            //tfFairMarketRate.setValue(tfFairMarketRate.getValue().replaceAll("[^\\d.]", ""));
            BigDecimal realizable = new BigDecimal(0.00);
            BigDecimal distress = new BigDecimal(0.00);
            BigDecimal real = new BigDecimal("0.00");
            BigDecimal distre = new BigDecimal("0.00");

            try {
                real = new BigDecimal(
                        tfFairMarketRate.getValue().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", ""));
            } catch (Exception e) {
                real = new BigDecimal("0.00");
            }
            try {
                distre = new BigDecimal(
                        tfFairMarketRate.getValue().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", ""));
            } catch (Exception e) {
                distre = new BigDecimal("0.00");
            }
            try {
                realizable = real.multiply(new BigDecimal(95)).divide(new BigDecimal(100));
                realizable = realizable.subtract(realizable.remainder(new BigDecimal(1000)));
                tfRealziableRate.setValue(realizable.toString());
                uiflowdata.setRealizablevalue(XMLUtil.IndianFormat(new BigDecimal(realizable.toString())));

                distress = (distre.multiply(new BigDecimal(85))).divide(new BigDecimal(100));
                distress = distress.subtract(distress.remainder(new BigDecimal(1000)));
                tfDistressRate.setValue(distress.toString());
                uiflowdata.setDistressvalue(XMLUtil.IndianFormat(new BigDecimal(distress.toString())));
            } catch (Exception e) {

            }
        } catch (Exception e) {
        }
        try {
            saveValuationofLandDetails();
        } catch (Exception e) {
        }
        try {
            savePropertyValueDetails();
        } catch (Exception e) {
        }
        evalNumber = tfEvaluationNumber.getValue();
        customer = tfCustomerName.getValue();
        propertyType = "LAND";
        ByteArrayOutputStream recvstram = XMLUtil.doMarshall(uiflowdata);
        XMLUtil.getWordDocument(recvstram, evalNumber + "_" + customer + "_" + propertyType, strXslFile);
        uiflowdata.setEvalDtls(evalobj);
        if (tfEvaluationNumber.isValid() && slBankBranch.isValid() && tfEvaluationPurpose.isValid()
                && dfDateofValuation.isValid()) {
            if (count == 0) {
                beanEvaluation.saveorUpdateEvalDetails(evalobj);

                valid = true;
            }
            lblNotificationIcon.setIcon(new ThemeResource("img/success_small.png"));
            lblSaveNotification.setValue(ApplicationConstants.saveMsg);
        }

        if (valid) {
            /*populateAndConfig(false);
            resetAllFieldsFields();*/
            btnSave.setEnabled(false);
        } else {
            btnSave.setComponentError(new UserError("Form is invalid"));
        }
    } catch (Exception e) {
        e.printStackTrace();
        lblNotificationIcon.setIcon(new ThemeResource("img/failure.png"));
        lblSaveNotification.setValue("Saved failed, please check the data and try again ");
        logger.info("Error on SaveApproveReject Status function--->" + e);

    }

}

From source file:com.gnts.pem.txn.sbi.SBILand.java

private void setComponentStyle() {

    slSearchBankbranch.setNullSelectionAllowed(false);
    slSearchBankbranch.setInputPrompt(Common.SELECT_PROMPT);
    tfSearchCustomer.setInputPrompt("Enter Customer");
    tfSearchEvalNumber.setInputPrompt("Enter Evaluation Number");
    // TODO Auto-generated method stub
    tfEvaluationNumber.setWidth(strComponentWidth);
    slBankBranch.setWidth(strComponentWidth);
    tfEvaluationPurpose.setWidth(strComponentWidth);
    dfDateofValuation.setWidth("150px");
    tfValuatedBy.setWidth(strComponentWidth);
    dfVerifiedDate.setWidth("150px");
    tfVerifiedBy.setWidth(strComponentWidth);
    tfDynamicEvaluation1.setWidth(strComponentWidth);
    tfDynamicEvaluation2.setWidth(strComponentWidth);

    dfDateofValuation.addValidator(new DateValidation("Invalid date entered"));
    dfDateofValuation.setImmediate(true);
    dfVerifiedDate.addValidator(new DateValidation("Invalid date entered"));
    dfVerifiedDate.setImmediate(true);/* ww  w.ja v  a 2  s. c o m*/

    dfDateofValuation.setDateFormat("dd-MMM-yyy");
    dfVerifiedDate.setDateFormat("dd-MMM-yyy");
    dfSearchEvalDate.setDateFormat("dd-MMM-yyy");

    // for dynamic
    btnDynamicEvaluation1.setIcon(new ThemeResource(Common.strAddIcon));
    btnDynamicEvaluation1.setStyleName(Runo.BUTTON_LINK);
    btnDynamicPlanApproval.setIcon(new ThemeResource(Common.strAddIcon));
    btnDynamicPlanApproval.setStyleName(Runo.BUTTON_LINK);
    btnDynamicDescProp.setIcon(new ThemeResource(Common.strAddIcon));
    btnDynamicDescProp.setStyleName(Runo.BUTTON_LINK);
    btnDynamicCharacter.setIcon(new ThemeResource(Common.strAddIcon));
    btnDynamicCharacter.setStyleName(Runo.BUTTON_LINK);

    btnDynamicValuation.setIcon(new ThemeResource(Common.strAddIcon));
    btnDynamicValuation.setStyleName(Runo.BUTTON_LINK);

    // for default values
    tfGuiderate.setValue("Details enclosed");
    tfCoverUnderStatCentral.setValue(Common.strNA);
    tfAnyConversionLand.setValue(Common.strNA);
    tfMonthlyRent.setValue(Common.strNA);
    tfElecServiceConnNo.setValue(Common.strNA);
    tfProTaxReceipt.setValue(Common.strNA);
    tfFlood.setValue(Common.strNil);
    tfGeneralRemarks.setValue(Common.strNil);

    // for owner/asset
    tfCustomerName.setWidth(strComponentWidth);
    slPropertyDesc.setWidth(strComponentWidth);

    tfCustomerAddr.setWidth(strComponentWidth);
    tfCustomerAddr.setHeight("130px");
    slPropertyDesc.setNullSelectionAllowed(false);

    tfLandMark.setWidth(strComponentWidth);
    tfPropertyAddress.setWidth(strComponentWidth);
    tfPropertyAddress.setHeight("130px");
    tfDynamicAsset1.setWidth(strComponentWidth);
    tfDynamicAsset2.setWidth(strComponentWidth);
    btnDynamicAsset.setIcon(new ThemeResource(Common.strAddIcon));
    btnDynamicAsset.setStyleName(Runo.BUTTON_LINK);
    btnAddOwner.setIcon(new ThemeResource(Common.strAddIcon));
    btnAddOwner.setStyleName(Runo.BUTTON_LINK);

    // for document
    btnAddLegalDoc.setIcon(new ThemeResource(Common.strAddIcon));
    btnAddNorDoc.setIcon(new ThemeResource(Common.strAddIcon));
    btnAddNorDoc.setStyleName(Runo.BUTTON_LINK);
    btnAddLegalDoc.setStyleName(Runo.BUTTON_LINK);

    // /for adjoin property and dimension
    btnAddAdjoinProperty.setIcon(new ThemeResource(Common.strAddIcon));
    btnAddAdjoinProperty.setStyleName(Runo.BUTTON_LINK);

    btnAddDimension.setIcon(new ThemeResource(Common.strAddIcon));
    btnAddDimension.setStyleName(Runo.BUTTON_LINK);

    btnAddGuideline.setStyleName(Runo.BUTTON_LINK);
    btnAddGuideline.setIcon(new ThemeResource(Common.strAddIcon));

    // for description of the property
    tfPostalAddress.setWidth(strComponentWidth);
    tfSiteNumber.setWidth(strComponentWidth);
    tfSFNumber.setWidth(strComponentWidth);
    tfNewSFNumber.setWidth(strComponentWidth);
    tfVillage.setWidth(strComponentWidth);
    tfTaluk.setWidth(strComponentWidth);
    tfDistCorpPanc.setWidth(strComponentWidth);
    tfLocationSketch.setWidth(strComponentWidth);
    tfProTaxReceipt.setWidth(strComponentWidth);
    tfElecServiceConnNo.setWidth(strComponentWidth);
    tfElecConnecName.setWidth(strComponentWidth);
    slHighMiddPoor.setWidth(strComponentWidth);
    slUrbanSemiRural.setWidth(strComponentWidth);
    slResiIndustCommer.setWidth(strComponentWidth);
    slProOccupiedBy.setWidth(strComponentWidth);
    tfMonthlyRent.setWidth(strComponentWidth);
    tfCoverUnderStatCentral.setWidth(strComponentWidth);
    tfAnyConversionLand.setWidth(strComponentWidth);
    tfExtentSite.setWidth(strComponentWidth);
    tfYearAcquistion.setWidth(strComponentWidth);
    tfPurchaseValue.setWidth(strComponentWidth);
    tfPropLandmark.setWidth(strComponentWidth);
    tfDynamicDescProp1.setWidth(strComponentWidth);
    tfDynamicDescProp2.setWidth(strComponentWidth);
    // for Charcteristics of the site
    slLocalClass.setWidth(strSplComponentWidth);
    slSurroundDevelop.setWidth(strSplComponentWidth);
    tfFlood.setWidth(strSplComponentWidth);
    slFeasibility.setWidth(strSplComponentWidth);
    slLandLevel.setWidth(strSplComponentWidth);
    slLandShape.setWidth(strSplComponentWidth);
    slTypeUse.setWidth(strSplComponentWidth);
    tfUsageRestriction.setWidth(strSplComponentWidth);
    slIsPlot.setWidth(strSplComponentWidth);
    tfApprveNo.setWidth(strSplComponentWidth);
    tfNoReason.setWidth(strSplComponentWidth);
    tfSubdivide.setWidth(strSplComponentWidth);
    slDrawApproval.setWidth(strSplComponentWidth);
    slCornerInter.setWidth(strSplComponentWidth);
    slRoadFacility.setWidth(strSplComponentWidth);
    slTypeRoad.setWidth(strSplComponentWidth);
    slRoadWidth.setWidth(strSplComponentWidth);
    slLandLock.setWidth(strSplComponentWidth);
    slWaterPotential.setWidth(strSplComponentWidth);
    slUnderSewerage.setWidth(strSplComponentWidth);
    slPowerSupply.setWidth(strSplComponentWidth);
    tfAdvantageSite.setWidth(strSplComponentWidth);
    tfDisadvantageSite.setWidth(strSplComponentWidth);
    tfGeneralRemarks.setWidth(strSplComponentWidth);
    tfDynamicCharacter1.setWidth(strSplComponentWidth);
    tfDynamicCharacter2.setWidth(strSplComponentWidth);

    // for land valuation
    tfAreaofLand.setWidth(strComponentWidth);
    tfNorthandSouth.setWidth(strComponentWidth);
    tfMarketRate.setWidth(strComponentWidth);
    tfGuiderate.setWidth(strComponentWidth);
    tfAdopetdMarketRate.setWidth(strComponentWidth);
    tfFairMarketRate.setWidth(strComponentWidth);
    tfGuidelineRate.setWidth(strComponentWidth);
    tfRealziableRate.setWidth(strComponentWidth);
    tfDistressRate.setWidth(strComponentWidth);
    tfDynamicValuation1.setWidth(strComponentWidth);
    tfDynamicValuation2.setWidth(strComponentWidth);

    // for details of plan approval
    tfLandandBuilding.setWidth(strComponentWidth);
    tfPlanApprovedBy.setWidth(strComponentWidth);
    dfLicenseFrom.setWidth(strComponentWidth);
    tfDynamicPlanApproval1.setWidth(strComponentWidth);
    slIsLicenceForced.setWidth(strComponentWidth);
    slAllApprovalRecved.setWidth(strComponentWidth);
    tfDynamicPlanApproval2.setWidth(strComponentWidth);

    tfLandMark.setWidth(strComponentWidth);
    tfPropertyAddress.setWidth(strComponentWidth);
    tfPropertyAddress.setHeight("130px");
    tfDynamicAsset1.setWidth(strComponentWidth);
    tfDynamicAsset2.setWidth(strComponentWidth);

    //set Null representation

    // TODO Auto-generated method stub
    tfEvaluationNumber.setNullRepresentation("");
    slBankBranch.setNullSelectionAllowed(false);
    tfEvaluationPurpose.setNullRepresentation("");
    tfValuatedBy.setNullRepresentation("");
    tfVerifiedBy.setNullRepresentation("");
    tfDynamicEvaluation1.setNullRepresentation("");
    tfDynamicEvaluation2.setNullRepresentation("");
    slSearchBankbranch.setNullSelectionAllowed(false);
    // for owner/asset
    tfCustomerName.setNullRepresentation("");
    slPropertyDesc.setNullSelectionAllowed(false);
    tfCustomerAddr.setNullRepresentation("");
    slPropertyDesc.setNullSelectionAllowed(false);

    tfLandMark.setNullRepresentation("");
    tfPropertyAddress.setNullRepresentation("");
    tfDynamicAsset1.setNullRepresentation("");
    tfDynamicAsset2.setNullRepresentation("");
    // for description of the property
    tfPostalAddress.setNullRepresentation("");
    tfSiteNumber.setNullRepresentation("");
    tfSFNumber.setNullRepresentation("");
    tfNewSFNumber.setNullRepresentation("");
    tfVillage.setNullRepresentation("");
    tfTaluk.setNullRepresentation("");
    tfDistCorpPanc.setNullRepresentation("");
    tfLocationSketch.setNullRepresentation("");
    tfProTaxReceipt.setNullRepresentation("");
    tfElecServiceConnNo.setNullRepresentation("");
    tfElecConnecName.setNullRepresentation("");
    slHighMiddPoor.setNullSelectionAllowed(false);
    slUrbanSemiRural.setNullSelectionAllowed(false);
    slResiIndustCommer.setNullSelectionAllowed(false);
    slProOccupiedBy.setNullSelectionAllowed(false);
    tfMonthlyRent.setNullRepresentation("");
    tfCoverUnderStatCentral.setNullRepresentation("");
    tfAnyConversionLand.setNullRepresentation("");
    tfExtentSite.setNullRepresentation("");
    tfYearAcquistion.setNullRepresentation("");
    tfPurchaseValue.setNullRepresentation("");
    tfPropLandmark.setNullRepresentation("");
    tfDynamicDescProp1.setNullRepresentation("");
    tfDynamicDescProp2.setNullRepresentation("");
    // for Charcteristics of the site
    slLocalClass.setNullSelectionAllowed(false);
    slSurroundDevelop.setNullSelectionAllowed(false);
    tfFlood.setNullRepresentation("");
    slFeasibility.setNullSelectionAllowed(false);
    slLandLevel.setNullSelectionAllowed(false);
    slLandShape.setNullSelectionAllowed(false);
    slTypeUse.setNullSelectionAllowed(false);
    tfUsageRestriction.setNullRepresentation("");
    slIsPlot.setNullSelectionAllowed(false);
    tfApprveNo.setNullRepresentation("");
    tfNoReason.setNullRepresentation("");
    tfSubdivide.setNullRepresentation("");
    slDrawApproval.setNullSelectionAllowed(false);
    slCornerInter.setNullSelectionAllowed(false);
    slRoadFacility.setNullSelectionAllowed(false);
    slTypeRoad.setNullSelectionAllowed(false);
    slRoadWidth.setNullSelectionAllowed(false);
    slLandLock.setNullSelectionAllowed(false);
    slWaterPotential.setNullSelectionAllowed(false);
    slUnderSewerage.setNullSelectionAllowed(false);
    slPowerSupply.setNullSelectionAllowed(false);
    tfAdvantageSite.setNullRepresentation("");
    tfDisadvantageSite.setNullRepresentation("");
    tfGeneralRemarks.setNullRepresentation("");
    tfDynamicCharacter1.setNullRepresentation("");
    tfDynamicCharacter2.setNullRepresentation("");

    // for land valuation
    tfAreaofLand.setNullRepresentation("");
    tfNorthandSouth.setNullRepresentation("");
    tfMarketRate.setNullRepresentation("");
    tfGuiderate.setNullRepresentation("");
    tfAdopetdMarketRate.setNullRepresentation("");
    tfFairMarketRate.setNullRepresentation("");
    tfGuidelineRate.setNullRepresentation("");
    tfRealziableRate.setNullRepresentation("");
    tfDistressRate.setNullRepresentation("");
    tfDynamicValuation1.setNullRepresentation("");
    tfDynamicValuation2.setNullRepresentation("");

    // for details of plan approval
    tfLandandBuilding.setNullRepresentation("");
    tfPlanApprovedBy.setNullRepresentation("");
    dfLicenseFrom.setNullRepresentation("");
    tfDynamicPlanApproval1.setNullRepresentation("");
    slIsLicenceForced.setNullSelectionAllowed(false);
    slAllApprovalRecved.setNullSelectionAllowed(false);
    tfDynamicPlanApproval2.setNullRepresentation("");

    tfLandMark.setNullRepresentation("");
    tfPropertyAddress.setNullRepresentation("");
    tfDynamicAsset1.setNullRepresentation("");
    tfDynamicAsset2.setNullRepresentation("");
}