@Override protected void addDetails() { logger.info( "Company ID : " + companyid + " | User Name : " + username + " > " + "Adding new record..."); // remove the components in the search layout and input controls in the same container hlUserInputLayout.removeAllComponents(); hlUserIPContainer.addComponent(GERPPanelGenerator.createPanel(hlUserInputLayout)); assembleInputUserLayout(); // reset the input controls to default value tblMstScrSrchRslt.setVisible(false); hlCmdBtnLayout.setVisible(false); btnaddSpec.setCaption("Add"); tblSmsEnqDtl.setVisible(true); cbBranch.setRequired(true); lsVendorName.setRequired(true); tfEnqNo.setReadOnly(true); lsProduct.setRequired(true); lsProduct.setComponentError(null); dfEnqDate.setComponentError(null); cbUom.setRequired(true); loadPurDtl(); resetFields(); tfEnqNo.setReadOnly(true); try { tfEnqNo.setReadOnly(false); SlnoGenDM slnoObj = serviceSlnogen.getSequenceNumber(companyid, branchId, moduleId, "SM_ENQRYNO ").get(0); if (slnoObj.getAutoGenYN().equals("Y")) { tfEnqNo.setValue(slnoObj.getKeyDesc()); tfEnqNo.setReadOnly(true); } else { tfEnqNo.setReadOnly(false); } } catch (Exception e) { logger.info(e.getMessage()); } comments = new SmsComments( vlTableForm, null, companyid, null, null, null, null, null, null, null, null, null, null, null); }
@Override protected void editDetails() { hlUserInputLayout.removeAllComponents(); hlUserIPContainer.addComponent(GERPPanelGenerator.createPanel(hlUserInputLayout)); assembleInputUserLayout(); tblMstScrSrchRslt.setVisible(false); hlCmdBtnLayout.setVisible(false); tblSmsEnqDtl.setVisible(true); if (tfEnqNo.getValue() == null || tfEnqNo.getValue().trim().length() == 0) { tfEnqNo.setReadOnly(false); } cbBranch.setRequired(true); lsVendorName.setRequired(true); resetFields(); editPurHdr(); editSmsPurDetail(); lsProduct.setRequired(true); cbUom.setRequired(true); }
@Override protected void cancelDetails() { logger.info( "Company ID : " + companyid + " | User Name : " + username + " > " + "Canceling action "); hlUserIPContainer.removeAllComponents(); assembleSearchLayout(); hlCmdBtnLayout.setVisible(true); tblSmsEnqDtl.removeAllItems(); tblMstScrSrchRslt.setVisible(true); tfEnqNo.setReadOnly(false); cbBranch.setRequired(false); lsVendorName.setRequired(false); lsVendorName.setComponentError(null); enqDtlresetFields(); resetFields(); loadSrchRslt(); }