List of usage examples for com.vaadin.server ThemeResource ThemeResource
public ThemeResource(String resourceId)
From source file:com.gnts.pem.txn.sbi.SBILand.java
@Override public void buttonClick(ClickEvent event) { notifications.close();// ww w. j a va2s. 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(" > 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(" > 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); btnCancel.setVisible(false); btnSubmit.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(" <b>" + screenName + "</b> :: 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 (btnAddGuideline == event.getButton()) { layoutGuideline.addComponent(new ComponentIterGuideline("", "", "", "")); } 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 (btnDynamicAsset == event.getButton()) { strSelectedPanel = "3"; showSubWindow(); } if (btnDynamicPlanApproval == event.getButton()) { strSelectedPanel = "6"; showSubWindow(); } if (btnDynamicDescProp == event.getButton()) { strSelectedPanel = "8"; showSubWindow(); } if (btnDynamicCharacter == event.getButton()) { strSelectedPanel = "9"; showSubWindow(); } if (btnDynamicValuation == 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(" <b>" + screenName + "</b> :: Search"); lblNotificationIcon.setIcon(null); lblSaveNotification.setValue(""); lblFormTittle.setVisible(true); hlBreadCrumbs.setVisible(false); lblAddEdit.setVisible(false); btnView.setEnabled(false); } /*else if (btnView == event.getButton()) { StreamResource sr = getPDFStream(); FileDownloader fileDownloader = new FileDownloader(sr); fileDownloader.extend(btnView); } */ 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("6")) { if (tfDynamicPlanApproval1.isVisible()) { tfDynamicPlanApproval2.setCaption(tfCaption.getValue()); tfDynamicPlanApproval2.setVisible(true); } else { tfDynamicPlanApproval1.setCaption(tfCaption.getValue()); tfDynamicPlanApproval1.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 (tfDynamicValuation1.isVisible()) { tfDynamicValuation2.setCaption(tfCaption.getValue()); tfDynamicValuation2.setVisible(true); } else { tfDynamicValuation1.setCaption(tfCaption.getValue()); tfDynamicValuation1.setVisible(true); } } } mywindow.close(); } }
From source file:com.gnts.pem.txn.synd.SyndBuilding.java
License:Open Source License
@SuppressWarnings("deprecation") void populateAndConfig(boolean search) { try {/*from ww w .j av a 2 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) tfSearchBankbranch.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.synd.SyndBuilding.java
License:Open Source License
private void updateEvaluationDetails() { try {/* w ww . j a va2s .c o m*/ boolean valid = false; TPemCmEvalDetails evalobj = new TPemCmEvalDetails(); evalNumber = tfEvaluationNumber.getValue(); customer = tfCustomerName.getValue(); propertyType = "BUILDING"; 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.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) tfBankBranch.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()); } try { BigDecimal totalAbstract = new BigDecimal(0.00); BigDecimal test = new BigDecimal("0.00"); BigDecimal test1 = new BigDecimal("0.00"); BigDecimal test2 = new BigDecimal("0.00"); BigDecimal test3 = new BigDecimal("0.00"); BigDecimal test4 = new BigDecimal("0.00"); BigDecimal test5 = new BigDecimal("0.00"); try { test = new BigDecimal( uiflowdata.getTotalExtraItem().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test = new BigDecimal("0.00"); } try { test1 = new BigDecimal( tfFairMarketRate.getValue().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test1 = new BigDecimal("0.00"); } try { test2 = new BigDecimal( uiflowdata.getTotalAdditional().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test2 = new BigDecimal("0.00"); } try { test3 = new BigDecimal( uiflowdata.getTotalMiscellaneous().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test3 = new BigDecimal("0.00"); } try { test4 = new BigDecimal( uiflowdata.getTotalServices().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test4 = new BigDecimal("0.00"); } try { test5 = new BigDecimal( uiflowdata.getTotalValuation().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test5 = new BigDecimal("0.00"); } totalAbstract = totalAbstract.add(test).add(test1).add(test2).add(test3).add(test4).add(test5); uiflowdata.setTotalAbstractvalue(XMLUtil.IndianFormat(new BigDecimal(totalAbstract.toString()))); String numberOnly = totalAbstract.toString().replaceAll("[^\\d.]", ""); if (numberOnly.trim().length() == 0) { numberOnly = "0"; } evalobj.setPropertyValue(Double.valueOf(numberOnly)); uiflowdata.setEvalDtls(evalobj); uiflowdata.setAmountInWords(beanEvaluation.getAmountInWords(numberOnly)); if (tfEvaluationNumber.isValid() && tfBankBranch.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) { } } 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.synd.SyndBuilding.java
License:Open Source License
private void saveEvaluationDetails() { uiflowdata = new UIFlowData(); // for save evaluation details boolean valid = false; try {/* w w w . jav a 2 s . c o m*/ TPemCmEvalDetails evalobj = new TPemCmEvalDetails(); evalobj.setDocId(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) tfBankBranch.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.setCustomLbl2(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 { saveRoofHeightDetails(); } catch (Exception e) { } try { saveMatchingBoundaries(); } catch (Exception e) { } try { saveNoofRooms(); } catch (Exception e) { } try { saveNoofFloors(); } catch (Exception e) { } try { saveTenureOccupayDetails(); } catch (Exception e) { } try { saveBuildTechDetails(); } catch (Exception e) { } try { savePlinthAreaDetails(); } catch (Exception e) { } try { saveBuildSpecDetails(); } catch (Exception e) { } try { saveValuationDetails(); } catch (Exception e) { } try { saveExtraItemsDetails(); } catch (Exception e) { } try { saveAdditionalDetails(); } catch (Exception e) { } try { saveMiscellaneousDetails(); } catch (Exception e) { } try { saveServiceDetails(); } catch (Exception e) { } try { saveConstructionDetails(); } catch (Exception e) { } try { saveViolationDetails(); } catch (Exception e) { } try { saveGuidelineValue(); } catch (Exception e) { } try { saveGuidelineReferenceDetails(); } catch (Exception e) { } try { savePlanApprovalDetails(); } catch (Exception e) { } try { uiflowdata.setPropertyAddress(tfPropertyAddress.getValue()); uiflowdata.setBankBranch((String) tfBankBranch.getValue()); uiflowdata.setEvalnumber(tfEvaluationNumber.getValue()); uiflowdata.setCustomername(tfCustomerName.getValue()); if (dfDateofValuation.getValue() != null) { SimpleDateFormat dt1 = new SimpleDateFormat("dd-MMM-yyyy"); uiflowdata.setInspectionDate(dt1.format(dfDateofValuation.getValue())); } BigDecimal site = new BigDecimal(0.00); BigDecimal fair = new BigDecimal(1.00); BigDecimal salbale = new BigDecimal(435.60); try { site = new BigDecimal(tfSiteArea.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.]", ""))); tfSiteArea.setValue(site.toString() + " sft (or) " + site.divide(salbale, 2, RoundingMode.HALF_UP).toPlainString() + " cents"); tfSalableArea.setValue(site.toString() + " sft (or) " + site.divide(salbale, 2, RoundingMode.HALF_UP).toPlainString() + " cents"); 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) { } try { saveAreaDetailsofProperty(); } catch (Exception e) { } try { saveValuationofLandDetails(); } catch (Exception e) { } uiflowdata.setPropDesc((String) slPropertyDesc.getValue()); uiflowdata.setMarketValue(XMLUtil.IndianFormat(new BigDecimal( tfFairMarketRate.getValue().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")))); uiflowdata.setGuidelinevalue(XMLUtil.IndianFormat(new BigDecimal(tfGuidelineRate.getValue()))); } catch (Exception e) { } try { BigDecimal totalAbstract = new BigDecimal(0.00); BigDecimal test = new BigDecimal("0.00"); BigDecimal test1 = new BigDecimal("0.00"); BigDecimal test2 = new BigDecimal("0.00"); BigDecimal test3 = new BigDecimal("0.00"); BigDecimal test4 = new BigDecimal("0.00"); BigDecimal test5 = new BigDecimal("0.00"); try { test = new BigDecimal( uiflowdata.getTotalExtraItem().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test = new BigDecimal("0.00"); } try { test1 = new BigDecimal( tfFairMarketRate.getValue().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test1 = new BigDecimal("0.00"); } try { test2 = new BigDecimal( uiflowdata.getTotalAdditional().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test2 = new BigDecimal("0.00"); } try { test3 = new BigDecimal( uiflowdata.getTotalMiscellaneous().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test3 = new BigDecimal("0.00"); } try { test4 = new BigDecimal( uiflowdata.getTotalServices().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test4 = new BigDecimal("0.00"); } try { test5 = new BigDecimal( uiflowdata.getTotalValuation().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test5 = new BigDecimal("0.00"); } totalAbstract = totalAbstract.add(test).add(test1).add(test2).add(test3).add(test4).add(test5); uiflowdata.setTotalAbstractvalue(XMLUtil.IndianFormat(new BigDecimal(totalAbstract.toString()))); String numberOnly = totalAbstract.toString().replaceAll("[^\\d.]", ""); uiflowdata.setAmountInWords(beanEvaluation.getAmountInWords(numberOnly)); String numberOnly1 = tfGuidelineRate.getValue().replaceAll("[^0-9]", ""); uiflowdata.setAmountWordsGuideline(beanEvaluation.getAmountInWords(numberOnly1)); //bill 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( uiflowdata.getTotalAbstractvalue().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { real = new BigDecimal("0.00"); } try { distre = new BigDecimal( uiflowdata.getTotalAbstractvalue().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 { savePropertyValueDetails(); } catch (Exception e) { } evalNumber = tfEvaluationNumber.getValue(); customer = tfCustomerName.getValue().replace("\\s+", " ").replaceAll("[-+/^:,]", ""); ; propertyType = "BUILDING"; ByteArrayOutputStream recvstram = XMLUtil.doMarshall(uiflowdata); XMLUtil.getWordDocument(recvstram, evalNumber + "_" + customer + "_" + propertyType, strXslFile); if (tfEvaluationNumber.isValid() && tfBankBranch.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.synd.SyndBuilding.java
License:Open Source License
@SuppressWarnings("deprecation") void setComponentStyle() { tfSearchBankbranch.setNullSelectionAllowed(false); tfSearchBankbranch.setInputPrompt(Common.SELECT_PROMPT); tfSearchCustomer.setInputPrompt("Enter Customer"); tfSearchEvalNumber.setInputPrompt("Enter Evaluation Number"); tfEvaluationNumber.setWidth(strComponentWidth); tfBankBranch.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);/*from w w w . j a va 2 s . c om*/ dfDateofValuation.setResolution(PopupDateField.RESOLUTION_DAY); dfDateofValuation.setDateFormat("dd-MMM-yyyy"); dfVerifiedDate.setResolution(PopupDateField.RESOLUTION_DAY); dfVerifiedDate.setDateFormat("dd-MMM-yyyy"); tfCustomerName.setWidth(strComponentWidth); slPropertyDesc.setWidth(strComponentWidth); tfCustomerAddr.setWidth(strComponentWidth); tfCustomerAddr.setHeight("150px"); slPropertyDesc.setNullSelectionAllowed(false); //for matching boundary slMatchingBoundary.setWidth(strComponentWidth); slPlotDemarcated.setWidth(strComponentWidth); slApproveLandUse.setWidth(strComponentWidth); slTypeofProperty.setWidth(strComponentWidth); tfDynamicmatching1.setWidth(strComponentWidth); tfDynamicmatching2.setWidth(strComponentWidth); //room tfNoofRooms.setWidth(strComponentWidth); tfLivingDining.setWidth(strComponentWidth); tfBedRooms.setWidth(strComponentWidth); tfKitchen.setWidth(strComponentWidth); tfToilets.setWidth(strComponentWidth); tfDynamicRooms1.setWidth(strComponentWidth); tfDynamicRooms2.setWidth(strComponentWidth); //floor tfTotNoofFloors.setWidth(strComponentWidth); tfPropertyLocated.setWidth(strComponentWidth); tfApproxAgeofBuilding.setWidth(strComponentWidth); tfResidualAgeofBuilding.setWidth(strComponentWidth); slTypeofStructure.setWidth(strComponentWidth); tfDynamicFloors1.setWidth(strComponentWidth); tfDynamicFloors2.setWidth(strComponentWidth); //tenure/occupancy tfStatusofTenure.setWidth(strComponentWidth); slOwnedorRent.setWidth(strComponentWidth); tfNoOfYears.setWidth(strComponentWidth); tfRelationship.setWidth(strComponentWidth); tfDynamicTenure1.setWidth(strComponentWidth); tfDynamicTenure2.setWidth(strComponentWidth); //for area details tfSiteArea.setWidth(strComponentWidth); tfPlinthArea.setWidth(strComponentWidth); tfCarpetArea.setWidth(strComponentWidth); tfSalableArea.setWidth(strComponentWidth); tfRemarks.setWidth(strComponentWidth); tfRemarks.setHeight("95px"); tfDynamicAreaDetail1.setWidth(strComponentWidth); tfDynamicAreaDetail2.setWidth(strComponentWidth); //for construction details slTypeProperty.setWidth(strComponentWidth); slTypeStructure.setWidth(strComponentWidth); tfYearConstruction.setWidth(strComponentWidth); tfNoFloors.setWidth(strComponentWidth); slExterior.setWidth(strComponentWidth); slInterior.setWidth(strComponentWidth); tfLifeAge.setWidth(strComponentWidth); tfFutureLife.setWidth(strComponentWidth); tfDetailsPlan.setWidth(strComponentWidth); slDeviation.setWidth(strComponentWidth); tfDtlsDeviation.setWidth(strComponentWidth); tfDynamicConstval1.setWidth(strComponentWidth); tfDynamicConstval2.setWidth(strComponentWidth); //for land valuation tfAreaofLand.setWidth(strComponentWidth); tfNorthandSouth.setWidth(strComponentWidth); tfMarketRate.setWidth(strComponentWidth); tfAdopetdMarketRate.setWidth(strComponentWidth); tfFairMarketRate.setWidth(strComponentWidth); tfGuidelineRate.setWidth(strComponentWidth); tfRealziableRate.setWidth(strComponentWidth); tfDistressRate.setWidth(strComponentWidth); tfDynamicValuation1.setWidth(strComponentWidth); tfDynamicValuation2.setWidth(strComponentWidth); tfOwnerName.setWidth(strComponentWidth); tfOwnerAddress.setWidth(strComponentWidth); tfOwnerAddress.setHeight("150px"); tfLandMark.setWidth(strComponentWidth); tfPropertyAddress.setWidth(strComponentWidth); tfPropertyAddress.setHeight("130px"); tfDynamicAsset1.setWidth(strComponentWidth); tfDynamicAsset2.setWidth(strComponentWidth); tfZone.setWidth(strComponentWidth); tfSRO.setWidth(strComponentWidth); tfVillage.setWidth(strComponentWidth); tfRevnueDist.setWidth(strComponentWidth); tfTalukName.setWidth(strComponentWidth); tfStreetName.setWidth(strComponentWidth); slStreetSerNo.setWidth(strComponentWidth); slStreetSerNo.setHeight("25"); tfStreetName.setHeight("25"); tfGuidelineValue.setWidth(strComponentWidth); tfGuidelineValueMatric.setWidth(strComponentWidth); slClassification.setWidth(strComponentWidth); lblParticular.setWidth(strWidth); lblPlinthArea.setWidth(strLblWidth); lblRoofHt.setWidth(strLblWidth); lblBuildAge.setWidth(strWidth); lblRate.setWidth(strWidth); lblReplace.setWidth(strWidth); lblDepreciation.setWidth(strWidth); lblNetvalue.setWidth(strWidth); //for construction tfStageofConst.setWidth(strComponentWidth); tfDynamicConstruction1.setWidth(strComponentWidth); tfDynamicConstruction2.setWidth(strComponentWidth); //for violation tfAnyViolation.setWidth(strComponentWidth); tfDynamicViolation1.setWidth(strComponentWidth); tfDynamicViolation2.setWidth(strComponentWidth); //for construction tfStageofConst.setNullRepresentation(""); tfDynamicConstruction1.setNullRepresentation(""); tfDynamicConstruction2.setNullRepresentation(""); //for violation tfAnyViolation.setNullRepresentation(""); tfDynamicViolation1.setNullRepresentation(""); tfDynamicViolation2.setNullRepresentation(""); // for details of plan approval slLandandBuilding.setHeight("25"); slBuilding.setHeight("25"); tfBuilding.setHeight("25"); tfLandandBuilding.setHeight("25"); tfLandandBuilding.setWidth(strComponentWidth); tfBuilding.setWidth(strComponentWidth); slLandandBuilding.setWidth(strComponentWidth); slBuilding.setWidth(strComponentWidth); tfPlanApprovedBy.setWidth(strComponentWidth); dfLicenseFrom.setWidth(strComponentWidth); tfDynamicPlanApproval1.setWidth(strComponentWidth); slIsLicenceForced.setWidth(strComponentWidth); slAllApprovalRecved.setWidth(strComponentWidth); slConstAsperAppPlan.setWidth(strComponentWidth); tfDynamicPlanApproval2.setWidth(strComponentWidth); slLandandBuilding.setNullSelectionAllowed(false); tfLandandBuilding.setNullRepresentation(""); tfBuilding.setNullRepresentation(""); slBuilding.setNullSelectionAllowed(false); tfPlanApprovedBy.setNullRepresentation(""); tfDynamicPlanApproval1.setNullRepresentation(""); slIsLicenceForced.setNullSelectionAllowed(false); slAllApprovalRecved.setNullSelectionAllowed(false); slConstAsperAppPlan.setNullSelectionAllowed(false); tfDynamicPlanApproval2.setNullRepresentation(""); dfLicenseFrom.setNullRepresentation(""); tfEvaluationNumber.setNullRepresentation(""); tfBankBranch.setNullSelectionAllowed(false); tfEvaluationPurpose.setNullRepresentation(""); tfValuatedBy.setNullRepresentation(""); tfVerifiedBy.setNullRepresentation(""); tfDynamicEvaluation1.setNullRepresentation(""); tfDynamicEvaluation2.setNullRepresentation(""); tfCustomerName.setNullRepresentation(""); slPropertyDesc.setNullSelectionAllowed(false); tfCustomerAddr.setNullRepresentation(""); tfCustomerAddr.setHeight("130px"); slPropertyDesc.setNullSelectionAllowed(false); //for matching boundary slMatchingBoundary.setNullSelectionAllowed(false); slPlotDemarcated.setNullSelectionAllowed(false); slApproveLandUse.setNullSelectionAllowed(false); slTypeofProperty.setNullSelectionAllowed(false); tfDynamicmatching1.setNullRepresentation(""); tfDynamicmatching2.setNullRepresentation(""); //room tfNoofRooms.setNullRepresentation(""); tfLivingDining.setNullRepresentation(""); tfBedRooms.setNullRepresentation(""); tfKitchen.setNullRepresentation(""); tfToilets.setNullRepresentation(""); tfDynamicRooms1.setNullRepresentation(""); tfDynamicRooms2.setNullRepresentation(""); //floor tfTotNoofFloors.setNullRepresentation(""); tfPropertyLocated.setNullRepresentation(""); tfApproxAgeofBuilding.setNullRepresentation(""); tfResidualAgeofBuilding.setNullRepresentation(""); slTypeofStructure.setNullSelectionAllowed(false); tfDynamicFloors1.setNullRepresentation(""); tfDynamicFloors2.setNullRepresentation(""); //tenure/occupancy tfStatusofTenure.setNullRepresentation(""); slOwnedorRent.setNullSelectionAllowed(false); tfNoOfYears.setNullRepresentation(""); tfRelationship.setNullRepresentation(""); tfDynamicTenure1.setNullRepresentation(""); tfDynamicTenure2.setNullRepresentation(""); //for area details tfSiteArea.setNullRepresentation(""); tfPlinthArea.setNullRepresentation(""); tfCarpetArea.setNullRepresentation(""); tfSalableArea.setNullRepresentation(""); tfRemarks.setNullRepresentation(""); tfDynamicAreaDetail1.setNullRepresentation(""); tfDynamicAreaDetail2.setNullRepresentation(""); //for construction details slTypeProperty.setNullSelectionAllowed(false); slTypeStructure.setNullSelectionAllowed(false); tfYearConstruction.setNullRepresentation(""); tfNoFloors.setNullRepresentation(""); slExterior.setNullSelectionAllowed(false); slInterior.setNullSelectionAllowed(false); tfLifeAge.setNullRepresentation(""); tfFutureLife.setNullRepresentation(""); tfDetailsPlan.setNullRepresentation(""); slDeviation.setNullSelectionAllowed(false); tfDtlsDeviation.setNullRepresentation(""); tfDynamicConstval1.setNullRepresentation(""); tfDynamicConstval2.setNullRepresentation(""); //for land valuation tfAreaofLand.setNullRepresentation(""); tfNorthandSouth.setNullRepresentation(""); tfMarketRate.setNullRepresentation(""); tfAdopetdMarketRate.setNullRepresentation(""); tfFairMarketRate.setNullRepresentation(""); tfGuidelineRate.setNullRepresentation(""); tfRealziableRate.setNullRepresentation(""); tfDistressRate.setNullRepresentation(""); tfDynamicValuation1.setNullRepresentation(""); tfDynamicValuation2.setNullRepresentation(""); tfOwnerName.setNullRepresentation(""); tfOwnerAddress.setNullRepresentation(""); tfOwnerAddress.setHeight("150px"); tfLandMark.setNullRepresentation(""); tfPropertyAddress.setNullRepresentation(""); tfPropertyAddress.setHeight("130px"); tfDynamicAsset1.setNullRepresentation(""); tfDynamicAsset2.setNullRepresentation(""); tfZone.setNullRepresentation(""); tfSRO.setNullRepresentation(""); tfVillage.setNullRepresentation(""); tfRevnueDist.setNullRepresentation(""); tfTalukName.setNullRepresentation(""); tfStreetName.setNullRepresentation(""); tfGuidelineValue.setNullRepresentation(""); tfGuidelineValueMatric.setNullRepresentation(""); slClassification.setNullRepresentation(""); // for dynamic btnDynamicEvaluation1.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicEvaluation1.setStyleName(Runo.BUTTON_LINK); btnDynamicPlanApproval.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicPlanApproval.setStyleName(Runo.BUTTON_LINK); btnDynamicCustomer.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicCustomer.setStyleName(Runo.BUTTON_LINK); btnDynamicAsset.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicAsset.setStyleName(Runo.BUTTON_LINK); btnAddLegalDoc.setIcon(new ThemeResource(Common.strAddIcon)); btnAddNorDoc.setIcon(new ThemeResource(Common.strAddIcon)); btnAddNorDoc.setStyleName(Runo.BUTTON_LINK); btnAddLegalDoc.setStyleName(Runo.BUTTON_LINK); btnAddAdjoinProperty.setIcon(new ThemeResource(Common.strAddIcon)); btnAddAdjoinProperty.setStyleName(Runo.BUTTON_LINK); btnAddDimension.setIcon(new ThemeResource(Common.strAddIcon)); btnAddDimension.setStyleName(Runo.BUTTON_LINK); btnAddPlinth.setIcon(new ThemeResource(Common.strAddIcon)); btnAddPlinth.setStyleName(Runo.BUTTON_LINK); btnAddRoofHt.setIcon(new ThemeResource(Common.strAddIcon)); btnAddRoofHt.setStyleName(Runo.BUTTON_LINK); btnDynamicTenure.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicTenure.setStyleName(Runo.BUTTON_LINK); btnDynamicmatching.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicmatching.setStyleName(Runo.BUTTON_LINK); btnDynamicRooms.setStyleName(Runo.BUTTON_LINK); btnDynamicRooms.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicFloor.setStyleName(Runo.BUTTON_LINK); btnDynamicFloor.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicConstruction.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicConstruction.setStyleName(Runo.BUTTON_LINK); btnDynamicViolation.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicViolation.setStyleName(Runo.BUTTON_LINK); btnDynamicAreaDetail.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicAreaDetail.setStyleName(Runo.BUTTON_LINK); btnDynamicConstVal.setStyleName(Runo.BUTTON_LINK); btnDynamicConstVal.setIcon(new ThemeResource(Common.strAddIcon)); btnAddOwner.setIcon(new ThemeResource(Common.strAddIcon)); btnAddOwner.setStyleName(Runo.BUTTON_LINK); btnAddBuildSpec.setStyleName(Runo.BUTTON_LINK); btnAddBuildSpec.setIcon(new ThemeResource(Common.strAddIcon)); btnAddValDtls.setStyleName(Runo.BUTTON_LINK); btnAddValDtls.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicExtra.setStyleName(Runo.BUTTON_LINK); btnDynamicExtra.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicAdditional.setStyleName(Runo.BUTTON_LINK); btnDynamicAdditional.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicMiscell.setStyleName(Runo.BUTTON_LINK); btnDynamicMiscell.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicServices.setStyleName(Runo.BUTTON_LINK); btnDynamicServices.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicValuation.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicValuation.setStyleName(Runo.BUTTON_LINK); btnAddGuideline.setStyleName(Runo.BUTTON_LINK); btnAddGuideline.setIcon(new ThemeResource(Common.strAddIcon)); tfStatusofTenure.setValue(Common.strNA); tfRelationship.setValue(Common.strNA); tfPlinthArea.setValue(Common.strNil); tfCarpetArea.setValue(Common.strNil); tfRemarks.setValue(Common.strNil); }
From source file:com.gnts.pem.txn.synd.SyndBuilding.java
License:Open Source License
public void buttonClick(ClickEvent event) { notifications.close();/*from www .jav a 2s . co m*/ if (btnAddNorDoc == event.getButton()) { panelNormalDocumentDetails.addComponent(new ComponentIteratorNormlDoc(null, null, "", "")); } if (btnDynamicExtra == event.getButton()) { layoutExtraItems.addComponent(new ComponentIterExtraItems(null, "")); } if (btnDynamicAdditional == event.getButton()) { layoutAdditionItem.addComponent(new ComponentIterAdditionalItems(null, "")); } if (btnDynamicMiscell == event.getButton()) { layoutMiscellaneous.addComponent(new ComponentIterMiscellaneous(null, "")); } if (btnDynamicServices == event.getButton()) { layoutServices.addComponent(new ComponentIerServices(null, "")); } if (btnAddOwner == event.getButton()) { layoutOwnerDetails1.addComponent(new ComponentIterOwnerDetails("", "")); } if (btnAddPlinth == event.getButton()) { layoutPlintharea.addComponent(new ComponentIterPlinthArea("", "", "")); } if (btnAddGuideline == event.getButton()) { layoutGuideline.addComponent(new ComponentIterGuideline("", "", "", "")); } if (btnAddLegalDoc == event.getButton()) { panelLegalDocumentDetails.addComponent(new ComponentIteratorLegalDoc("", "", null)); } if (btnAddAdjoinProperty == event.getButton()) { panelAdjoinProperties.addComponent(new ComponentIteratorAdjoinProperty(null, true, true, true)); } if (btnAddDimension == event.getButton()) { panelDimension.addComponent(new ComponentIterDimensionofPlot(null, true, true, true)); } if (btnAddRoofHt == event.getButton()) { layoutRoofHeight.addComponent(new ComponentIterRoofHeight("", "")); } 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"); resetAllFieldsFields(); lblAddEdit.setValue(" > Add New"); lblAddEdit.setVisible(true); lblFormTittle.setVisible(false); hlBreadCrumbs.setVisible(true); } if (btnAddBuildSpec == event.getButton()) { panelBuildSpecfication.addComponent(new ComponentIterBuildingSpecfication(null, true, true, true)); } if (btnAddValDtls == event.getButton()) { ValuationDetailsList obj = new ValuationDetailsList(); layoutValuationDetails.addComponent(new ComponenetIterValuationDetails(obj)); } 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(" > Modify"); lblAddEdit.setVisible(true); lblFormTittle.setVisible(false); hlBreadCrumbs.setVisible(true); } if (btnDynamicEvaluation1 == event.getButton()) { strSelectedPanel = "1"; showSubWindow(); } if (btnDynamicCustomer == event.getButton()) { strSelectedPanel = "2"; showSubWindow(); } if (btnDynamicAsset == event.getButton()) { strSelectedPanel = "3"; showSubWindow(); } if (btnDynamicTenure == event.getButton()) { strSelectedPanel = "4"; showSubWindow(); } if (btnDynamicmatching == event.getButton()) { strSelectedPanel = "5"; showSubWindow(); } if (btnDynamicAreaDetail == event.getButton()) { strSelectedPanel = "8"; showSubWindow(); } if (btnDynamicValuation == event.getButton()) { strSelectedPanel = "9"; showSubWindow(); } if (btnDynamicRooms == event.getButton()) { strSelectedPanel = "10"; showSubWindow(); } if (btnDynamicFloor == event.getButton()) { strSelectedPanel = "11"; showSubWindow(); } if (btnDynamicConstVal == event.getButton()) { strSelectedPanel = "12"; showSubWindow(); } if (btnDynamicPlanApproval == event.getButton()) { strSelectedPanel = "13"; showSubWindow(); } if (btnDynamicConstruction == event.getButton()) { strSelectedPanel = "14"; showSubWindow(); } if (btnDynamicViolation == event.getButton()) { strSelectedPanel = "15"; showSubWindow(); } 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("2")) { if (tfDynamicCustomer1.isVisible()) { tfDynamicCustomer2.setCaption(tfCaption.getValue()); tfDynamicCustomer2.setVisible(true); } else { tfDynamicCustomer1.setCaption(tfCaption.getValue()); tfDynamicCustomer1.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 (tfDynamicTenure1.isVisible()) { tfDynamicTenure2.setCaption(tfCaption.getValue()); tfDynamicTenure2.setVisible(true); } else { tfDynamicTenure1.setCaption(tfCaption.getValue()); tfDynamicTenure1.setVisible(true); } } else if (strSelectedPanel.equals("5")) { if (tfDynamicmatching1.isVisible()) { tfDynamicmatching2.setCaption(tfCaption.getValue()); tfDynamicmatching2.setVisible(true); } else { tfDynamicmatching1.setCaption(tfCaption.getValue()); tfDynamicmatching1.setVisible(true); } } else if (strSelectedPanel.equals("8")) { if (tfDynamicAreaDetail1.isVisible()) { tfDynamicAreaDetail2.setCaption(tfCaption.getValue()); tfDynamicAreaDetail2.setVisible(true); } else { tfDynamicAreaDetail1.setCaption(tfCaption.getValue()); tfDynamicAreaDetail1.setVisible(true); } } else if (strSelectedPanel.equals("9")) { if (tfDynamicValuation1.isVisible()) { tfDynamicValuation2.setCaption(tfCaption.getValue()); tfDynamicValuation2.setVisible(true); } else { tfDynamicValuation1.setCaption(tfCaption.getValue()); tfDynamicValuation1.setVisible(true); } } else if (strSelectedPanel.equals("10")) { if (tfDynamicRooms1.isVisible()) { tfDynamicRooms2.setCaption(tfCaption.getValue()); tfDynamicRooms2.setVisible(true); } else { tfDynamicRooms1.setCaption(tfCaption.getValue()); tfDynamicRooms1.setVisible(true); } } else if (strSelectedPanel.equals("11")) { if (tfDynamicFloors1.isVisible()) { tfDynamicFloors2.setCaption(tfCaption.getValue()); tfDynamicFloors2.setVisible(true); } else { tfDynamicFloors1.setCaption(tfCaption.getValue()); tfDynamicFloors1.setVisible(true); } } else if (strSelectedPanel.equals("12")) { if (tfDynamicConstval1.isVisible()) { tfDynamicConstval2.setCaption(tfCaption.getValue()); tfDynamicConstval2.setVisible(true); } else { tfDynamicConstval1.setCaption(tfCaption.getValue()); tfDynamicConstval1.setVisible(true); } } else if (strSelectedPanel.equals("13")) { if (tfDynamicPlanApproval1.isVisible()) { tfDynamicPlanApproval2.setCaption(tfCaption.getValue()); tfDynamicPlanApproval2.setVisible(true); } else { tfDynamicPlanApproval1.setCaption(tfCaption.getValue()); tfDynamicPlanApproval1.setVisible(true); } } else if (strSelectedPanel.equals("14")) { if (tfDynamicConstruction1.isVisible()) { tfDynamicConstruction2.setCaption(tfCaption.getValue()); tfDynamicConstruction2.setVisible(true); } else { tfDynamicConstruction1.setCaption(tfCaption.getValue()); tfDynamicConstruction1.setVisible(true); } } else if (strSelectedPanel.equals("15")) { if (tfDynamicViolation1.isVisible()) { tfDynamicViolation2.setCaption(tfCaption.getValue()); tfDynamicViolation2.setVisible(true); } else { tfDynamicViolation1.setCaption(tfCaption.getValue()); tfDynamicViolation1.setVisible(true); } } } mywindow.close(); } if (btnSave == event.getButton()) { setComponentError(); if (tfEvaluationNumber.isValid() && tfBankBranch.isValid() && tfEvaluationPurpose.isValid() && dfDateofValuation.isValid()) { saveEvaluationDetails(); } //btnSave.setVisible(false); } if (btnSubmit == event.getButton()) { setComponentError(); if (tfEvaluationNumber.isValid() && tfBankBranch.isValid() && tfEvaluationPurpose.isValid() && dfDateofValuation.isValid()) { saveEvaluationDetails(); updateEvaluationDetails(); btnSubmit.setEnabled(false); btnSave.setEnabled(false); } // saveExcel.setVisible(true); } if (btnCancel == event.getButton()) { btnSave.setVisible(false); btnCancel.setVisible(false); //saveExcel.setVisible(false); btnSubmit.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(" <b>" + screenName + "</b> :: 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 (btnBack == event.getButton()) { resetFields(); 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(" <b>" + screenName + "</b> :: Search"); lblNotificationIcon.setIcon(null); lblSaveNotification.setValue(""); lblFormTittle.setVisible(true); hlBreadCrumbs.setVisible(false); lblAddEdit.setVisible(false); btnView.setEnabled(false); } /* else if (btnView == event.getButton()) { StreamResource sr = getPDFStream(); FileDownloader fileDownloader = new FileDownloader(sr); fileDownloader.extend(btnView); }*/ 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(); } if (btnReset == event.getButton()) { tfSearchEvalNumber.setValue(""); tfSearchCustomer.setValue(""); dfSearchEvalDate.setValue(null); tfSearchBankbranch.setValue(null); populateAndConfig(false); } }
From source file:com.gnts.pem.txn.synd.SyndConstruction.java
License:Open Source License
@SuppressWarnings("deprecation") void populateAndConfig(boolean search) { try {/*from w ww. ja va2 s. c om*/ 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) tfSearchBankbranch.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.synd.SyndConstruction.java
License:Open Source License
private void updateEvaluationDetails() { try {//from ww w . j a v a2 s .co m boolean valid = false; TPemCmEvalDetails evalobj = new TPemCmEvalDetails(); evalNumber = tfEvaluationNumber.getValue(); customer = tfCustomerName.getValue(); propertyType = "CONSTRUCTION"; 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.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) tfBankBranch.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()); } BigDecimal construction = new BigDecimal(0.00); BigDecimal totalFair = new BigDecimal(0.00); BigDecimal fairMarket = new BigDecimal(0.00); BigDecimal totalRealizable = new BigDecimal(0.00); BigDecimal totalDistress = new BigDecimal(0.00); BigDecimal totalGuide = new BigDecimal(0.00); BigDecimal test = new BigDecimal("0.00"); BigDecimal test1 = new BigDecimal("0.00"); BigDecimal test2 = new BigDecimal("0.00"); BigDecimal test3 = new BigDecimal("0.00"); BigDecimal test4 = new BigDecimal("0.00"); try { test = new BigDecimal( tfCostConstruction.getValue().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test = new BigDecimal("0.00"); } try { test1 = new BigDecimal( tfFairMarketRate.getValue().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test1 = new BigDecimal("0.00"); } try { test4 = new BigDecimal( tfGuidelineRate.getValue().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test4 = new BigDecimal("0.00"); } try { construction = construction.add(test); fairMarket = fairMarket.add(test1); totalFair = totalFair.add(test1).add(construction); uiflowdata.setTotalExtraItem(XMLUtil.IndianFormat(new BigDecimal(totalFair.toString()))); totalGuide = totalGuide.add(test4); uiflowdata.setTotalServices(XMLUtil.IndianFormat(new BigDecimal(totalGuide.toString()))); uiflowdata.setTotalAbstractvalue(XMLUtil.IndianFormat(new BigDecimal(totalFair.toString()))); String numberOnly = totalFair.toString().replaceAll("[^\\d.]", ""); if (numberOnly.trim().length() == 0) { numberOnly = "0"; } evalobj.setPropertyValue(Double.valueOf(numberOnly)); uiflowdata.setEvalDtls(evalobj); uiflowdata.setAmountInWords(beanEvaluation.getAmountInWords(numberOnly)); String numberOnly1 = tfGuidelineRate.getValue().replaceAll("[^0-9]", ""); uiflowdata.setAmountWordsGuideline(beanEvaluation.getAmountInWords(numberOnly1)); if (tfEvaluationNumber.isValid() && tfBankBranch.isValid() && tfEvaluationPurpose.isValid() && dfDateofValuation.isValid()) { if (count == 0) { beanEvaluation.saveorUpdateEvalDetails(evalobj); valid = true; } lblNotificationIcon.setIcon(new ThemeResource("img/success_small.png")); lblSaveNotification.setValue("Submitted Successfully"); } if (valid) { /*populateAndConfig(false); resetAllFieldsFields();*/ btnSubmit.setEnabled(false); } else { btnSubmit.setComponentError(new UserError("Form is invalid")); } } catch (Exception e) { logger.info("Error-->" + e); } lblNotificationIcon.setIcon(new ThemeResource("img/success_small.png")); lblSaveNotification.setValue("Successfully Submitted"); } 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.synd.SyndConstruction.java
License:Open Source License
private void saveEvaluationDetails() { uiflowdata = new UIFlowData(); // for save evaluation details boolean valid = false; try {/*from w ww . j av a 2s . c om*/ TPemCmEvalDetails evalobj = new TPemCmEvalDetails(); evalobj.setDocId(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) tfBankBranch.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()); } beanEvaluation.saveorUpdateEvalDetails(evalobj); uiflowdata.setEvalDtls(evalobj); try { saveOwnerDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveAssetDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveNormalDocuments(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveLegalDocuments(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveAdjoinPropertyDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveDimensionValues(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveMatchingBoundaries(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveNoofRooms(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveNoofFloors(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveTenureOccupayDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveConstructionDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveViolationDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveConstValuationDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { savePlinthAreaDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveBuildSpecDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveEstimateDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveReasonableDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveEarthQuakeDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveCostConstDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveGuidelineValue(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveGuidelineReferenceDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { savePropertyValueDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { savePlanApprovalDetails(); } catch (Exception e) { logger.info("Error-->" + e); } try { uiflowdata.setPropertyAddress(tfPropertyAddress.getValue()); uiflowdata.setBankBranch((String) tfBankBranch.getValue()); uiflowdata.setEvalnumber(tfEvaluationNumber.getValue()); uiflowdata.setCustomername(tfCustomerName.getValue()); uiflowdata.setEvalnumber(tfEvaluationNumber.getValue()); if (dfDateofValuation.getValue() != null) { SimpleDateFormat dt1 = new SimpleDateFormat("dd-MMM-yyyy"); uiflowdata.setInspectionDate(dt1.format(dfDateofValuation.getValue())); } BigDecimal site = new BigDecimal(0.00); BigDecimal fair = new BigDecimal(1.00); BigDecimal salbale = new BigDecimal(435.60); try { site = new BigDecimal(tfSiteArea.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.]", ""))); tfSiteArea.setValue(site.toString() + " sft (or) " + site.divide(salbale, 2, RoundingMode.HALF_UP).toPlainString() + " cents"); tfSalableArea.setValue(site.toString() + " sft (or) " + site.divide(salbale, 2, RoundingMode.HALF_UP).toPlainString() + " cents"); 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) { } try { saveAreaDetailsofProperty(); } catch (Exception e) { logger.info("Error-->" + e); } try { saveValuationofLandDetails(); } catch (Exception e) { logger.info("Error-->" + e); } uiflowdata.setPropDesc((String) slPropertyDesc.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(tfRealizabletRate.getValue()))); uiflowdata.setDistressvalue(XMLUtil.IndianFormat(new BigDecimal(tfDistressRate.getValue()))); uiflowdata .setConstructionValue(XMLUtil.IndianFormat(new BigDecimal(tfCostConstruction.getValue()))); } catch (Exception e) { logger.info("Error-->" + e); } BigDecimal construction = new BigDecimal(0.00); BigDecimal totalFair = new BigDecimal(0.00); BigDecimal fairMarket = new BigDecimal(0.00); BigDecimal totalRealizable = new BigDecimal(0.00); BigDecimal totalDistress = new BigDecimal(0.00); BigDecimal totalGuide = new BigDecimal(0.00); BigDecimal test = new BigDecimal("0.00"); BigDecimal test1 = new BigDecimal("0.00"); BigDecimal test2 = new BigDecimal("0.00"); BigDecimal test3 = new BigDecimal("0.00"); BigDecimal test4 = new BigDecimal("0.00"); try { test = new BigDecimal( tfCostConstruction.getValue().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test = new BigDecimal("0.00"); } try { test1 = new BigDecimal( tfFairMarketRate.getValue().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test1 = new BigDecimal("0.00"); } try { test4 = new BigDecimal( tfGuidelineRate.getValue().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test4 = new BigDecimal("0.00"); } try { construction = construction.add(test); fairMarket = fairMarket.add(test1); totalFair = totalFair.add(test1).add(construction); uiflowdata.setTotalExtraItem(XMLUtil.IndianFormat(new BigDecimal(totalFair.toString()))); totalGuide = totalGuide.add(test4); uiflowdata.setTotalServices(XMLUtil.IndianFormat(new BigDecimal(totalGuide.toString()))); uiflowdata.setTotalAbstractvalue(XMLUtil.IndianFormat(new BigDecimal(totalFair.toString()))); String numberOnly = totalFair.toString().replaceAll("[^\\d.]", ""); uiflowdata.setAmountInWords(beanEvaluation.getAmountInWords(numberOnly)); String numberOnly1 = tfGuidelineRate.getValue().replaceAll("[^0-9]", ""); uiflowdata.setAmountWordsGuideline(beanEvaluation.getAmountInWords(numberOnly1)); //bill 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( fairMarket.toString().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { real = new BigDecimal("0.00"); } try { distre = new BigDecimal( fairMarket.toString().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))); tfRealizabletRate.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) { logger.info("Error-->" + e); } try { test2 = new BigDecimal( uiflowdata.getRealizablevalue().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test2 = new BigDecimal("0.00"); } try { test3 = new BigDecimal( uiflowdata.getDistressvalue().replaceFirst("\\.0+$", "").replaceAll("[^0-9]", "")); } catch (Exception e) { test3 = new BigDecimal("0.00"); } try { totalRealizable = totalRealizable.add(test2).add(construction); uiflowdata.setTotalAdditional(XMLUtil.IndianFormat(new BigDecimal(totalRealizable.toString()))); totalDistress = totalDistress.add(test3).add(construction); uiflowdata.setTotalMiscellaneous(XMLUtil.IndianFormat(new BigDecimal(totalDistress.toString()))); } catch (Exception e) { } evalNumber = tfEvaluationNumber.getValue(); customer = tfCustomerName.getValue(); propertyType = "CONSTRUCTION"; ByteArrayOutputStream recvstram = XMLUtil.doMarshall(uiflowdata); XMLUtil.getWordDocument(recvstram, evalNumber + "_" + customer + "_" + propertyType, strXslFile); uiflowdata.setEvalDtls(evalobj); if (tfEvaluationNumber.isValid() && tfBankBranch.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.synd.SyndConstruction.java
License:Open Source License
@SuppressWarnings("deprecation") void setComponentStyle() { tfSearchBankbranch.setNullSelectionAllowed(false); tfSearchBankbranch.setInputPrompt(Common.SELECT_PROMPT); tfSearchCustomer.setInputPrompt("Enter Customer"); tfSearchEvalNumber.setInputPrompt("Enter Evaluation Number"); tfEvaluationNumber.setWidth(strComponentWidth); tfBankBranch.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);//from w w w. j av a 2s . co m dfDateofValuation.setResolution(PopupDateField.RESOLUTION_DAY); dfDateofValuation.setDateFormat("dd-MMM-yyyy"); dfVerifiedDate.setResolution(PopupDateField.RESOLUTION_DAY); dfVerifiedDate.setDateFormat("dd-MMM-yyyy"); tfCustomerName.setWidth(strComponentWidth); slPropertyDesc.setWidth(strComponentWidth); tfCustomerAddr.setWidth(strComponentWidth); tfCustomerAddr.setHeight("150px"); slPropertyDesc.setNullSelectionAllowed(false); // for matching boundary slMatchingBoundary.setWidth(strComponentWidth); slPlotDemarcated.setWidth(strComponentWidth); slApproveLandUse.setWidth(strComponentWidth); slTypeofProperty.setWidth(strComponentWidth); tfDynamicmatching1.setWidth(strComponentWidth); tfDynamicmatching2.setWidth(strComponentWidth); // room tfNoofRooms.setWidth(strComponentWidth); tfLivingDining.setWidth(strComponentWidth); tfBedRooms.setWidth(strComponentWidth); tfKitchen.setWidth(strComponentWidth); tfToilets.setWidth(strComponentWidth); tfDynamicRooms1.setWidth(strComponentWidth); tfDynamicRooms2.setWidth(strComponentWidth); // floor tfTotNoofFloors.setWidth(strComponentWidth); tfPropertyLocated.setWidth(strComponentWidth); tfApproxAgeofBuilding.setWidth(strComponentWidth); tfResidualAgeofBuilding.setWidth(strComponentWidth); slTypeofStructures.setWidth(strComponentWidth); tfDynamicFloors1.setWidth(strComponentWidth); tfDynamicFloors2.setWidth(strComponentWidth); // tenure/occupancy tfStatusofTenure.setWidth(strComponentWidth); slOwnedorRent.setWidth(strComponentWidth); tfNoOfYears.setWidth(strComponentWidth); tfRelationship.setWidth(strComponentWidth); tfDynamicTenure1.setWidth(strComponentWidth); tfDynamicTenure2.setWidth(strComponentWidth); // for construction tfStageofConst.setWidth(strComponentWidth); tfDynamicConstruction1.setWidth(strComponentWidth); tfDynamicConstruction2.setWidth(strComponentWidth); // for violation tfAnyViolation.setWidth(strComponentWidth); tfDynamicViolation1.setWidth(strComponentWidth); tfDynamicViolation2.setWidth(strComponentWidth); // for cost of construction lblCostConst.setWidth(strEstimateWidth); tfCostConstruction.setWidth(strComponentWidth); tfDynamicCostConst1.setWidth(strEstimateWidth); tfDynamicCostConst2.setWidth(strComponentWidth); tfDynamicCostConst3.setWidth(strEstimateWidth); tfDynamicCostConst4.setWidth(strComponentWidth); tfDynamicCostConst5.setWidth(strEstimateWidth); tfDynamicCostConst6.setWidth(strComponentWidth); tfDynamicCostConst7.setWidth(strEstimateWidth); tfDynamicCostConst8.setWidth(strComponentWidth); tfDynamicCostConst9.setWidth(strEstimateWidth); tfDynamicCostConst10.setWidth(strComponentWidth); // for area details tfSiteArea.setWidth(strComponentWidth); tfPlinthArea.setWidth(strComponentWidth); tfCarpetArea.setWidth(strComponentWidth); tfSalableArea.setWidth(strComponentWidth); tfRemarks.setWidth(strComponentWidth); tfRemarks.setHeight("95px"); tfDynamicAreaDetail1.setWidth(strComponentWidth); tfDynamicAreaDetail2.setWidth(strComponentWidth); // for construction details slTypeProperty.setWidth(strComponentWidth); slTypeStructure.setWidth(strComponentWidth); tfYearConstruction.setWidth(strComponentWidth); tfNoFloors.setWidth(strComponentWidth); tfConstQuality.setWidth(strComponentWidth); slAllapproval.setWidth(strComponentWidth); slIsConstruction.setWidth(strComponentWidth); tfReason.setWidth(strComponentWidth); tfDynamicConstval1.setWidth(strComponentWidth); tfDynamicConstval2.setWidth(strComponentWidth); // for land valuation tfAreaofLand.setWidth(strComponentWidth); tfNorthandSouth.setWidth(strComponentWidth); tfMarketRate.setWidth(strComponentWidth); tfAdopetdMarketRate.setWidth(strComponentWidth); tfFairMarketRate.setWidth(strComponentWidth); tfRealizabletRate.setWidth(strComponentWidth); tfDistressRate.setWidth(strComponentWidth); tfGuidelineRate.setWidth(strComponentWidth); tfDynamicValuation1.setWidth(strComponentWidth); tfDynamicValuation2.setWidth(strComponentWidth); // for applicant Estimate lblAppEstimate.setWidth(strEstimateWidth); tfAppEstimate.setWidth(strComponentWidth); lblDtlsAppEstimate.setWidth(strEstimateWidth); tfDtlsAppEstimate.setWidth(strComponentWidth); tfDetails1.setWidth(strEstimateWidth); tfDetails2.setWidth(strEstimateWidth); tfDetails3.setWidth(strEstimateWidth); tfDetailVal1.setWidth(strComponentWidth); tfDetailVal2.setWidth(strComponentWidth); tfDetailVal3.setWidth(strComponentWidth); lblTotal.setWidth(strEstimateWidth); tfTotalval.setWidth(strComponentWidth); tfDynamicAppEstimate1.setWidth(strEstimateWidth); tfDynamicAppEstimate2.setWidth(strComponentWidth); tfDynamicAppEstimate3.setWidth(strEstimateWidth); tfDynamicAppEstimate4.setWidth(strComponentWidth); tfDynamicAppEstimate5.setWidth(strEstimateWidth); tfDynamicAppEstimate6.setWidth(strComponentWidth); tfDynamicAppEstimate7.setWidth(strEstimateWidth); tfDynamicAppEstimate8.setWidth(strComponentWidth); // for applicant Reasonable lblAppReasonable.setWidth(strEstimateWidth); slAppReasonable.setWidth(strComponentWidth); lblReasonEstimate.setWidth(strEstimateWidth); tfReasonEstimateVal.setWidth(strComponentWidth); lblDtlsAppReasonable.setWidth(strEstimateWidth); tfDtlsAppReasonable.setWidth(strComponentWidth); tfDetailsReason1.setWidth(strEstimateWidth); tfDetailsReason2.setWidth(strEstimateWidth); tfDetailsReason3.setWidth(strEstimateWidth); tfDetailReasonVal1.setWidth(strComponentWidth); tfDetailReasonVal2.setWidth(strComponentWidth); tfDetailReasonVal3.setWidth(strComponentWidth); lblReasonTotal.setWidth(strEstimateWidth); tfReasonTotalval.setWidth(strComponentWidth); tfDynamicAppReason1.setWidth(strEstimateWidth); tfDynamicAppReason2.setWidth(strComponentWidth); tfDynamicAppReason3.setWidth(strEstimateWidth); tfDynamicAppReason4.setWidth(strComponentWidth); // for earth quake slEarthQuake.setWidth(strComponentWidth); tfDynamicEarthquake1.setWidth(strComponentWidth); tfDynamicEarthquake2.setWidth(strComponentWidth); tfOwnerName.setWidth(strComponentWidth); tfOwnerAddress.setWidth(strComponentWidth); tfOwnerAddress.setHeight("150px"); tfLandMark.setWidth(strComponentWidth); tfPropertyAddress.setWidth(strComponentWidth); tfPropertyAddress.setHeight("130px"); tfDynamicAsset1.setWidth(strComponentWidth); tfDynamicAsset2.setWidth(strComponentWidth); tfZone.setWidth(strComponentWidth); tfSRO.setWidth(strComponentWidth); tfVillage.setWidth(strComponentWidth); tfRevnueDist.setWidth(strComponentWidth); tfTalukName.setWidth(strComponentWidth); tfStreetName.setWidth(strComponentWidth); slStreetSerNo.setWidth(strComponentWidth); slStreetSerNo.setHeight("25"); tfStreetName.setHeight("25"); tfGuidelineValue.setWidth(strComponentWidth); tfGuidelineValueMatric.setWidth(strComponentWidth); slClassification.setWidth(strComponentWidth); // for details of plan approval tfLandandBuilding.setHeight("25"); slLandandBuilding.setHeight("25"); slBuilding.setHeight("25"); tfBuilding.setHeight("25"); tfLandandBuilding.setWidth(strComponentWidth); slLandandBuilding.setWidth(strComponentWidth); slBuilding.setWidth(strComponentWidth); tfBuilding.setWidth(strComponentWidth); tfPlanApprovedBy.setWidth(strComponentWidth); dfLicenseFrom.setWidth(strComponentWidth); tfDynamicPlanApproval1.setWidth(strComponentWidth); slIsLicenceForced.setWidth(strComponentWidth); slAllApprovalRecved.setWidth(strComponentWidth); slConstAsperAppPlan.setWidth(strComponentWidth); tfDynamicPlanApproval2.setWidth(strComponentWidth); // set Null representation tfEvaluationNumber.setNullRepresentation(""); tfBankBranch.setNullSelectionAllowed(false); tfEvaluationPurpose.setNullRepresentation(""); tfValuatedBy.setNullRepresentation(""); tfVerifiedBy.setNullRepresentation(""); tfDynamicEvaluation1.setNullRepresentation(""); tfDynamicEvaluation2.setNullRepresentation(""); tfCustomerName.setNullRepresentation(""); slPropertyDesc.setNullSelectionAllowed(false); tfCustomerAddr.setNullRepresentation(""); tfCustomerAddr.setHeight("130px"); slPropertyDesc.setNullSelectionAllowed(false); // for matching boundary slMatchingBoundary.setNullSelectionAllowed(false); slPlotDemarcated.setNullSelectionAllowed(false); slApproveLandUse.setNullSelectionAllowed(false); slTypeofProperty.setNullSelectionAllowed(false); tfDynamicmatching1.setNullRepresentation(""); tfDynamicmatching2.setNullRepresentation(""); // room tfNoofRooms.setNullRepresentation(""); tfLivingDining.setNullRepresentation(""); tfBedRooms.setNullRepresentation(""); tfKitchen.setNullRepresentation(""); tfToilets.setNullRepresentation(""); tfDynamicRooms1.setNullRepresentation(""); tfDynamicRooms2.setNullRepresentation(""); // floor tfTotNoofFloors.setNullRepresentation(""); tfPropertyLocated.setNullRepresentation(""); tfApproxAgeofBuilding.setNullRepresentation(""); tfResidualAgeofBuilding.setNullRepresentation(""); slTypeofStructures.setNullSelectionAllowed(false); tfDynamicFloors1.setNullRepresentation(""); tfDynamicFloors2.setNullRepresentation(""); // tenure/occupancy tfStatusofTenure.setNullRepresentation(""); slOwnedorRent.setNullSelectionAllowed(false); tfNoOfYears.setNullRepresentation(""); tfRelationship.setNullRepresentation(""); tfDynamicTenure1.setNullRepresentation(""); tfDynamicTenure2.setNullRepresentation(""); // for construction tfStageofConst.setNullRepresentation(""); tfDynamicConstruction1.setNullRepresentation(""); tfDynamicConstruction2.setNullRepresentation(""); // for violation tfAnyViolation.setNullRepresentation(""); tfDynamicViolation1.setNullRepresentation(""); tfDynamicViolation2.setNullRepresentation(""); // for area details tfSiteArea.setNullRepresentation(""); tfPlinthArea.setNullRepresentation(""); tfCarpetArea.setNullRepresentation(""); tfSalableArea.setNullRepresentation(""); tfRemarks.setNullRepresentation(""); tfRemarks.setHeight("95px"); tfDynamicAreaDetail1.setNullRepresentation(""); tfDynamicAreaDetail2.setNullRepresentation(""); // for construction details slTypeProperty.setNullSelectionAllowed(false); slTypeStructure.setNullSelectionAllowed(false); tfYearConstruction.setNullRepresentation(""); tfNoFloors.setNullRepresentation(""); tfConstQuality.setNullRepresentation(""); slAllapproval.setNullSelectionAllowed(false); slIsConstruction.setNullSelectionAllowed(false); tfReason.setNullRepresentation(""); tfDynamicConstval1.setNullRepresentation(""); tfDynamicConstval2.setNullRepresentation(""); // for land valuation tfAreaofLand.setNullRepresentation(""); tfNorthandSouth.setNullRepresentation(""); tfMarketRate.setNullRepresentation(""); tfAdopetdMarketRate.setNullRepresentation(""); tfFairMarketRate.setNullRepresentation(""); tfRealizabletRate.setNullRepresentation(""); tfDistressRate.setNullRepresentation(""); tfGuidelineRate.setNullRepresentation(""); tfDynamicValuation1.setNullRepresentation(""); tfDynamicValuation2.setNullRepresentation(""); // for applicant Estimate tfAppEstimate.setNullRepresentation(""); tfDtlsAppEstimate.setNullRepresentation(""); tfDetails1.setNullRepresentation(""); tfDetails2.setNullRepresentation(""); tfDetails3.setNullRepresentation(""); tfDetailVal1.setNullRepresentation(""); tfDetailVal2.setNullRepresentation(""); tfDetailVal3.setNullRepresentation(""); tfTotalval.setNullRepresentation(""); tfDynamicAppEstimate1.setNullRepresentation(""); tfDynamicAppEstimate2.setNullRepresentation(""); tfDynamicAppEstimate3.setNullRepresentation(""); tfDynamicAppEstimate4.setNullRepresentation(""); tfDynamicAppEstimate5.setNullRepresentation(""); tfDynamicAppEstimate6.setNullRepresentation(""); tfDynamicAppEstimate7.setNullRepresentation(""); tfDynamicAppEstimate8.setNullRepresentation(""); // for applicant Reasonable lblAppReasonable.setWidth(strEstimateWidth); slAppReasonable.setNullSelectionAllowed(false); tfReasonEstimateVal.setNullRepresentation(""); tfDtlsAppReasonable.setNullRepresentation(""); tfDetailsReason1.setNullRepresentation(""); tfDetailsReason2.setNullRepresentation(""); tfDetailsReason3.setNullRepresentation(""); tfDetailReasonVal1.setNullRepresentation(""); tfDetailReasonVal2.setNullRepresentation(""); tfDetailReasonVal3.setNullRepresentation(""); tfReasonTotalval.setNullRepresentation(""); tfDynamicAppReason1.setNullRepresentation(""); tfDynamicAppReason2.setNullRepresentation(""); tfDynamicAppReason3.setWidth(strEstimateWidth); tfDynamicAppReason4.setNullRepresentation(""); // for earth quake slEarthQuake.setNullSelectionAllowed(false); tfDynamicEarthquake1.setNullRepresentation(""); tfDynamicEarthquake2.setNullRepresentation(""); tfOwnerName.setNullRepresentation(""); tfOwnerAddress.setNullRepresentation(""); tfLandMark.setNullRepresentation(""); tfPropertyAddress.setNullRepresentation(""); tfDynamicAsset1.setNullRepresentation(""); tfDynamicAsset2.setNullRepresentation(""); tfZone.setNullRepresentation(""); tfSRO.setNullRepresentation(""); tfVillage.setNullRepresentation(""); tfRevnueDist.setNullRepresentation(""); tfTalukName.setNullRepresentation(""); tfStreetName.setNullRepresentation(""); tfGuidelineValue.setNullRepresentation(""); tfGuidelineValueMatric.setNullRepresentation(""); slClassification.setNullRepresentation(""); // for details of plan approval tfLandandBuilding.setNullRepresentation(""); tfBuilding.setNullRepresentation(""); slLandandBuilding.setNullSelectionAllowed(false); slBuilding.setNullSelectionAllowed(false); tfPlanApprovedBy.setNullRepresentation(""); tfDynamicPlanApproval1.setNullRepresentation(""); slIsLicenceForced.setNullSelectionAllowed(false); slAllApprovalRecved.setNullSelectionAllowed(false); slConstAsperAppPlan.setNullSelectionAllowed(false); tfDynamicPlanApproval2.setNullRepresentation(""); dfLicenseFrom.setNullRepresentation(""); // for cost of construction tfCostConstruction.setNullRepresentation(""); tfDynamicCostConst1.setNullRepresentation(""); tfDynamicCostConst2.setNullRepresentation(""); tfDynamicCostConst3.setNullRepresentation(""); tfDynamicCostConst4.setNullRepresentation(""); tfDynamicCostConst5.setNullRepresentation(""); tfDynamicCostConst6.setNullRepresentation(""); tfDynamicCostConst7.setNullRepresentation(""); tfDynamicCostConst8.setNullRepresentation(""); tfDynamicCostConst9.setNullRepresentation(""); tfDynamicCostConst10.setNullRepresentation(""); // for dynamic btnDynamicEvaluation1.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicEvaluation1.setStyleName(Runo.BUTTON_LINK); btnDynamicCustomer.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicCustomer.setStyleName(Runo.BUTTON_LINK); btnDynamicAsset.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicAsset.setStyleName(Runo.BUTTON_LINK); btnAddLegalDoc.setIcon(new ThemeResource(Common.strAddIcon)); btnAddNorDoc.setIcon(new ThemeResource(Common.strAddIcon)); btnAddNorDoc.setStyleName(Runo.BUTTON_LINK); btnAddLegalDoc.setStyleName(Runo.BUTTON_LINK); btnAddAdjoinProperty.setIcon(new ThemeResource(Common.strAddIcon)); btnAddAdjoinProperty.setStyleName(Runo.BUTTON_LINK); btnAddDimension.setIcon(new ThemeResource(Common.strAddIcon)); btnAddDimension.setStyleName(Runo.BUTTON_LINK); btnDynamicPlanApproval.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicPlanApproval.setStyleName(Runo.BUTTON_LINK); btnAddPlinth.setIcon(new ThemeResource(Common.strAddIcon)); btnAddPlinth.setStyleName(Runo.BUTTON_LINK); btnDynamicTenure.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicTenure.setStyleName(Runo.BUTTON_LINK); btnDynamicmatching.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicmatching.setStyleName(Runo.BUTTON_LINK); btnDynamicRooms.setStyleName(Runo.BUTTON_LINK); btnDynamicRooms.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicFloor.setStyleName(Runo.BUTTON_LINK); btnDynamicFloor.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicConstruction.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicConstruction.setStyleName(Runo.BUTTON_LINK); btnDynamicViolation.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicViolation.setStyleName(Runo.BUTTON_LINK); btnDynamicAreaDetail.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicAreaDetail.setStyleName(Runo.BUTTON_LINK); btnDynamicConstVal.setStyleName(Runo.BUTTON_LINK); btnDynamicConstVal.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicPlanApproval.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicPlanApproval.setStyleName(Runo.BUTTON_LINK); btnAddBuildSpec.setStyleName(Runo.BUTTON_LINK); btnAddBuildSpec.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicAppEstimate.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicAppEstimate.setStyleName(Runo.BUTTON_LINK); btnDynamicAppReason.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicAppReason.setStyleName(Runo.BUTTON_LINK); btnDynamicEarthQuake.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicEarthQuake.setStyleName(Runo.BUTTON_LINK); btnDynamicCostConst.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicCostConst.setStyleName(Runo.BUTTON_LINK); btnAddOwner.setIcon(new ThemeResource(Common.strAddIcon)); btnAddOwner.setStyleName(Runo.BUTTON_LINK); btnDynamicValuation.setIcon(new ThemeResource(Common.strAddIcon)); btnDynamicValuation.setStyleName(Runo.BUTTON_LINK); btnAddGuideline.setStyleName(Runo.BUTTON_LINK); btnAddGuideline.setIcon(new ThemeResource(Common.strAddIcon)); tfStatusofTenure.setValue(Common.strNA); tfRelationship.setValue(Common.strNA); tfStageofConst.setValue(Common.strNA); tfPlinthArea.setValue(Common.strNil); tfCarpetArea.setValue(Common.strNil); tfRemarks.setValue(Common.strNil); }