All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vaadin.ui.components.grid.EditorErrorGenerator Maven / Gradle / Ivy

There is a newer version: 8.27.3
Show newest version
/*
 * Copyright (C) 2000-2024 Vaadin Ltd
 *
 * This program is available under Vaadin Commercial License and Service Terms.
 *
 * See  for the full
 * license.
 */
package com.vaadin.ui.components.grid;

import java.io.Serializable;
import java.util.Map;
import java.util.function.BiFunction;

import com.vaadin.data.BinderValidationStatus;
import com.vaadin.ui.Component;
import com.vaadin.ui.Grid;

/**
 * Generator for creating editor validation and conversion error messages.
 *
 * @author Vaadin Ltd
 * @since 8.0
 *
 * @param 
 *            the bean type
 */
@FunctionalInterface
public interface EditorErrorGenerator extends Serializable,
        BiFunction>, BinderValidationStatus, String> {

    /**
     * Generates an error message from given validation status object.
     *
     * @param fieldToColumn
     *            the map of failed fields and corresponding columns
     * @param status
     *            the binder status object with all failures
     *
     * @return error message string
     */
    @Override
    public String apply(Map> fieldToColumn,
            BinderValidationStatus status);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy