Book Image

Oracle ADF Faces Cookbook

By : Amr Gawish, Amr Ismail Gawish
Book Image

Oracle ADF Faces Cookbook

By: Amr Gawish, Amr Ismail Gawish

Overview of this book

Table of Contents (18 chapters)
Oracle ADF Faces Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Using the inputFile component


The inputFile component provides end users with file uploading and updating capabilities. It allows selecting a local file and uploading the inputStream component to a selectable location on the server.

In this recipe, we will add an inputFile component to mimic saving the user's uploaded image and saving the image filename in the Image attribute of the Employees table.

How to do it...

In order to add the inputFile component, follow the ensuing steps:

  1. Open the inputComponets.jsf page.

  2. Drag the Image attribute under EmployeesView1 in Chapter4AppModuleDataControl from the Data Control pane and drop it inside the panel form layout.

  3. Navigate to Text | ADF Input Text w/ Label.

  4. Right-click on the inputText component and go to Convert to… | Input File.

  5. While selecting the inputText component, change the AutoSubmit attribute to true.

  6. Change the Converter attribute to FileConverter.

  7. Save everything.

  8. Open the inputComponents.jsf page.

  9. Select af:form from the Structure pane.

  10. Change...