Uix:fileupload

Hi,
I'm beginner in web techno and so, in JDeveloper. I must (i try) develop a web site to administrate and consult a database. I 'm working with uix jsp and i'm trying to upload any files on the server. I use <uix:fileUpload> but the code doesn't run. Do you have any samples with this tag and how use it correctly?
Could you help me, please?
Julien

Hi.
It really sux that no-one responds sometimes and I am sure you have found your answer to the problem and have since moved on, but just in case there are others out there with this problem I have found the solution (only to uncover other issues- to be addressed).
UIX has a fileUpload tag which must be inserted into a form and followed with a submit button. The fileUpload tag has some required properties that should be set (select the component in the component palette and goto 'help' to view the documentation for the fileUpload component). The form property "usesFileUpload" must be set to true. What I believe this does is cause any event fired from within the form to be handled by/through the UIXServlet (which processes all uix related events). When you go this route you need to extend BaseFileUploadManager and override the doFileUpload() method with your code. Then you must set some parameters in your web.xml file that point to your FileUploadManager implementation. File uploads cannot be processed with an event handler.
Please see Using a Controller in ADF UIX
The only thing that bugs me is this quote "...After writing each file, the full path and filename of the file is returned, so any registered EventHandler can locate the just-written file...". This is telling me that we can somehow use an EventHandler. HOWHOWHOWHOWHOW?????!!?!?!?
Troy

Similar Messages

  • UIX fileUpload component

    How it works!
    Could anyone help!

    Let me try that again. Here is the bottom:
    String display = fieldRowLeading.getAttribute("DisplayName").toString();
    %>
    <uix:option selected="False" value="<%=field%>" text="<%=display%>" longDesc="<%= desc%>" />
    </jbo:RowsetIterate>
    </uix:contents>
    </uix:list>
    </uix:leading>
    <uix:trailing>
    <uix:list multiple="true">
    <jbo:RowsetIterate datasource="dsUsedDisplayFields" userange="false" >
    <jbo:Row id="fieldRowTrailing" datasource="dsUsedDisplayFields" action="Active"/>
    <% String field = (String)fieldRowTrailing.getAttribute("FieldName");
    String desc = (String)fieldRowTrailing.getAttribute("Description");
    String display = (String)fieldRowTrailing.getAttribute("DisplayName");
    %>
    <uix:option selected="False" value="<%=field%>" text="<%=display%>" longDesc="<%= desc%>" />
    Long postings are being truncated to ~1 kB at this time.

  • UIX: event submission with fileUpload component.

    Hi,
    Is it possible to have some event submission when a file is selected in a UIX file upload component.
    I want to be able to trap the event and update the page to display the file name and a "Update" button.
    I want to implement the ADF upload file functionality in a UIX page.
    Any pointers would be be very helpful.
    Thanks.

    Ahhh, I needed the line
    <code>
    myForm.setEncodingType("multipart/form-data");
    </code>
    I should read more!
    Shame I can't reward myself the points
    Patrick.

  • File upload, download using ADF UIX and not JSP

    I have examples for the file upload, download using JSP
    But I want to use ADF UIX. Look and feel in this is impressing and I want to use this. Any one have example for this.
    Users will select a file from their desktop
    This will be stored into the database (Any document. Word, Excel)
    When they query the records then the UIX column need to give a hyperlink. Clicking on the link should prompt to download the file to the local system

    Sure, I use the Apache Commons File Upload package, so that is what I will discuss here ( [Commons File Upload|http://commons.apache.org/fileupload/] ).
    The Commons File Upload uses instances of ProgressListener to receive upload progress status. So first create a simple class that implements ProgressListener:
    public class ProgressListenerImpl implements ProgressListener {
        private int percent = 0;
        public int getPercentComplete() {
            return percent;
        public void update(long pBytesRead, long pContentLength, int pItems) {
            if (pContentLength > -1) { //content length is known;
                percent = (new Long((pBytesRead / pContentLength) * 100)).intValue();
    }So in your Servlet that handles file upload you will need to create an instance of this ProgressListenerImpl, register it as a listener and store it in the session:
    ServletFileUpload upload = new ServletFileUpload();
    ProgressListenerImpl listener = new ProgressListenerImpl();
    upload.setProgressListener(listener);
    request.getSession().setAttribute("ProgressListener", listener);
    ...Now create another servlet that will retrieve the ProgressListenerImpl, get the percent complete and write it back (how you actually write it back is up to you, could be text, an XML file, a JSON object, up to you):
    ProgressListenerImpl listener = (ProgressListenerImpl) request.getSession().getAttribute("ProgressListener");
    response.getWriter().println("" + listener.getPercentComplete());
    ...Then your XMLHttpRequest object will call this second servlet and read the string returned as the percent complete.
    HTH

  • Problems with fileUpload

    Hi,
    I'm using JDeveloper 11g, integrated WLS and ADF Faces. I've implemented fileUpload functionality just like this tutorial says:
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/devguide/fileupload.html
    I've tried using adf-faces-impl-1013.jar and adf-faces-api-1013.jar but I'm always getting errors:
    Sep 8, 2009 2:13:03 PM JpsApplicationLifecycleListener Migrate Application Credential Store
    WARNING: Overwriting credentials is allowed in application credential store migration with Weblogic server running in Development Mode and system property 'jps.app.credential.overwrite.allowed' set to true
    Sep 8, 2009 2:13:09 PM oracle.adfinternal.view.faces.renderkit.core.CoreRenderKit _addBasicHTMLRenderKit
    WARNING: Could not find basic HTML renderer for family javax.faces.Command, type=javax.faces.Button
    SEVERE: zip:C:/Documents and Settings/user/Application Data/JDeveloper/system11.1.1.1.33.54.07/DefaultDomain/servers/DefaultServer/tmp/_WL_user/Prijava/f17v7y/war/WEB-INF/lib/adf-faces-impl-1013.jar!/META-INF/agent/capabilities.xml: Parsing error, line 2, column 89:
    org.xml.sax.SAXParseException: Invalid Namespace: http://xmlns.oracle.com/adf/view/faces/agent/capabilities
    at org.apache.myfaces.trinidadinternal.agent.parse.CapabilitiesDocumentParser.startElement(CapabilitiesDocumentParser.java:114)
    at org.apache.myfaces.trinidadinternal.share.xml.TreeBuilder$Handler.startElement(TreeBuilder.java:333)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1324)
    Sep 8, 2009 2:13:17 PM org.apache.myfaces.trinidad.component.UIXComponentBase _createType
    SEVERE: Could not load type properties
    java.lang.NullPointerException
    at sun.jkernel.DownloadManager.getBootClassPathEntryForClass(DownloadManager.java:928)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:293)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:300)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:300)
    Sep 8, 2009 2:13:18 PM org.apache.myfaces.trinidadinternal.share.xml.TreeBuilder$Handler _logError
    SEVERE: META-INF/adf/styles/simple-desktop.xss: Parsing error, line 4, column 35:
    org.xml.sax.SAXParseException: No org.apache.myfaces.trinidadinternal.style.xml.parse.StyleSheetDocument parser registered for top element;check your namespace declaration. Namespace: http://xmlns.oracle.com/uix/style
    Local name: styleSheetDocument)
    at org.apache.myfaces.trinidadinternal.share.xml.TreeBuilder$Handler.startElement(TreeBuilder.java:259)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1324)
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:368)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:314)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:225)
    Sep 8, 2009 2:13:18 PM org.apache.myfaces.trinidadinternal.skin.StyleSheetEntry _createStyleSheetDocument
    SEVERE: Could not load style sheet: META-INF/adf/styles/simple-desktop.xss
    Sep 8, 2009 2:13:18 PM org.apache.myfaces.trinidadinternal.skin.StyleSheetEntry _createStyleSheetDocument
    SEVERE:
    org.xml.sax.SAXParseException: No org.apache.myfaces.trinidadinternal.style.xml.parse.StyleSheetDocument parser registered for top element;check your namespace declaration. Namespace: http://xmlns.oracle.com/uix/style
    Local name: styleSheetDocument)
    at org.apache.myfaces.trinidadinternal.share.xml.TreeBuilder$Handler.startElement(TreeBuilder.java:259)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1324)
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:368)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:314)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:225)
    I've also tried using adf-faces-impl-ea15.jar and adf-faces-api-ea15.jar, the error was:
    java.lang.ClassNotFoundException: oracle.adfinternal.view.faces.taglib.validator.ValidatorTag
    Could someone please tell me which adf-faces-impl.jar and adf-faces-api.jar should be used for fileUpload and where can I find it?
    Thanx,
    Jelena

    Jeelena,
    you don't need any additional jar files to do file uploading. Read [url http://download.oracle.com/docs/cd/E15051_01/web.1111/b31973/af_input.htm#BABDFAEI]here for the current version of the docs.
    John

  • 2nd Try: Please Help : UIX : Not able to use messageFileUpload along with m

    UIX : Not able to use messageFileUpload along with messageChoice
    I used messageFileUpload UIX element and associated upload button to fileupload servlet. This servlet just captures the file and put it in desired location. This works just fine.
    My client wanted me to add another choice filed on UI. I used messageChoice. I named the field as fileType. All the options have name and value populated but when I submit the form servlet is reading fileType as NULL.
    I am not sure what's happening. Please let me know how should I send file handle as well fileType ?
    Thanks,
    Linda

    What exactly are you expecting this to do for you?
    Forall is designed to process batches of DML to prevent context switching from PL/SQL to SQL.
    Has no relevance for what you are trying to do.
    If you don't want to call the procedure multiple times, you need to rewrite it to passs the cursor to the function, then have the function process all the records.
    Carl

  • UIX : Not able to use messageFileUpload along with messageChoice

    I used messageFileUpload UIX element and associated upload button to fileupload servlet. This servlet just captures the file and put it in desired location. This works just fine.
    My client wanted me to add another choice filed on UI. I used messageChoice. I named the field as fileType. All the options have name and value populated but when I submit the form servlet is reading fileType as NULL.
    I am not sure what's happening. Please let me know how should I send file handle as well fileType ?
    Thanks,
    Linda

    What exactly are you expecting this to do for you?
    Forall is designed to process batches of DML to prevent context switching from PL/SQL to SQL.
    Has no relevance for what you are trying to do.
    If you don't want to call the procedure multiple times, you need to rewrite it to passs the cursor to the function, then have the function process all the records.
    Carl

  • UIX Upload File

    Hi
    I've tried to upload a file using UIX Servlet.
    I had used code from UIX Developer Guild and it's success .
    Now I want to know How to check whether the file name being upload from user already exits in the target folder on my server. And I also want to know how to alert user via javascript's popup , I means how to use javascript and UIX in combination
    Could you please give me some idea ?
    Thanks

    Attila -
    Assuming you are using uiXML - check out the "Multipart requests" section in the JavaDoc for the oracle.cabo.servlet.AbstractPageBroker. The gist of it is that you'll want to create an extension of UIXPageBroker which overrides doUploadFile() and uses the MultipartFormItem API to get at the contents of the uploaded file.
    If you are using UIX JSP, you can use the oracle.cabo.share.util.MutlipartFormHandler to explicitly process your multipart requests.
    And of course, you'll want to include a fileUpload component in your UIX document - and be sure to set the "usesUpload" attribute of your UIX form to true.
    Andy

  • UIX XML & Download Of Uploaded Files.txt

    What is the right way (in UIX XML) to show the content of an uploaded file (retrieving it from a BC4J component)?
    Documentation, Samples?

    your question is rather vague; are you asking how to handle a fileUpload using the UIX controller? Please see the javaDoc for the class
    oracle.cabo.servlet.AbstractPageBroker

  • Help: How can I implement upload file in UIX ...

    without interMedia option.
    Can anybody help me?
    Thanks!

    Attila -
    Assuming you are using uiXML - check out the "Multipart requests" section in the JavaDoc for the oracle.cabo.servlet.AbstractPageBroker. The gist of it is that you'll want to create an extension of UIXPageBroker which overrides doUploadFile() and uses the MultipartFormItem API to get at the contents of the uploaded file.
    If you are using UIX JSP, you can use the oracle.cabo.share.util.MutlipartFormHandler to explicitly process your multipart requests.
    And of course, you'll want to include a fileUpload component in your UIX document - and be sure to set the "usesUpload" attribute of your UIX form to true.
    Andy

  • How can I render an active link (yrl) within a UIX/XML page

    How can I render an active link (url) within a UIX/XML page.
    How can I get <jbo:ShowValue> to work in UIX/XML, or is there another way?
    Bill G...

    It may seem strange, but the <contents> of <rawText> aren't actually
    raw - it's only the "text" attribute that's raw. (It seems strange because
    it is. Ah well.) This is different from UIX JSP.
    So, try something like the following:
    <bc4j:attrScope name="Notes">
    <contents>
    <rawText text="&lt;a href=&quot;"/>
    <rawText>
    <boundAttribute name="text">
    <bc4j:attrProperty name="value"/>
    </boundAttribute>
    </rawText text="&quot;&gt;"/>
    Some text in the link.
    <rawText text="&lt;/a&gt;"/>
    </contents>
    <bc4j:attrScope>
    Thankfully, this will be much simpler in 9.0.3, when the following
    will work:
    <link text="Whatever you want">
    <boundAttribute name="destination">
    <bc4j:attrValue name="Notes"/>
    </boundAttribute>
    </link>

  • Unit testing UIX

    Hi Steve
    Can you advice me a tool for unit testing my UIX pages apart from HttpUnit and HtmlUnit frameworks?
    HttpUnit gives javascript errors. HtmlUnit is not practical for the complex HTML produced from a UIX page.
    Thanks

    Cactuz?

  • Why is it not possible to write a UIX (or ADF) portlet for 9iAS?

    Hi,
    I have been trying for months to create a UIX/BC4J portlet for 9iAS but have been unsuccessful. The documentation and examples cover doing this with JSPs (there is a nice Forum application available for download on portalstudio). However all of my attempts to use UIX have hit a brick wall - we want to use UIX, not JSP!
    I have raised a TAR on Metalink and it has been going back and forth for several months. The support analyst has finally closed it in frustration because he cannot even tell me whether it is possible, let alone give me an example! I have investigated the JPDK and all of the UIX documentation I can get hold of, and have also looked at the ADF components in 10g, and the "Java Portlet Wizard" for Jdeveloper, but they are so far all dead ends. Can anyone help me, or explain why it is that a (to me anyway) SIMPLE and LOGICAL integration of two Oracle frameworks is impossible.
    Thanks,
    Steve

    Hi Steve -
    Thanks for the info. I have a few more questions...
    Andy,
    Yes, this is exactly the issue. Currently I am
    invoking the UIX servlet not as a registered portlet
    but as a hard-coded URL link on the portal page.Are you saying that in order to access the UIX application, the user clicks on a link which navigates out of Portal? If so, is this by design, or did you go this route because of problems creating a portlet for your UIX servlet? That is, would you prefer to have your UIX application run inside of Portal as a portlet, or do you explicitly not want this?
    Also, can you provide more background about your deployment environment? In particular, is the UIX application running locally on the same machine as Portal, or remotely on another machine? Is the UIX application running in the same application server/servlet engine as Portal?
    The application runs connected to the database but
    without the context of the SSO Portal user. I want to
    be able to display the Portal username on the uix
    pages, have the VPD context in the database
    connection (we have striped the tables but it only
    works if connected via Portal!!) and potentially have
    access to some of the extended Portal functionality
    in the JPDK (this last one a "nice to have").Unfortunately I have no idea whether this is possible, so I'm not going to be much help on my own. The best I can do is try to track down someone who can actually speak to this issue. However, given the lack of documentation and the fact that you weren't able to get a solution through support, I wouldn't be suprised to find that this type of integration simply isn't supported yet.
    I think you mentioned in the TAR that you had seen support for similar integration with Struts. If you know of documentation which shows how to do this type of thing with Struts, could you point me at it?
    Andy

  • FileUpload UI element -"browse"label is not coming in Hungrian for Hungrian

    Folks,
    We are using FileUpload ui element in our application, our application supports English , Hugrian languages, Problem is here , label on browse button coming in English for hungrian users.
    I believe  no need to add any translation to browse label in .xlf file,
    can any one tell me how to add Hungrian translation to Browse label, how to check standard translations of file upload ui element?
    Thanks & Regards,
    Veera.

    Hi Anup,
    portal User language is already hungray and rest of the labels in page are coming in hungrian as we maintained in -hu.xlf file.but for FileUpload ui element there is no option to map label of  "browse"  button with a message pool attribute.
    Thanks & Regards,
    Veera.

  • How to open new window in UIX page

    I'm using UIX for view layer. I have text input in the UIX form. When I click on a button, I want to open a new window with the URL built using the value from the input. I want to do it using javascript. Is it possible with UIX?

    Hi Krishnamoorthy,
    Look out the LovXXXX components demo in uix.
    See <script> demo of component guide. This should help you clearly understand the functionalities.
    See documentation of above UIX components
    Like providing handlers to HTML elements, you can attach event handlers to UIX components too. You can attach event handlers on onClick, onMouseOver,... on UIX components just as you would do in HTML.
    http://www.oracle.com/technology/sample_code/products/jdev/index.html
    This link could be of some help to you.
    Thanks,
    Vijay Venkataraman

Maybe you are looking for

  • SAP Business Connector certificate problem

    We are trying trying to send data from SAP to bank via SAP business connector using bank URL. We have configured the certificates in SAP BC which are authenticated by bank on the basis of private key generated from our server. Now when we trying to p

  • Publishing SRM Contract to Catalog

    Hi All, I have got a problem publishing SRM (7.0 SP7) contracts to SRM-MDM Catalog. A contract is set to "Distribute Contract to Catalog" to "Yes" and released. Message correctly sent to XI and uploaded to MDM server by XI. Import map of the reposito

  • Question re. mail application

    I try to attach a pdf file to my message. The pdf file is copied at the end of message but I would like to simply attach the file to my message so that my friend can open the file and print it otherwise he has to print the complete message. Please he

  • How to access request content using MultipartMessage Object

    I want to take a file from the Client and upload it as a FileInputStream on the server. I have a simple form as follows: <form action="scan" name="scan_files" method="post" enctype="multipart/form-data"> <input type="file" name="file1"> <input type="

  • Question error message 150:30

    error message 150:30--can't access EDIT--can do ORGANIZE--message says "license stopped working"