About file uploading in bdc

hi,
what is the use of file uploading in bdc.
i mean that how can i see that my file was updated or not.
or where updation has happend using this files in both
session method and call transaction method.
i hope u can understood my problem.
hoping for good answer.
thanks

TYPE-POOLS : TRUXS.
TYPES : BEGIN OF TYP_OUT,
  PLVAR(2)  TYPE C,
  OTYPE(2)  TYPE C,
  SEARK(12) TYPE C,
  INFTY(4)  TYPE C,
  SUBTY(4)  TYPE C,
  ISTAT(1)  TYPE C,
  BEGDA(10) TYPE C,
  ENDDA(10) TYPE C,
  RSIGN(1)  TYPE C,
  RELAT(3)  TYPE C,
  SCLAS(2)  TYPE C,
  SOBID(45) TYPE C,
END OF TYP_OUT.
DATA : TA_PP02 TYPE STANDARD TABLE OF TYP_OUT INITIAL SIZE 0,
       WA_PP02 TYPE TYP_OUT.
DATA: TA_EXCEL TYPE STANDARD TABLE OF ALSMEX_TABLINE INITIAL SIZE 0,
       WA_EXCEL TYPE ALSMEX_TABLINE.
DATA : RAW_DATA TYPE TRUXS_T_TEXT_DATA.
DATA: TA_BDCDATA TYPE STANDARD TABLE OF BDCDATA ,
       WA_BDCDATA TYPE BDCDATA,
       TA_BDCMESSAGE TYPE TABLE OF BDCMSGCOLL,
       WA_BDCMESSAGE TYPE BDCMSGCOLL.
SELECTION-SCREEN : BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.
PARAMETERS FILE_N TYPE RLGRAP-FILENAME OBLIGATORY." Path name selected by user with help of Filemngr
SELECTION-SCREEN : END OF BLOCK BLK1 .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE_N.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
FIELD_NAME = 'FILE_N'
IMPORTING
FILE_NAME = FILE_N.
START-OF-SELECTION.
PERFORM UPLOAD.
PERFORM BDC_OPEN.
PERFORM BDC_SCREENS .
PERFORM BDC_CLOSE.
CALL TRANSACTION 'SM35'.
*&      Form  UPLOAD
      text
-->  p1        text
<--  p2        text
FORM UPLOAD .
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
  EXPORTING
  I_FIELD_SEPERATOR          =
  I_LINE_HEADER              =
    I_TAB_RAW_DATA             = RAW_DATA
    I_FILENAME                 = FILE_N
  TABLES
    I_TAB_CONVERTED_DATA       = TA_PP02[]
EXCEPTIONS
   CONVERSION_FAILED          = 1
   OTHERS                     = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.                    " UPLOAD
*&      Form  BDC_OPEN
      text
-->  p1        text
<--  p2        text
FORM BDC_OPEN .
  CALL FUNCTION 'BDC_OPEN_GROUP'
   EXPORTING
     CLIENT                    = SY-MANDT
    DEST                      = FILLER8
     GROUP                     = 'PP02'
    HOLDDATE                  = FILLER8
     KEEP                      = 'X'
     USER                      = SY-UNAME
  IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " BDC_OPEN
*&      Form  BDC_SCREENS
      text
-->  p1        text
<--  p2        text
FORM BDC_SCREENS .
  LOOP AT TA_PP02 INTO WA_PP02.
    REFRESH TA_BDCDATA.
    PERFORM BDC_DYNPRO      USING 'SAPMH5A0' '1000'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                  'PPHDR-ENDDA'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM BDC_FIELD       USING 'PPHDR-PLVAR'
    WA_PP02-PLVAR.
                             '01'.
    PERFORM BDC_FIELD       USING 'PPHDR-OTYPE'
    WA_PP02-OTYPE.
                             'S'.
    PERFORM BDC_FIELD       USING 'PM0D1-SEARK'
    WA_PP02-SEARK.
    PERFORM BDC_FIELD       USING 'PPHDR-INFTY'
    WA_PP02-INFTY.
    PERFORM BDC_FIELD       USING 'PPHDR-SUBTY'
    WA_PP02-SUBTY.
    PERFORM BDC_FIELD       USING 'PPHDR-ISTAT'
    WA_PP02-ISTAT.
    PERFORM BDC_FIELD       USING 'PPHDR-BEGDA'
    WA_PP02-BEGDA.
    PERFORM BDC_FIELD       USING 'PPHDR-ENDDA'
    WA_PP02-ENDDA.
    PERFORM BDC_DYNPRO      USING 'SAPMH5A0' '1000'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                  'PPHDR-PLVAR'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '=INSE'.
    PERFORM BDC_FIELD       USING 'PPHDR-PLVAR'
    WA_PP02-PLVAR.
    PERFORM BDC_FIELD       USING 'PPHDR-OTYPE'
    WA_PP02-OTYPE.
    PERFORM BDC_FIELD       USING 'PM0D1-SEARK'
    WA_PP02-SEARK.
    PERFORM BDC_FIELD       USING 'PPHDR-INFTY'
    WA_PP02-INFTY.
    PERFORM BDC_FIELD       USING 'PPHDR-ISTAT'
    WA_PP02-ISTAT.
   PERFORM BDC_FIELD       USING 'PPHDR-BEGDA'
   WA_PP02-BEGDA.
   PERFORM BDC_FIELD       USING 'PPHDR-ENDDA'
   WA_PP02-ENDDA.
  PERFORM BDC_DYNPRO      USING 'MP100100' '2000'.
  PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                              'P1001-SOBID'.
  PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                              '/00'.
  PERFORM BDC_FIELD       USING 'P1001-BEGDA' WA_PP02-BEGDA.
                             '01.12.2009'.
  PERFORM BDC_FIELD       USING 'P1001-ENDDA' WA_PP02-ENDDA.
                             '31.12.9999'.
  PERFORM BDC_FIELD       USING 'P1001-RSIGN' WA_PP02-RSIGN.
                             'A'.
  PERFORM BDC_FIELD       USING 'P1001-RELAT' WA_PP02-RELAT.
                             '002'.
  PERFORM BDC_FIELD       USING 'P1001-SCLAS' WA_PP02-SCLAS.
                             'S'.
  PERFORM BDC_FIELD       USING 'P1001-SOBID' WA_PP02-SOBID.
                             '50001923'.
  PERFORM BDC_DYNPRO      USING 'MP100100' '2000'.
  PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                  'P1001-BEGDA'.
  PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '=UPD'.
  PERFORM BDC_DYNPRO      USING 'SAPMH5A0' '1000'.
  PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                 'PPHDR-PLVAR'.
  PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '=BACK'.
  CALL FUNCTION 'BDC_INSERT'
  EXPORTING
   TCODE                  = 'PP02'
   TABLES
    DYNPROTAB              = TA_BDCDATA.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
   PERFORM BDC_TRANSACTION USING 'PP02'.
  ENDLOOP.
PERFORM CLOSE_GROUP.
ENDFORM.                    " BDC_SCREENS
*&      Form  BDC_CLOSE
      text
-->  p1        text
<--  p2        text
FORM BDC_CLOSE .
  CALL FUNCTION 'BDC_CLOSE_GROUP'
   EXCEPTIONS
     NOT_OPEN          = 1
     QUEUE_ERROR       = 2
     OTHERS            = 3
  IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " BDC_CLOSE
*& Form bdc_dynpro
*text
*-->P_1269 text
*-->P_1270 text
FORM BDC_DYNPRO USING PROGRAM TYPE SY-REPID
DYNPRO TYPE ANY.
WA_BDCDATA-PROGRAM = PROGRAM.
WA_BDCDATA-DYNPRO = DYNPRO.
WA_BDCDATA-DYNBEGIN = 'X'.
APPEND WA_BDCDATA TO TA_BDCDATA.
CLEAR WA_BDCDATA.
ENDFORM. " bdc_dynpro
**& Form bdc_field
*text
*-->P_1329 text
*-->P_1330 text
FORM BDC_FIELD USING FNAM TYPE ANY
FVAL TYPE ANY.
IF FVAL NE ''.
WA_BDCDATA-FNAM = FNAM.
WA_BDCDATA-FVAL = FVAL.
APPEND WA_BDCDATA TO TA_BDCDATA.
CLEAR WA_BDCDATA.
ENDIF.
ENDFORM. " bdc_field

Similar Messages

  • Question about File upload functionality in Weblogic

    Hi,
        We're currently trying to deploy a web application on the weblogic 12c server (via war file). And the app needs to upload a text file onto the a temperary directory within weblogic server. And on the web page side, we use JQuery File upload plugin.
        My question is, on the file receiver side, does weblogic provide any tools to receive the uploaded file and store it?
    Thanks very much in advance.

    Hi,
    Before setting the string or xstring to server->response->set_cdata (string) or server->response->set_data (xstring) try this:
    CONCATENATE 'attachment;filename=' lv_filename '.xml'  INTO lv_string.
    * Setting the filename by default
      server->response->set_header_field( name  = 'Content-Disposition'
                                          value = lv_string ).
    Hope this helps.
    Regards,
    Abhinav

  • Question about file uploads

    is having a file upload function on a web page a hard thing to do?
    i need to do this, but i do not know where to start...
    if anyone can help me out/shed some light on this for me that would be greatly appreciated!~!!!
    THANKS!

    No it is not particularly difficult; I let the user select a file on the client filesystem then upload to the server.
    The form ENCTYPE must be multipart/form-data:
    <FORM NAME="frmUpload" ENCTYPE="multipart/form-data" METHOD="POST" ACTION=...>
    Use:
    <INPUT TYPE="file" NAME="srcFile" SIZE="15" MAXLENGTH="40">
    In my servlet:
    verify:
    String contentType = request.getHeader("Content-Type");
    if (contentType.indexOf("multipart/form-data") < 0)     {
    ...handle error...
    String boundary = contentType.substring(contentType.indexOf("boundary=") + 9, contentType.length());
    private boolean TransferFile(ServletInputStream is, String srcFile,
    String destDir,String caseNo, String boundary, String errorPage,
    HttpServletRequest request, HttpServletResponse response) throws ServletException
    File pathName = new File(...);
    // If the target directory does not already exist then create it.
    if (!pathName.exists()) {
    pathName.mkdir();
    if (!pathName.exists()) {  // did mkdir work?
    ... do lots more checking ...
    boolean xferOK = false;
    try {
    FileOutputStream fout = new FileOutputStream(...);
    byte[] nextBytes = null;
    byte[] currBytes = null;
    while ((nextBytes = ReadLine(is)) != null) {
    if (currBytes != null) {
    String snippet = "";
    if (nextBytes.length - 10 <= boundary.length())
    snippet = new String(nextBytes);
    if (snippet.indexOf(boundary) < 0)
    fout.write(currBytes, 0, currBytes.length);
    else
    fout.write(currBytes, 0, currBytes.length - 2);
    currBytes = nextBytes;
    fout.close();
    xferOK = true;
    catch (IOException ioe) {
    return xferOK;
    } // TransferFile()
    Hope this helps

  • Need Tutorial about file upload

    Hi folks!
    Have anybody a link or something else to a tutorial for uploading files with JSF?
    And i mean with the "plain" JSF RI 1.2 from Sun. Google gives me a lot of Websites with Apache myFaces and myfaces extensions, but i use facelets.
    So i have to bring all the the packages together and to mutch action for my little app.
    Greetings, cpt.crispy

    Using plain JSF RI 1.2 is not possible to do what you want.That's a pity!
    So, you need to use an additional component library
    like apache tomahawk.I know that. But what does the "additional component library" do?
    Don't misunderstand me please. I want to learn how file uploads works in JSF and J2EE, not to learn some "magic" libraries.
    For most Java problems you can get "additional libraries", but sometimes it's better you make it on your own to learn how it works.
    Thanks for your reply, cpt.crispy

  • About file upload

    Hi all;
    I have problem which is i down load the image in my table when i upload it it give me error like forbidden 403.
    Please help me
    thanks.

    thanks Denes to get interested
    I can upload all the doc i want with less than a total cumulated size of 100Mo. But
    I think that i've found. After have try to change different values in the SGA and PGA parameters without result, i'm almost sure my problem comes from the size of my temporary tablespace. I'm not Oracle specialist and i didn't expect this tablespace was in use during this operation. I'll make some tests but it should be work if i increase this buffer. But i don't understand, for downloading blob with 4Go size, do you have to fix temp tablespace size to 4Go?
    For those who could be interested, there is my code (don't be afraid, there is a lot of comments):
    [package client;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class DocBlobData {
        public DocBlobData(String location, Log myLog, Integer IdBlob) {
            myLog.lineWriter("**********************************************");
            myLog.lineWriter("********** START document uploading **********");
            try {
                upLoadFile(location, myLog, (blobDocQuery(myLog, IdBlob)));
                myLog.lineWriter("****** COMPLETE upload of this document ******");
                myLog.lineWriter("**********************************************");
            } catch (Exception e) {
    myLog.lineWriter("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
    myLog.lineWriter("!!!!!!!! ERROR during upload operation !!!!!!!");
    myLog.lineWriter("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
    * Take a document find at "location" then execute the query passed
    * as parameter for insert or update a blob into the database
    public static void upLoadFile(String location, Log myLog,
    String query) throws Exception {
    Connection conn = Log.oracleConnectionCreation();
    File myFile = new File(location.toLowerCase());
    InputStream myFileInStream = new FileInputStream(myFile);
    try {
    PreparedStatement ps = conn.prepareStatement(query);
    try {
    ps.setBinaryStream(1, myFileInStream, (int)myFile.length());
    ps.executeUpdate();
    myLog.lineWriter("following file has been uploaded");
    myLog.lineWriter("from :", myFile.getAbsolutePath());
    myLog.lineWriter("name :", myFile.getName());
    } catch (Exception e) {
    myLog.lineWriter("!!!!!!!!!! ERROR with following file !!!!!!!!!");
    myLog.lineWriter("from :", myFile.getAbsolutePath());
    myLog.lineWriter("name :", myFile.getName());
    } finally {
    ps.close();
    } finally {
    myFileInStream.close();
    conn.close();
    * Return the query "insert..." when the ID proposed doesn't already exist
    * and return "update..." if the needed ID already exists
    public static String blobDocQuery(Log myLog, Integer Id) throws Exception {
    Connection conn = Log.oracleConnectionCreation();
    String tableDoc = "DOC_BLOB";
    String columnDoc = "ABLOB";
    String id_columnDoc = "ID_BLOB";
    Integer idDoc = Id;
    String upDateDoc =
    "update " + tableDoc + " set " + id_columnDoc + " = " + idDoc +
    ", " + columnDoc + " = ? where " + id_columnDoc + " = " + idDoc;
    String insertDoc =
    "insert into " + tableDoc + " (" + id_columnDoc + ", " +
    columnDoc + ")" + " values " + "(" + idDoc + ", ?)";
    String testQuery =
    "select * from " + tableDoc + " where " + id_columnDoc + " = " +
    idDoc;
    try {
    Statement ps = conn.createStatement();
    ResultSet result = ps.executeQuery(testQuery);
    if (result.next()) {
    /* myLog.lineWriter("The query returned by blobDocQuery is :" +
    upDateDoc); */
    return upDateDoc;
    } else {
    /* myLog.lineWriter("The query returned by blobDocQuery is :" +
    insertDoc); */
    return insertDoc;
    } finally {
    conn.close();
    * Take a repertory path then found the document details in function of its ID
    * finally download the document into the repertory from the blob
    * and name it with the pattern "type_name.extension"
    public static void downloadFile(Log myLog, String location,
    Integer Id) throws Exception {
    Connection conn = Log.oracleConnectionCreation();
    String table = "DOC_BLOB"; // Table for storing the Blob
    String column = "ABLOB"; // Column for storing the Blob
    String id_column = "ID_BLOB"; // Column for storing the Id
    Integer id = Id; // Fix the id wanted
    location =
    location + "/" + DocDetailData.findTypefromBlobId(myLog, id) +
    "_" + DocDetailData.findNamefromBlobId(myLog, id) +
    DocDetailData.findExtensionfromBlobId(myLog, id);
    File myFile = new File(location.toLowerCase());
    FileOutputStream myFileOutStream = new FileOutputStream(myFile);
    myLog.lineWriter("**********************************************");
    myLog.lineWriter("********* START document downloading *********");
    try {
    String request =
    "select " + column + " from " + table + " where " + id_column +
    " = ? ";
    PreparedStatement ps = conn.prepareStatement(request);
    try {
    ps.setInt(1, id);
    ResultSet rs = ps.executeQuery();
    try {
    if (rs.next()) {
    InputStream myFileInStream =
    rs.getBinaryStream(column);
    byte[] buffer = new byte[1024];
    int length = 0;
    while ((length = myFileInStream.read(buffer)) != -1) {
    myFileOutStream.write(buffer, 0, length);
    myLog.lineWriter("***** COMPLETE download of this document *****");
    myLog.lineWriter("**********************************************");
    } finally {
    rs.close();
    } finally {
    ps.close();
    } finally {
    myFileOutStream.close();
    conn.close();
    * This main is used for testing purposes
    public static void main(String[] args) {
    Log myLog =
    Log.myLogCreation("c:/Migration Logs/", "Test_DocBlobData.log");
    Integer idEntryBlob =
    1; // Fix the Id used into the database for the Blob
    // Uncomment the following lines for testing the function blobDocQuery(Log,Integer)
    /* try {
    blobDocQuery(myLog, idEntryBlob);
    } catch (Exception f) {
    myLog.lineWriter("!!! ERROR during execution of blobDocQuery");
    // Uncomment the following lines for testing the function upLoadFile(String,Log,String)
    // You must create a document text using Notepad at the root of C with name "test"
    /* try {
    upLoadFile("c:\\image_vide.GIF", myLog, "update DOC_BLOB set ID_BLOB = 1, ABLOB = ? where ID_BLOB = 1");
    //"insert into DOC_BLOB (ID_BLOB, ABLOB) values ( 1, ?)");
    } catch (Exception f) {
    myLog.lineWriter("!!! ERROR during execution of upLoadFile");
    /* try {
    downloadFile(myLog, "c:/", 1);
    } catch (Exception e) {
    myLog.lineWriter("!!! ERROR during execution of downloadFile");
    I add just this function quite useful in my case, which enables to circulate through a folder arborescence :
    * Enable to progress through a complexe directory and each one of its dependences
    * All the documents found into this directory are uploaded into the database
    * Their details are loaded too with keeping link between the doc and its details
    public void parseFilesNUpLoad(File rootFolder,
    Log myLog) throws Exception {
    myLog.lineWriter("the root folder is : ",
    rootFolder.getAbsolutePath());
    if (rootFolder.isDirectory()) {
    File[] list = rootFolder.listFiles();
    if (list != null) {
    for (int i = 0; i < list.length; i++) {
    parseFilesNUpLoad(list[i], myLog);
    if (list[i].isFile()) {
    DocBlobData blobTest =
    new DocBlobData(list[i].getAbsolutePath(), myLog,
    idEntryBlob);
    myLog.lineWriter(" ");
    DocDetailData detailTest =
    new DocDetailData(list[i].getAbsolutePath(), myLog,
    idEntryBlob, idEntryDetails);
    myLog.lineWriter(" ");
    idEntryBlob = idEntryBlob + 1;
    idEntryDetails = idEntryDetails + 1;
    } else {
    myLog.lineWriter("parseFilesNUpLoad",
    "!!! CRITICAL ERROR with the root folder at : " +
    rootFolder.getAbsolutePath());
    And the last one, for populating the log and create the connection to the DB
    [package client;
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.text.DateFormat;
    import java.util.Calendar;
    import java.util.Date;
    import java.util.Locale;
    public class Log {
        private String fileName;
        public Log(String name) {
            this.fileName = name;
    public void lineWriter(String line) {
    try {
    FileWriter f = new FileWriter(fileName, true);
    BufferedWriter bf = new BufferedWriter(f);
    Calendar c = Calendar.getInstance();
    Date now = c.getTime();
    String dateLog =
    DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM,
    Locale.FRANCE).format(now);
    bf.write("[" + dateLog + "] :" + line);
    bf.newLine();
    bf.close();
    } catch (IOException e) {
    System.out.println(e.getMessage());
    public void lineWriter(String header, String info) {
    lineWriter(header + " > " + info);
    public void lineWriter(String header, Long info) {
    lineWriter(header + " > " + info);
    public static Log myLogCreation(String location, String name) {
    boolean exists = (new File(location)).exists();
    if (!exists) {
    (new File(location)).mkdirs();
    Log myLog = new Log(location + name);
    return myLog;
    public static Connection oracleConnectionCreation() throws Exception {
    // Register the Oracle JDBC driver
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    //connecting to the DB
    Connection conn =
    DriverManager.getConnection("jdbc:oracle:thin:@192.192.20.1:1521:DFLY",
    "DFLYDB", "DFLYDB");
    // DriverManager.getConnection("jdbc:oracle:thin:@192.192.20.1:1521:DFLY", "DFLYDB", "DFLYDB");
    return conn;
    cheers,
    Tif

  • I'm confused about file uploading mechanism in richfaces

    I'm going to use <rich:fileUpload> to uploading files. This is some part of my backing bean named FileUploadBean:
    private List data = new ArrayList();
    public List getFileList () {
             return data;
         public void listener(UploadEvent event){
             UploadItem item = event.getUploadItem();
             System.out.println("File : '" + item.getFileName() + "' was uploaded");
             if (item.isTempFile()) {
              File file = item.getFile();
              System.out.println("Absolute Path : '" + file.getAbsolutePath() + "'!");
              file.delete();
             }else {
                  try {
                        ByteArrayOutputStream b = new ByteArrayOutputStream();
                        b.write(item.getData());
                        System.out.println(b.toString());
                   } catch (Exception e) {
                        e.printStackTrace();
         public String test(){
              if (getData() != null ){
                   String test = getData().get(0).toString();
                   System.out.println("Ausgeben:" + test );
              return null;
         }And this is my jsf file named upload.jsp:
    <h:form enctype="multipart/form-data">
                <rich:fileUpload fileUploadListener = "#{fileUploadBean.listener}"
                        uploadData = "#{fileUploadBean.data}"
                        listWidth = "#{fileUploadBean.width}" listHeight="#{fileUploadBean.height}"
                        maxFilesQuantity = "#{fileUploadBean.maxFiles}"
                    acceptedTypes = "*">
                    <a4j:support event="onuploadcomplete" reRender="info" />
                </rich:fileUpload>
                <h:panelGroup id="info">
                    <rich:panel bodyClass="info">
                        <f:facet name="header">
                            <h:outputText value="Uploaded Files Info" />
                        </f:facet>
                    </rich:panel>
                    <rich:spacer height="3"/>
                    <br />
                    <a4j:commandButton action = "#{fileUploadBean.test}"
                        reRender="info, upload" value="Clear Uploaded Data" />
                </h:panelGroup>
        </h:form>When I do upload using this upload.jsf every thing is ok and at last I see message DONE and the lines below in console:
                    File : 'D:\Documents and Settings\Admin\My Documents\My Pictures\1_java_logo.gif' was uploaded
         Absolute Path : 'D:\DOCUME~1\Admin\LOCALS~1\Temp\6a335dad-11b25ebea8d--800021601.upload'!But I can't find any file anywhere in my computer and there is nothing in Uploaded Files panel. How can I control the destination of uploaded files? is there something wrong?

    Laura_Jlover wrote:
    I'm going to use <rich:fileUpload> to uploading files. This is some part of my backing bean named FileUploadBean:First of all, logically, you might have more luck asking RichFaces related questions in the RichFaces forum at JBoss.org instead of asking it in Sun JSF forum at Sun.com.
    System.out.println("Absolute Path : '" + file.getAbsolutePath() + "'!");
    file.delete();
    File : 'D:\Documents and Settings\Admin\My Documents\My Pictures\1_java_logo.gif' was uploaded
    Absolute Path : 'D:\DOCUME~1\Admin\LOCALS~1\Temp\6a335dad-11b25ebea8d--800021601.upload'!But I can't find any file anywhere in my computer and there is nothing in Uploaded Files panel. How can I control the destination of uploaded files? is there something wrong?I don't know how the rich:fileUpload is supposed to work (you should read its documentation at their own website), but according to the console output and the code logic you've deleted the file instead of writing it.

  • File uploading / downloading

    hello all,
    can any one explain me about file uploading and downloading.
    how the FM's GUI_UPLOAD and DOWNLOAD works,
    also why we do not use the FM's WS_UPLOAD
    if any material regarding this plz mail me at [email protected]
    thanks for help in advance.
    vikas

    Hi vikas,
    there  r 3 function modules for downloading the data from internal(dictionary)
    tables into the files in application server.
    1.DOWNLOAD
    2.WS_DOWNLOAD
    3.GUI_DOWNLOAD
    just hv a look on the following code.
    TABLES: VBAK,VBAP.
    DATA: BEGIN OF I_VBAK OCCURS 0,
          VBELN LIKE VBAK-VBELN,
          ERDAT LIKE VBAK-ERDAT,
          ERNAM LIKE VBAK-ERNAM,
          AUDAT LIKE VBAK-AUDAT,
          VBTYP LIKE VBAK-VBTYP,
          END OF I_VBAK.
    DATA: BEGIN OF I_VBAP OCCURS 0,
          VBELN LIKE VBAP-VBELN,
          POSNR LIKE VBAP-POSNR,
          MATNR LIKE VBAP-MATNR,
          CHARG LIKE VBAP-CHARG,
          MATKL LIKE VBAP-MATKL,
          END OF I_VBAP.
    DATA: BEGIN OF IT_VBAK OCCURS 0,
          VBELN LIKE VBAK-VBELN,
          ERDAT LIKE VBAK-ERDAT,
          ERNAM LIKE VBAK-ERNAM,
          AUDAT LIKE VBAK-AUDAT,
          VBTYP LIKE VBAK-VBTYP,
          POSNR LIKE VBAP-POSNR,
          MATNR LIKE VBAP-MATNR,
          CHARG LIKE VBAP-CHARG,
          MATKL LIKE VBAP-MATKL,
          END OF IT_VBAK.
    SELECT VBELN ERDAT ERNAM AUDAT VBTYP FROM VBAK INTO TABLE I_VBAK.
    SELECT VBELN POSNR MATNR CHARG MATKL FROM VBAP INTO TABLE I_VBAP.
    SORT: I_VBAK BY VBELN,I_VBAP BY VBELN.
    LOOP AT I_VBAK.
    READ TABLE I_VBAP WITH KEY VBELN = I_VBAK-VBELN BINARY SEARCH.
    IF SY-SUBRC = 0.
      MOVE I_VBAK-VBELN TO IT_VBAK-VBELN.
      MOVE I_VBAK-ERDAT TO IT_VBAK-ERDAT.
      MOVE I_VBAK-ERNAM TO IT_VBAK-ERNAM.
      MOVE I_VBAK-AUDAT TO IT_VBAK-AUDAT.
      MOVE I_VBAK-VBTYP TO IT_VBAK-VBTYP.
      MOVE I_VBAP-POSNR TO IT_VBAK-POSNR.
      MOVE I_VBAP-MATNR TO IT_VBAK-MATNR.
      MOVE I_VBAP-CHARG TO IT_VBAK-CHARG.
      MOVE I_VBAP-MATKL TO IT_VBAK-MATKL.
    APPEND IT_VBAK.
    ENDIF.
    ENDLOOP.
    *& IT ASKS THE CONFIRMATION FOR THE FILE FORMATE,WE CAN CHANGE THE FILENAME DYNAMICALLY(e.g DOC-TXT,XLS)
    *CALL FUNCTION 'DOWNLOAD'
    EXPORTING
      BIN_FILESIZE                  = ' '
      CODEPAGE                      = ' '
      FILENAME                      = 'D:\C1.TXT'
      FILETYPE                      = 'DAT'   "ASC is also another format
      ITEM                          = ' '
      MODE                          = ' '
      WK1_N_FORMAT                  = ' '
      WK1_N_SIZE                    = ' '
      WK1_T_FORMAT                  = ' '
      WK1_T_SIZE                    = ' '
      FILEMASK_MASK                 = '.TXT'
      FILEMASK_TEXT                 = ' '
      FILETYPE_NO_CHANGE            = 'X'
      FILEMASK_ALL                  = ' '
      FILETYPE_NO_SHOW              = 'X'     "THIS WILL NOT SHOW THE FILE TYPE(DAT) WHILE CONFIRMATION OF FILE NAME
      SILENT                        = 'S'
      COL_SELECT                    = ' '
      COL_SELECTMASK                = ' '
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      ACT_FILENAME                  =
      ACT_FILETYPE                  =
      FILESIZE                      =
      CANCEL                        =
    TABLES
       DATA_TAB                      = IT_VBAK
      FIELDNAMES                    =
    EXCEPTIONS
      INVALID_FILESIZE              = 1
      INVALID_TABLE_WIDTH           = 2
      INVALID_TYPE                  = 3
      NO_BATCH                      = 4
      UNKNOWN_ERROR                 = 5
      GUI_REFUSE_FILETRANSFER       = 6
      OTHERS                        = 7
    *IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    *& this will not ask for the confirmation for the filename
    *CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
      BIN_FILESIZE                  = ' '
      CODEPAGE                      = ' '
      FILENAME                      = 'D:\C2.DOC'
      FILETYPE                      = 'DAT'
      MODE                          = ' '
      WK1_N_FORMAT                  = ' '
      WK1_N_SIZE                    = ' '
      WK1_T_FORMAT                  = ' '
      WK1_T_SIZE                    = ' '
      COL_SELECT                    = ' '
      COL_SELECTMASK                = ' '
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
    TABLES
       DATA_TAB                      = IT_VBAK
      FIELDNAMES                    =
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_WRITE_ERROR              = 2
      INVALID_FILESIZE              = 3
      INVALID_TYPE                  = 4
      NO_BATCH                      = 5
      UNKNOWN_ERROR                 = 6
      INVALID_TABLE_WIDTH           = 7
      GUI_REFUSE_FILETRANSFER       = 8
      CUSTOMER_ERROR                = 9
      NO_AUTHORITY                  = 10
      OTHERS                        = 11
    *IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = 'D:\C5.DOC'
       FILETYPE                        = 'ASC'  "Separate Columns by Tabs in Case of ASCII Download
      APPEND                          = ' '
       WRITE_FIELD_SEPARATOR           = 'X'
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
        CONFIRM_OVERWRITE               = 'X' "Overwrite The File Only After
                        Confirmation                          
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
      WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = IT_VBAK
      FIELDNAMES                      =
    EXCEPTIONS
      FILE_WRITE_ERROR                = 1
      NO_BATCH                        = 2
      GUI_REFUSE_FILETRANSFER         = 3
      INVALID_TYPE                    = 4
      NO_AUTHORITY                    = 5
      UNKNOWN_ERROR                   = 6
      HEADER_NOT_ALLOWED              = 7
      SEPARATOR_NOT_ALLOWED           = 8
      FILESIZE_NOT_ALLOWED            = 9
      HEADER_TOO_LONG                 = 10
      DP_ERROR_CREATE                 = 11
      DP_ERROR_SEND                   = 12
      DP_ERROR_WRITE                  = 13
      UNKNOWN_DP_ERROR                = 14
      ACCESS_DENIED                   = 15
      DP_OUT_OF_MEMORY                = 16
      DISK_FULL                       = 17
      DP_TIMEOUT                      = 18
      FILE_NOT_FOUND                  = 19
      DATAPROVIDER_EXCEPTION          = 20
      CONTROL_FLUSH_ERROR             = 21
      OTHERS                          = 22
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    if u need any help abt this one,i welcome u to clarify them.
    reward points,if it is useful.

  • Flash 8 file upload .doc & .pdf help, please

    I've been working with the file upload sample that came with
    Flash 8 as well
    as other sources to help me figure this one out... like:
    http://www.flash-db.com/Tutorials/upload/index.php
    Everything I seem to find out about file uploading with Flash
    specifically
    deals with images, but I need to upload .doc & .pdf files
    to attach to an
    email as part of an employment application process for a site
    that is built
    with Flash.
    The back-end script is a simple ColdFusion file that I've
    tested (and works
    fine with a static HTML test page):
    <cffile action="upload"
    destination = "ServerAddressHERE"
    accept = "image/jpg, application/msword, application/pdf"
    fileField = "Form.resumeFile"
    nameConflict = "Overwrite">
    The Flash example script that comes with Flash 8 has been
    modified as
    follows:
    System.security.allowDomain(" FQDN_here");
    import flash.net.FileReference;
    // The listener object listens for FileReference events.
    var listener:Object = new Object();
    // When the user selects a file, the onSelect() method is
    called, and
    // passed a reference to the FileReference object.
    listener.onSelect = function(selectedFile:FileReference):Void
    // Update the TextArea to notify the user that Flash is
    attempting to
    // upload the image.
    statusArea.text += "Attempting to upload " +
    selectedFile.name + "\n";
    // sample code provided by Flash
    selectedFile.upload("
    http://www.helpexamples.com/flash/file_io/uploadFile.php");
    // my modification here (I have tried absolute references as
    well):
    selectedFile.upload("upfile.cfm");
    listener.onOpen = function(selectedFile:FileReference):Void {
    statusArea.text += "Opening " + selectedFile.name + "\n";
    // Once the file has uploaded, the onComplete() method is
    called.
    listener.onComplete =
    function(selectedFile:FileReference):Void {
    // Notify the user that Flash is starting to download the
    image.
    statusArea.text += "Downloading " + selectedFile.name + " to
    player\n";
    // this part is irrelevant to my needs and I've worked with
    and without it
    imagesCb.addItem(selectedFile.name);
    imagesCb.selectedIndex = imagesCb.length - 1;
    downloadImage();
    var imageFile:FileReference = new FileReference();
    imageFile.addListener(listener);
    uploadBtn.addEventListener("click", uploadImage);
    // this part is irrelevant to my needs and I've worked with
    and without it
    imagesCb.addEventListener("change", downloadImage);
    imagePane.addEventListener("complete", imageDownloaded);
    function imageDownloaded(event:Object):Void {
    if(event.total == -1) {
    imagePane.contentPath = "Message";
    // this part is where I added the extensions I need:
    function uploadImage(event:Object):Void {
    imageFile.browse([{description: "Image Files", extension:
    "*.jpg;*.gif;*.png;*.doc;*.pdf,"}]);
    ANY ideas would be sincerely appreciated... even if it's just
    to confirm
    that the Flash file upload process ONLY works with image
    files.... Thank you
    ALL in advance for ANY help I can get. :-)

    Did you ever get your issue with the F12, publish preview,
    not loading your browser? I have just upgraded from MX 2004 to 8
    and now have this issue.
    T Peluso
    [email protected]

  • File upload suggestion

    can anyone of u tell me that where can i get the information about file uploading please give me the link of that

    There is Apache FTP client that will do FTP upload for you.
    Browse http://apache.org FTP client API.

  • I need some information about File Download & File Upload

    Hi  All,
    Can any one help me on this, I need some information about File Download & File Upload.
    I read tutorial abt file upload and download but some of methods in tutorial are deprecated so i need clear information abt File upload and Download, if possible Code examples.
    Thanks
    Ragards
    Ravi Golla

    Hi Ravi
    Check out thses links for examples:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71
    /docs/DOC-8661#22 [original link is broken]
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/202a850a-58e0-2910-eeb3-bfc3e081257f
    Otherwise you can simply follow this code for file download
    Use the code like this.
    1) Create the button and bind the action for it.
    2)then write this code in the action.
    3) do not write any thing in the init method.
    try {
    final byte[] content = this.getByteArrayFromResourcePath("C:
    xyz.properties");
    final IWDCachedWebResource resource = WDWebResource.getWebResource(content, WDWebResourceType.UNKNOWN);
    try {
    final IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(resource.getAbsoluteURL(), "WD_Filedownload", false);
    window.open();
    catch(Exception e)
    wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(e), false);
    5) writr the method getByteArrayFromResourcePath
    //@@begin others
    private byte[] getByteArrayFromResourcePath(String resourcePath)
    throws FileNotFoundException, IOException {
    FileInputStream in = new FileInputStream(new File(resourcePath));
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    int len;
    byte[] part = new byte[10 * 1024];
    while ((len = in.read(part)) != -1) {
    out.write(part, 0, len);
    in.close();
    return out.toByteArray();
    //end
    Similarly for file upload
    Similarly for upload in to server path also do the same
    IWDAttributeInfo attInfo =
    wdContext.getNodeInfo().getAttribute("upload");
    binaryType =
    (IWDModifiableBinaryType) attInfo.getModifiableSimpleType();
    uploadedName = binaryType.getFileName();
    File filename =new File("
    <server name>
    <folder name>
    "+uploadedName ); );
    try {
    FileOutputStream out = new FileOutputStream(filename);
    out.write(b);
    out.close();
    } catch (FileNotFoundException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();

  • File Upload UI element is not working properly inside Table Popin container

    Hi Expert,
    I created a table with popin, i placed file-upload UI element inside table popin contatiner.
    The file upload UI element is displaying properly but, when i click the browse button to select  the file, the file open dialog box is not popping out.
    will table popin support file-upload UI element inside it?
    it not is there any other way to call a file_open dialog box from inside the table popin.
    Thanks,
    James

    If you are on NetWeaver 7.01, you can try both the ACFUpDownload UI element or try creating your own FileUpload in Adobe Flex with Flash Islands.  ACFUpDownload requires the KPRO by default (which is why the same application isn't working for you), but you can write your own handler class to act as the KPRO receiver.  Here is an eLearning on the topic:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/109b9b52-bc00-2c10-8786-e4c5e96d7e04
    and source code:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70645070-bb00-2c10-f086-f126721acdb4
    If you want an eLearning on the FlashIslands approach, you can find it here as well:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50d42644-91ef-2b10-228c-9e0ae75b274e
    and Source Code:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f044b62c-90ef-2b10-64a6-9ec25294d133
    However in both of these approaches you still have to be careful with how you handle large files.  The problem is that they are processed often a single binary string.  This makes the processing easy, but requires total amount of session memory at least as large as the file being uploaded.  In NetWeaver 7.02 ABAP adds the concept of Streams and Locators to help with the partial processing of large files.  This feature doesn't come until later this year, but if you are interested you can learn about it here:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80f983df-213e-2c10-ba89-b5a12ef178e8

  • How can I make Firefox 4's "File Upload" window start in the same directory across all sites?

    I upload webcomic image files to multiple sites every day--the same file to multiple sites--through the "File Upload" window that comes up in Firefox when you click on a site's "Browse..." file request field.
    In Firefox 3 (under Windows XP), when I used Firefox's "File Upload" window to upload files, the "File Upload" window would come up showing the last directory from which I'd uploaded anything to ANY site.
    In Firefox 4, on the other hand, the "File Upload" window comes up showing the last directory from which I last uploaded to that specific domain.
    I'd like to know if there's an about:config setting--I couldn't find one when searching for "file," "upload," or "dir"--to revert to the Firefox 3 behavior. The reason is that now in Firefox 4, because I typically upload two files to four different web sites per day--one file to all four sites, then later in the day, a second file to all four sites--I have to switch from the first upload directory to the second upload directory in each of the four "File Upload" windows for the second file, whereas in Firefox 3 I only had to do that once. Here's how it used to go:
    In Firefox 3:
    # "File Upload" for file 1 at smbhax.com: have to browse to the local directory where the file is located, since it's a different location than file 2 from the previous day.
    # "File Upload" for file 1 at drunkduck.com: desired local directory is already selected.
    # "File Upload" for file 1 at smackjeeves.com: desired local directory is already selected.
    # "File Upload" for file 1 at comicfury.com: desired local directory is already selected.
    # "File Upload" for file 2 at smbhax.com: have to browse to the local directory where the file is located, since it's a different directory than file 1.
    # "File Upload" for file 2 at drunkduck.com: desired local directory is already selected.
    # "File Upload" for file 2 at smackjeeves.com: desired local directory is already selected.
    # "File Upload" for file 2 at comicfury.com: desired local directory is already selected.
    and here's how it goes under Firefox 4:
    # "File Upload" for file 1 at smbhax.com: have to browse to the local directory where the file is located, since it's a different location than file 2 from the previous day.
    # "File Upload" for file 1 at drunkduck.com: have to browse to the local directory where the file is located, since it's a different location than file 2 from the previous day.
    # "File Upload" for file 1 at smackjeeves.com: have to browse to the local directory where the file is located, since it's a different location than file 2 from the previous day.
    # "File Upload" for file 1 at comicfury.com: have to browse to the local directory where the file is located, since it's a different location than file 2 from the previous day.
    # "File Upload" for file 2 at smbhax.com: have to browse to the local directory where the file is located, since it's a different directory than file 1.
    # "File Upload" for file 2 at drunkduck.com: have to browse to the local directory where the file is located, since it's a different directory than file 1.
    # "File Upload" for file 2 at smackjeeves.com: have to browse to the local directory where the file is located, since it's a different directory than file 1.
    # "File Upload" for file 2 at comicfury.com: have to browse to the local directory where the file is located, since it's a different directory than file 1.
    So basically, where under Firefox 3 I only had to browse through my directories twice per day to upload two files to four sites, under Firefox 4, I have to browse through my directories eight times per day to accomplish the same thing.

    You can use the Remember Password bookmarklet: <br />
    https://www.squarefree.com/bookmarklets/forms.html#remember_password <br /> ''Has worked for me when I have needed it to save a password on a web site that used autocomplete=off.'' As far as the Bug that '''cor-el''' linked, I can't remember ever running across a website that did it like that.
    Or, you can use the Saved Password Editor extension, which includes a means of manually adding Username/Passwords to Firefox. <br />
    https://addons.mozilla.org/en-US/firefox/addon/60265

  • Calendar & File Upload Components - Threadinar6

    Hi All,
    This is the sixth in the "Threadinar" series , please see Threadinar5 at
    http://swforum.sun.com/jive/thread.jspa?threadID=99473 for details
    In this Threadinar we will focus on the
    "Calendar" and "File Upload" Components
    Let us begin our discussion with the Calendar Component.
    Calendar Component
    You can drag the Calendar component "calendar component icon" from the Palette's Basic category to a page open in the Visual Designer to create an entry field with an integrated calendar pop-up to help the user pick dates for the field.
    You can also drop the calendar on a container component, like a table cell or group box.
    After dragging the component to the Visual Designer, you can work with the following useful properties of the Calendar Component:-
    General
    * id. Type: String
    The name of the Calendar component in the page bean and the JSP file.
    Appearance
    * columns. Type: int
    The number of character columns used to render the component. The default value is 20.
    * dateFormatPattern. Type: String
    The format of the date to be entered by the user. It is not usually necessary to set this property because a pattern is chosen automatically based on the locale.
    If you prefer to specify a date format, click the ellipsis button (...) to the right of the property and select a predefined date format from the property editor's list. You can also add your own formats. If you add a format, the values you can enter are limited to some combination of yyyy for the year, MM for the month, and dd for the day separated by separator characters. Typical separator characters are / (slash), . (period), and - (dash). For example, the following date formats are acceptable:
    o MM/dd/yyyy
    o yyyy.MM.dd
    o MM-dd-yyyy
    * dateFormatPatternHelp. Type: text
    Text that appears below the date entry field and shows the format pattern that the date entry field accepts. If you have not set the dateFormatPattern property, the help text is chosen automatically for you. If you have set the dateFormatPattern property, you should bind the dateFormatPatternHelp property to a localized string that matches the setting for each locale you want to support.
    * label. Type: String
    A label that appears next to the text entry field, typically describing what the user is supposed to enter.
    o Note: The label property is not as flexible as the Label component. You can use the Label component if you want more control over the label's appearance, such as positioning of the label relative to the component.
    * labelLevel. Type: int
    A number that affects the appearance of the label. 1 (Strong) is larger and bold. 2 (Medium), the default, is smaller and bold. 3 (Weak) is smaller and normal (not bold). This property takes effect only if the label property is set.
    * style. Type: String
    Cascading Style Sheet rules (CSS level 2) to be applied to the component. For example:
    position: absolute; left: 288px; top: 312px
    You can enter values directly or click the ellipsis (...) button to use the Style Editor.
    o Note: This property overrides any settings in the theme or the project CSS file for this component. If a style specified in this property does not appear to take effect, it is because an area of the component is obscured by a child component that has different style settings.
    For a list of CSS2 style attributes, see the web page at
    http://www.w3.org/TR/REC-CSS2/propidx.html
    * styleClass. Type: String
    A space-separated list of CSS2 style classes to be applied when the component is rendered. The style classes must be defined in the project's style sheet or in the theme's CSS file. If you click the ellipsis button (...), you see a list of all styles you can add to this property. For information on adding CSS classes and rules to the project's cascading style sheet, see CSS Editor.
    o Note: See the note above under the style property description for an explanation of why a class added to this property might appear to have no effect on the component.
    o Note: If you add a CSS style class from the current theme to your project CSS file and you redefine the style class, the change affects all components that use this style class. However, you can add your own style classes to the project CSS file that redefine the default style classes, and then when you add them to this property, the changes affect only this instance of this component.
    For the defaulttheme.jar CSS style classes for this component, see Calendar Component CSS Classes.
    Data
    * maxDate. Type: java.util.Date
    The last date that the user can select. The default value is four years from the date set in the minDate property, for a total span of five years.
    * minDate. Type: java.util.Date
    The earliest date that the user can select. The default value is the value of the selectedDate property, which defaults to the current date if that property is not set.
    * required. Type: boolean
    If selected, the user must enter a value for the calendar before the page can be submitted. If you add a Message component to the page and link its for property to this component, an error message will be displayed if the user tries to submit the page without entering a value.
    * selectedDate. Type: Date
    A java.util.Date object representing the calendar date selected by the user. If you right-click the component and choose Bind to Data, you can bind this property to a data provider or object that can process the user entered value on the server.
    When the component displays initially, if this property is not set, its value defaults to the current date. If you provide values for minDate and maxDate, you can also provide a value for this property that initially displays a date in that range.
    * validator. Type: MethodBinding
    Indicates the JavaServer Faces validator that is called when the value is submitted. A validator ensures that the correct value is entered by a user. Choose a validator from the drop-down list. If you choose (null), no validator is called. If you choose a validator, also select the required property to ensure that the validator is used. For descriptions of JavaServer Faces validators, see the list of topics at List of Validators.
    o Note: If you define your own validate method, for example, by right-clicking the component and choosing Edit Event Handler > validate, any value you might have set in this property is overridden.
    File Upload Component
    You can drag the File Upload component "file upload component icon" from the Palette's Basic category to the Visual Designer to create an entry field and a browse button that opens a file chooser dialog on the local system, enabling the user either to select a file or to type a file name into the entry field. When the page is submitted, a copy of the file's contents is sent to the web application.
    The component is similar to an HTML <input type="file"> element.
    * Note: This component is neither supported by nor available in portlet projects due to security reasons.
    * Note: The size of the component in the Visual Designer might not match the size of the component when it is rendered in a web browser, making the component appear to line up correctly in the Visual Designer, but not when the page is rendered in the user's web browser. Also, the rendering of this component can differ depending on the web browser. Be sure to test the component in the web browsers that you expect your users to use. For example, if you add a width setting to the style property that is smaller than the setting in the columns property, Internet Explorer observes only the width setting, while the Mozilla browser ignores it and sets the width according to the number of characters in the columns property.
    The File upload component uses a filter, a com.sun.rave.web.ui.util.UploadFilter object that is configured for you in the web application's deployment descriptor. The UploadFilter uses the Apache commons fileupload package. You might need to change these settings in the following two cases:
    * The server holds the uploaded file in memory unless it exceeds 4096 bytes; otherwise, the server holds the file contents in a temporary file. You can change this threshold by modifying the sizeThreshold parameter for the UploadFilter filter entry in the web application's web.xml file.
    * By default, the File Upload component can handle files up to one megabyte in size. You can change the maximum file size by modifying the maxSize parameter for the UploadFilter filter entry in the application's web.xml file.
    o
    A negative value for the maxSize parameter indicates that there is no file size limit. Setting the parameter to a negative value is not recommended for security reasons. For example, if you allow unlimited file sizes, a malicious user could mount a denial of service attack on your site by using extremely large files
    * To change the settings for the UploadFilter object in the web.xml file:
    1. In the Files window, expand project-name > web > WEB-INF.
    2. Double-click the web.xml node to open the file in the XML editor.
    3. Click the Filters toolbar button.
    4. In the UploadFilter section under Initialization Parameters, you can change the values for the maxSize and sizeThreshold parameters.
    The contents of the uploaded file, together with some information about it, are stored in an instance of com.sun.rave.web.ui.model.UploadedFile. By using this object, you can get the content of the file as a String or write the contents to disk, as well as get properties such as the name and the size of the file. In the interest of conserving memory, the contents and file data are only available during the HTTP request in which the file was uploaded. To access the contents of the uploaded file, bind the uploadedFile property to a bean property of type com.sun.rave.web.ui.model.UploadedFile. Have the setter or an action method process the file.
    The UploadedFile interface has methods for getting the name and size of the file, determining the file's MIME type (such as text/plain or image/jpeg), getting the file's contents as bytes or as a String, and writing the contents to disk. To learn more, in the Java editor, right-click on UploadedFile in a declaration statement and choose Show JavaDoc from the pop-up menu.
    * To set the component's properties, select the component and edit its properties in the File Upload Properties Window.
    * Right-click the component and choose one of the following pop-up menu items:
    o Edit validate Event Handler. Opens the Java Editor with the cursor positioned in the component's validate method so you can insert code to validate the value of the component.
    o Set Initial Focus. Gives this component focus when the user opens the page.
    o Auto-submit on Change. Causes the form to be automatically submitted if the value of the component changes. Sets the component's JavaScript onclick property to common_timeoutSubmitForm(this.form, 'component-id');. At runtime, this code causes the form to be automatically submitted if the user changes the component value. Once the form is submitted, conversion and validation occur on the server and any value change listener methods execute, and then the page is redisplayed.
    A component configured to Auto-submit on Change can use virtual forms to limit the input fields that are processed when the form is submitted. If the auto-submit component is defined to submit a virtual form, only the participants in that virtual form will be processed when the auto-submit occurs.
    o Bind to Data. Bind the component's text property to an object or to a data provider. For more information, see Bind to Data Dialog Box.
    o Property Bindings. Bind any of the component's properties to an object or data provider, such as the uploadedFile property to a bean property of type com.sun.rave.web.ui.model.UploadedFile.
    o Configure Virtual Forms. Enables you to add the component to a virtual form.
    For more details on using the "File Upload Component" Please see this tutorial
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/file_upload.html
    Please share your comments, experiences, additional information, questions, feedback, etc. on these components.
    ------------------------------------------------------------------------------- --------------------

    Of interest relating to file upload component to users : "Saving Uploaded Files Uploaded by the File Upload Component " Check the blog:
    http://blogs.sun.com/roller/page/divas

  • Assigning video files uploaded via a customer form to the src file section of another page (without manually having to copy an paste over)

    Hi. I’ve set up a web form that uses html and javascript. This particular form lets you upload files. I also have another page that lets you play videos. I was wondering if anyone knows how to make the inner html of for example the upload file form field equal the file that is played by the video player on the other page.
    Basically on youtube when you upload a video it automatically makes another page with the video file you uploaded assigned to the video player on that page. I want to know how to go about doing that. So people can upload videos and then be able to watch them instantly without me manually having to create the page an assigning the right file to the page.
    Even just knowing how to create a different page each time the form is submitted would be helpful. Thanks.

    This is more complex than you realize and JavaScript alone can't do it. You'll need a server-side script like PHP to authenticate and sanitize file uploads to prevent malicious scripts or malware from ever getting to your server.  Then, your script will have to process the uploaded file by saving it to a folder or database, give it a unique ID and then redirect users to a new page that pulls the file into an HTML5 or similar player.  How good are you with server-side programming?
    Nancy O.

  • File upload java errors...HEEELPPP!

    All was working fine for months, now getting java errors in my ADDT. Mostly related to file uploads, or image uploads. I found that I don't get these errors in older sites that I've worked with, but I've created a new site and started from scratch and I'm still getting them.
    Here are the errors and what I'm doing:
    *I go insert record form wizard (in ADDT)
    *One field is a date, others are text, one is an integer, one is a file field
    That works ok up to here.
    *Then I choose ADDT > File upload. I get the following error immediately: "While executing canApplyserverBehavior in kb_FileUpload.htm, a javascript error occured."
    *I click ok, the wizard box attempts to load and it give me the error: "While executing onLoad in kb_FileUpload.htm, the following javascript errors occured:
    At line 354 of the file "Macintosh HD:Applications:Adobe Dreamweaver CS3:Configuration:Shared:DeveloperToolbox:classes:triggerUtil.js":
    TypeError: hash[transactionColumn[k]].push is not a fuction.
    I'm totally tearing my hair out, not to mention not hitting deadlines with this... can anyone help. I've tried removing the fileCache, rebuilding the site cache, removing and rebuilding the includes folder, removing and reinstalling ADDT. HEEEEEELLLLLPPP.

    Hi
    Please look into this about the destination
    Pathname of directory in which to upload the file. If not an
    absolute path (starting a with a drive letter and a colon, or a
    forward or backward slash), it is relative to the ColdFusion
    temporary directory, which is returned by the GetTempDirectory
    function.

Maybe you are looking for

  • HELP - Guest Log In on File Sharing Suddenly Disabled (Grey Out)?

    Hello all. This is my office MacPro, we have a pool of Macs running graphics and also Avid software. We file share with local network through Apple File Sharing. By default we would be able to turn on our own Mac's file sharing, and other user would

  • Temporary file appear when I save Al or pdf files (illlustrator CS, CS2 on Windows XP)

    HELP! Does anyone know why? When I save Al files from adobe illustrator on windows XP, temporary files are created in the same directorys as the saved file. Temp files has data within the file, but the saved file has no data 0kb. Does anyone have any

  • Camera recognition

    I just started filming using a HVR-Z1U. What do I need to do to get my Imovie HD6.0.3 to import. All controls working, but nothing shows up on scream. I feel like Luci keeps pulling the football out right as I get ready to kick it. AAAAARRRRRGGGGGHHH

  • Can not get photos to print well on a Epson Artisan printer after OS X Yosemite

    I have a Epson Artisan 730 Printer. After upgrading to OS X Yosemite all photos are printing poorly.  Color is very red based and unreadable. I have upgraded the latest printer firmware. I have upgraded Printer drivers (not sure of the version). I ha

  • 1024 grayscale

    Hi everyone, I just started doing my phd. I will train people in a visual task. Therefore, I need to draw stimuli with low contrast to stimulate the participants. As my standard 24-Bit RGB stimuli aren't satisfying, my second supervisor told me to us