コード例 #1
0
  @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;
  }
コード例 #2
0
 @Override
 protected void updateView() {
   Tax tax = (Tax) getBean();
   tfName.setText(tax.getName());
   tfRate.setValue(Double.valueOf(tax.getRate()));
 }