{"action":"created","issue":{"url":"https://api.github.com/repos/vaadin/framework/issues/10017","repository_url":"https://api.github.com/repos/vaadin/framework","labels_url":"https://api.github.com/repos/vaadin/framework/issues/10017/labels{/name}","comments_url":"https://api.github.com/repos/vaadin/framework/issues/10017/comments","events_url":"https://api.github.com/repos/vaadin/framework/issues/10017/events","html_url":"https://github.com/vaadin/framework/issues/10017","id":258481613,"number":10017,"title":"Vaadin 8.1.0: Validating outside inline editor fails because values aren't provided","user":{"login":"sebastiansto","id":32065928,"avatar_url":"https://avatars2.githubusercontent.com/u/32065928?v=4","gravatar_id":"","url":"https://api.github.com/users/sebastiansto","html_url":"https://github.com/sebastiansto","followers_url":"https://api.github.com/users/sebastiansto/followers","following_url":"https://api.github.com/users/sebastiansto/following{/other_user}","gists_url":"https://api.github.com/users/sebastiansto/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastiansto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastiansto/subscriptions","organizations_url":"https://api.github.com/users/sebastiansto/orgs","repos_url":"https://api.github.com/users/sebastiansto/repos","events_url":"https://api.github.com/users/sebastiansto/events{/privacy}","received_events_url":"https://api.github.com/users/sebastiansto/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-09-18T13:34:58Z","updated_at":"2017-09-18T15:37:52Z","closed_at":"2017-09-18T15:37:52Z","author_association":"NONE","body":"Hi there,\r\n\r\nIf you try to trigger the data validation outside of the inside editor (for a global validation check), the validation always fails because the values in the custom validator are always null no matter the real value in the field.\r\n\r\nPlease fix this bug, so that data which is imported into the grid e.g. via file can be validate before committing.\r\n\r\nThank you and best regards,\r\nSebastian\r\n\r\nA sample:\r\n```\r\nListDataProvider<ObjectNode> dataProvider = retrieveList();\r\n\r\nGrid<ObjectNode> grid = new Grid<>(dataProvider);\r\ngrid.getEditor().setEnabled(true);\r\nBinder<ObjectNode> binder = grid.getEditor().getBinder();\r\n\r\n//\r\n// repeated for all fields\r\n//\r\n\r\nString fieldName = \"field1\";\r\nTextField fieldEdit = new TextField();\r\n\r\nValidator<String> validator = new Validator<String>() {\r\n\t@Override\r\n\tpublic ValidationResult apply(String value, ValueContext context) {\r\n\t\treturn isValidValue(value);\r\n\t}\r\n};\r\n\r\nBinding<ObjectNode, String> fieldBinding = binder.forField(fieldEdit).withValidator(validator).bind(json -> json.get(fieldName).textValue(), \r\n\t\t(json, fieldValue) -> json.put(fieldName, fieldValue));\r\n\r\ngrid.addColumn(json -> json.get(fieldName).textValue()).setCaption(fieldName).setId(fieldName).setEditorBinding(fieldBinding);\r\n\r\n\r\n//\r\n// Somewhere triggered by a final commit button:\r\n//\r\n\r\nif (!grid.getEditor().getBinder().isValid()) {\r\n\tgrid.setComponentError(new UserError(UIConfiguration.MESSAGE_INPUT_VALIDATION_FAILED));\r\n\treturn false;\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/vaadin/framework/issues/comments/330262905","html_url":"https://github.com/vaadin/framework/issues/10017#issuecomment-330262905","issue_url":"https://api.github.com/repos/vaadin/framework/issues/10017","id":330262905,"user":{"login":"sebastiansto","id":32065928,"avatar_url":"https://avatars2.githubusercontent.com/u/32065928?v=4","gravatar_id":"","url":"https://api.github.com/users/sebastiansto","html_url":"https://github.com/sebastiansto","followers_url":"https://api.github.com/users/sebastiansto/followers","following_url":"https://api.github.com/users/sebastiansto/following{/other_user}","gists_url":"https://api.github.com/users/sebastiansto/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastiansto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastiansto/subscriptions","organizations_url":"https://api.github.com/users/sebastiansto/orgs","repos_url":"https://api.github.com/users/sebastiansto/repos","events_url":"https://api.github.com/users/sebastiansto/events{/privacy}","received_events_url":"https://api.github.com/users/sebastiansto/received_events","type":"User","site_admin":false},"created_at":"2017-09-18T15:37:52Z","updated_at":"2017-09-18T15:37:52Z","author_association":"NONE","body":"Ok, thank you. Then this issue can be closed."}}
{"actor":{"display_login":"sebastiansto"}}