0 Replies Latest reply: Sep 8, 2013 11:00 PM by Adnan.Salim RSS

    messageFileUpload - unable to set link name

    Adnan.Salim

      Hi,

       

      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.


      regards,

      adnan..