In this post we are going to learn very basic requirement of File Handling i.e. Uploading & Downloading in ADF it need very often to store files in absolute server path and download from there.Here are some steps that we have to follow:
- Here, create a simple table in Data base to store uploaded file name,path and content type.
- Now create entity object and view object using Upload_Download table.
- Go to view controller and create a jspx page.
- Now drop af:inputFile from the component palette as.
- Then create a valueChangeListener on af:inputFile component to upload file to an actual path on server, and after upload a row is inserted in table to keep record of uploaded files.
- Create a bean class "UploadBean" on valueChangeListener and then create a method "uploadAction" with in the bean class.
- Now, from Data controls drop Upload_Download table on jspx as
- Write down this code under valueChangeListener method.
ValueChangeListener to exicute all method:
- Now,create impl class of Application Module to insert record in the table for uploaded file.
Bean method to upload file:
AMimpl method to insert record in table:
- Now,go to Client interface of AM and shuttle the method to right side as,
- Here, pathBind is a binding variable which is used to get the path of the file which we will download.so create its binding as,
- save & run jspx page.
- Here is the link to download a sample application Upload_Download.
very helpful and explained very nicely....
ReplyDeletethanks quickADF and keep up the good work....!!
nice work... (y)
ReplyDeleteHey nice work..!! Just the way beginners want it to be demonstrated..
ReplyDeleteThanks and keep blogging further..!!
This comment has been removed by the author.
ReplyDeleteNice blog very understandable thanks
ReplyDeleteThis comment has been removed by the author.
ReplyDeletevery nice, I w looked to many others but this is the best, thansk
ReplyDeleteThanks, i tried it but when downloaded the file are corrupted ?? please tell me what's wrong with my filestore or....
ReplyDeleteVery helpful and clear to understand. Thanks
ReplyDeleteMy spouse and I love your blog and find almost all of your posts to be just what I’m looking for. Appreciating the persistence you put into your blog and the detailed information you provide. I found another one blog like you Oracle ADF.Actually I was looking for the same information on internet for Oracle Application Development Framework and came across your blog. I am impressed by the information that you have on this blog. Thanks once more for all the details.
ReplyDelete