@Override protected void setBindings() { pricingTab .getTab() .disableProperty() .bind( noSelectedType() .or(isMonetary()) .or(isFree()) .or(isPurchasedButNoQtyPerUom()) .or(isAssembledButNoBOM())); discountTab.getTab().disableProperty().bind(FX.isEmpty(pricingTab.getTable())); buttons.get("cancel").setDisable(true); buttons .get("save") .disableProperty() .bind(noSelectedType().or(noPricing().and(isNotMonetaryAndFree()))); }
private void allowOnlyPricingUpdatesWhenSavingPreviouslyPostedItemElsePersistAll() throws InvalidException { if (encoderDisplay.getText().isEmpty()) saveAll(); else pricingTab.save(); }
private BooleanBinding noPricing() { return FX.isEmpty(pricingTab.getTable()); }