cancel
Showing results for 
Search instead for 
Did you mean: 

FileUploadUI: ImputField

Former Member
0 Kudos

Hi all,

we just implemented a FileUploadUI-element. So far everything works fine, except that the contents of the inputfield (data) from the Element disapears immediately when we press our "save" button, to save data on the server.

Is there any possibility, that the contents of this field stays visible, after presseing a button?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Richard,

In brief words: no, and for good reason.

I can elaborate further "why", but now just a reminder to you: due to security reasons browser does not allow to use auto-populated values in <input type="file"> HTML control and existing text may confuse user (user sees it, but no file is submitted on next action invocation)

I believe small informational message in MessageArea after file acceptance will make your wire-frame designers and/or business analysts satisfied

VS

Former Member
0 Kudos

Valery, Nirav,

thanks for your answers. If I understand Valery right, it is a "wished behaviour", that that the complete path/filename in the inputfield of the fileuploader disappears if we press a button, which saves the data out of the bytearray to a file on the server. With other words: the contents of the field seems to disappear with every server-round-trip!

The anonying thing for us is mostly: We have two additional fields with value-helpers on the mask. This fields are meant, to fill in parts of the filename for the destination filename. <b>If we start one of the value-helpers, the source-filename disapears immediately.</b> But the information seems to be stored somewhere in the background, because saveing of the uploaded file still works. But for a user it's a strange thing, if he should press the button for saving data on server, and the source-filename is empty.

Valery, if I understand right, we would have to generate a second mask, so that we have the FileUploader on it's on mask, which we can close directly after the file is loaded to the server, on a second mask wie can then enter the filename for the targetfile? In that case no one can be confused about the disappearing of the source-file.

Former Member
0 Kudos

Richard,

If I understand your problem correctly, then "yes", you have to separate source / target file controls.

One form should include only fields these are related to source file along with <b>only one action</b> for file upload. Any other action will cause file upload as well and reset file name to empty (as you've described it). Btw, having input fields with OVS / EVS should be avoided as well -- they has action for selection in table, for invoke filtering, etc

Second form may use arbitrary controls.

Both forms should be displayed separately like in 2-steps wizard.

VS

Former Member
0 Kudos

Hi Valery,

thanks! Yes, you understand everything right. This will help us to go further.

RBD

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Richard,

I did not exactly get you probelm. I'll try to explain how the file-upload work and you can try to solve the problem then.

The File Upload element is bound to binary context attribute. When you select the file from the front-end and click upload, the file is availabe in binary context attribute. The binary context node is basically a byte array. You can now use java file handling to save the file on the server.

What is the "save" button you are talking about?

Nirav