/** * Does only work for not already persisted entries (meaning entries without an id / pk) and only the last entry of * the list. Otherwise this method logs an error message and do nothing else. * * @param idx * @see #isKostZuweisungDeletable(KostZuweisungDO) */ public AbstractRechnungsPositionDO deleteKostZuweisung(final int idx) { final KostZuweisungDO zuweisung = getKostZuweisung(idx); if (zuweisung == null) { return this; } if (isKostZuweisungDeletable(zuweisung) == false) { log .error( "Deleting of cost assignements which are already persisted (a id / pk already exists) or not are not the last entry is not supported. Do nothing."); return this; } this.kostZuweisungen.remove(zuweisung); return this; }
row.add(pLabel); if (position.isKostZuweisungDeletable(zuweisung) == true) { final AjaxButton deleteRowButton = new AjaxButton(ButtonPanel.BUTTON_ID, form)