//AMIS Technology Blog » upload

Posts tagged upload

SIG Event

ADF 11g – Validation of Uploaded Files with the inputFile component

 

Today we had a little issue with the inputFile component in ADF 11g, especially with its behavior after failed validation. Our situation: the inputFile component has autoSubmit set to true – so immediately after selecting a file in the browser dialog is the upload started in an asynchronous request. Validation is performed, either from validators or in a valueChangeListener (because I was too lazy to look up the syntax for a validator).

The behavior of the inputFile component is such that after the initial upload, the name of the uploaded file is shown as a read only value and the browse button is replaced by an update button: we can change the file, but not perform the initial upload anymore. When the user presses the update button, a small pop up appears in which we can browse for a file, click on the OK button to have it uploaded or click on Cancel to have the update aborted.

Unfortunately, when the file that was initially uploaded has failed validation, the OK button in this popup does not allow us to actually upload the newly selected file. The page continues to display the uploaded, invalid file and the update of that file to resolve the validation errors can not be More >

SIG Event

Howto show and save image as blob type with seam

In a project where i am working on, we needed to show an image and the image should be change when a user would like to do that. For that we need to hava an attribute in a table called photo and it has to be a blob. See below: We have now a photo attribute as a blob, the next thing we need to do, is to make an entity with a photo attribute. The entity is called Person and has a byte[] variable called photo. See below for an example: (more…)

Go to Top