Question

Abstract:

There is an input File competent in JSPX page where the user can select a file to upload. The user will press a Save button to store file in the database.

Work Flow:

  1. When the user select the file to upload the valueChangeListener will be called.

  2. In the valueChangeListener I am storing the file into local variable of type UplodedFile. I am able to access all file property from this variable in the valueChangeListener; that is, I can access the file name, size,... form the local variable within the valueChangeListener.

  3. When the user press the Save button a method to commit the changes is called.

  4. In the commit method I am getting the file data from the local variable that hold the file data.

The problem is:

This local variable that should store the file data is always NULL. I have no idea why this variable does not contain the file data although I set its value in the valueChangeListener.

Note:

I tried to bind the input File competent to a local variable and again it gave me the same result NULL value.

I am using ADF Technology JDeveloper 11.1.2.3

Was it helpful?

Solution

You have to process the data inside the value change listener as it's only present during the request. The file data is removed after the request.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top