Exception in input dialogs

image
I’m having this error above when i try to close dialog.

my code is here:
image

what is wrong with this?

Hi!

Actually com.vaadin.flow.component.upload.Upload is not a field.
This component does not have the getValue() methods that are used in the InputDialog API.

Also, because this is a native Vaadin component, it cannot provide its value to a fileRef object that belongs to Jmix Framework.

So what can you do?

You should use the FileUplodField or FileStorageUploadField component instead.
getValue() method will return byte[].

You may need to get the form input component itself, this can be done with the following code:
closeDialog.getSource().getFormLayoutComponentById("tempUploadField").

Regards,
Dmitriy

thanks for your response by the way. I’ve already figured out what went wrong in my code. This is exactly what you said. Input paramater’s returning field should either be instance of HasValue or SupportsTypedValue interfaces.