Search in sources :

Example 1 with CheckType

use of org.openforis.collect.designer.model.CheckType in project collect by openforis.

the class AttributeVM method addCheck.

@Command
public void addCheck(@BindingParam("checkType") String checkType) {
    if (checkCanAddCheck()) {
        CheckType type = CheckType.valueOf(checkType.toUpperCase());
        editingNewCheck = true;
        editedCheck = CheckType.createCheck(type);
        openCheckEditPopUp();
    }
}
Also used : CheckType(org.openforis.collect.designer.model.CheckType) GlobalCommand(org.zkoss.bind.annotation.GlobalCommand) Command(org.zkoss.bind.annotation.Command)

Example 2 with CheckType

use of org.openforis.collect.designer.model.CheckType in project collect by openforis.

the class AttributeVM method getCheckMessage.

public String getCheckMessage(Check<?> check) {
    String result = check.getMessage(currentLanguageCode);
    if (result == null) {
        CheckType type = CheckType.valueOf(check);
        result = type.getDefaultMessage();
    }
    return result;
}
Also used : CheckType(org.openforis.collect.designer.model.CheckType)

Aggregations

CheckType (org.openforis.collect.designer.model.CheckType)2 Command (org.zkoss.bind.annotation.Command)1 GlobalCommand (org.zkoss.bind.annotation.GlobalCommand)1