@Override protected boolean updateModel() { Tax tax = (Tax) getBean(); String name = tfName.getText(); if (POSUtil.isBlankOrNull(name)) { MessageDialog.showError(com.floreantpos.POSConstants.NAME_REQUIRED); return false; } tax.setName(name); tax.setRate(new Double(tfRate.getValue().toString()).doubleValue()); return true; }
@Override protected void updateView() { Tax tax = (Tax) getBean(); tfName.setText(tax.getName()); tfRate.setValue(Double.valueOf(tax.getRate())); }