0 Replies Latest reply on Sep 9, 2013 4:00 AM by Adnan.Salim

    messageFileUpload - unable to set link name




      I have a requirement to set file link name as original file uploaded name. I am using below code @ PFR under submit button action.


                //Attachment Handling

                 OAViewObject vo1 = (OAViewObject)am.findViewObject("SehaEmpPassportVO1");



                 int rowcount = vo1.getFetchedRowCount();



                 for (int i = 1; i <=rowcount; i++)


                 Row row = vo1.getRowAtRangeIndex(i);



                 /////////  Code to populate Blob Data Starts//////////////

                 DataObject fileUploadData = (DataObject)pageContext.getNamedDataObject ("AttachEmpPassport");


                           if(fileUploadData != null)


                                 String uFileName =

                                 (String) fileUploadData.selectValue(null,"UPLOAD_FILE_NAME");

                                 System.out.println("uFileName "+uFileName); //TBD

                                 String contentType =

                                 (String) fileUploadData.selectValue(null,"UPLOAD_FILE_MIME_TYPE");

                                 System.out.println("contentType "+contentType); //TBD

                                 //row.setAttribute("Attachment1 ", createBlobDomain(fileUploadData));  // Your VO Blob Column name

                                 row.setAttribute("Attachment1FileName", uFileName);   // Your VO File name if exists

                                 row.setAttribute("Attachment1FileType", contentType);      // Your VO Content_Type/Mime_Type if exists


                 /////////  Code to populate Blob Data Ends//////////////



      Please help. It's very urgent.

      Thank you.