This discussion is archived
0 Replies Latest reply: Nov 12, 2011 4:05 AM by 899470 RSS

facing problem while reading file name using inputFile component in adf

899470 Newbie
Currently Being Moderated
Hi All,

I'm using adf 11g .

I have three jsff pages , in one dem i have to upload file from remote location.

I'm using task flow (bounded) . in which i'm using three jff.And there is a navigation between jff pages.

and I drag the task flow(bounded) in one jspx page as a region and also set the page's <af: form usesUpload="true">

the code snippet for uploading file.

<af:inputFile label="#{UIMessage['IMPORT_FILE_LABEL']}"
<af:inputText label="File Name"
value="#{PartyManagedBean.fileName}" readOnly="true"
<af:commandButton text="#{UIMessage['UPLOAD_BUTTON_LABEL']}"
id="cb2" partialSubmit="true"

i have used to in upload jff. Here in below code i'm try'g to capture the path/source to the file .

i have wrote setter and getter methods(using binding property in jsff).

But when I try to read file name in managed bean , I got null pointer exception .

Here is code snippet for reading file name
UploadedFile myfile = (UploadedFile)this.getUploadfile();

System.out.println(" myfile.getFilename():::"+ myfile.getFilename());

any suggestion/clue .....

thanks in advance.

Edited by: 896467 on Nov 12, 2011 12:43 AM

Edited by: 896467 on Nov 12, 2011 5:29 PM


  • Correct Answers - 10 points
  • Helpful Answers - 5 points