Search in sources :

Example 1 with Formula

use of org.openforis.idm.metamodel.CalculatedAttributeDefinition.Formula in project collect by openforis.

the class CalculatedAttributeDefinitionFormValidator method validateFormulas.

private void validateFormulas(ValidationContext ctx) {
    CalculatedAttributeVM vm = (CalculatedAttributeVM) getVM(ctx);
    List<Formula> formulas = vm.getFormulas();
    validateRequired(ctx, FORMULAS_FIELD, formulas);
}
Also used : Formula(org.openforis.idm.metamodel.CalculatedAttributeDefinition.Formula) CalculatedAttributeVM(org.openforis.collect.designer.viewmodel.CalculatedAttributeVM)

Example 2 with Formula

use of org.openforis.idm.metamodel.CalculatedAttributeDefinition.Formula in project collect by openforis.

the class CalculatedAttributeVM method addFormula.

@Command
@NotifyChange("formulas")
public void addFormula() {
    editingNewFormula = true;
    editedFormula = new Formula();
    openFormulaEditPopUp();
}
Also used : Formula(org.openforis.idm.metamodel.CalculatedAttributeDefinition.Formula) NotifyChange(org.zkoss.bind.annotation.NotifyChange) Command(org.zkoss.bind.annotation.Command) GlobalCommand(org.zkoss.bind.annotation.GlobalCommand)

Aggregations

Formula (org.openforis.idm.metamodel.CalculatedAttributeDefinition.Formula)2 CalculatedAttributeVM (org.openforis.collect.designer.viewmodel.CalculatedAttributeVM)1 Command (org.zkoss.bind.annotation.Command)1 GlobalCommand (org.zkoss.bind.annotation.GlobalCommand)1 NotifyChange (org.zkoss.bind.annotation.NotifyChange)1