Hot to call processValueChange() method of the file upload component?

When the value changes (when I choose a new file to upload) in the file upload component the processValueChange() method is not called.
I am planing to show the preview of the image to be uploaded using the processValueChange().
Thanks.

Is there a bug connected with this issue?
Thanks.

Similar Messages

  • Call a method in the view from Component Controller

    Hi Friends,
    I have written the code for calling the RFC in Component Controller.
    My requirement is to change the properties of UI elements in the view, if I get any exception while calling RFC.
    Can Call a method in the view from Component Controller.
    Regards,
    Lakshmi Prasad.

    HI,
    You can get the error message during the exception of calling RFC in view itself.
    Any way you may call the RFC at some action in the view only.
    Can you explain me what you are trying to do?
    Kind Regards,
    Mukesh

  • Calling a method in the Custom ADF component from JSF page

    HI.
    I have created some custom compoents by extending the core ADF Components. Like i have a ComboBoxDefault component with it's ComboBoxDefaultTag.java and Controls.tld file.
    Now my requirement is i want to bind my label to this component from the JSF page. like
    <fwcontrols:label binding="#{listComponents.comboBoxDefaultLabel}" id="label1"/>
    <fwcontrols:comboBoxDefault binding="#{listComponents.cmbLocales}"
    value="en_GB" id="comboBoxDefault" autoSubmit="true" label="label1">
    <f:selectItems value="#{listComponents.locales}"/>
    </fwcontrols:comboBoxDefault>
    In my JSF page the label will have an id, and that id will be specified in the label tag of the component.
    In Tag.java file i have overrided the setProperty(FacesBean facesBean). In this method i have bind all my properties. In core JSF the setProperty method is provided with the UIComponent parameter, so i can call my method in component also. Which is not in case of ADF Faces.
    My main point is how i can call my method setLabel() which is in ComboBoxDefault.java so that i can set the label.
    Thanks in Advance.

    Thanks for all your replies. I want this kind of a functionality because Im trying to invove a DC (Child DC) from a Parent DC such that the Child DC's view is displayed onto the view container of the Parent DC. I have embedded using 'interface view of a component instance' in the Parent Window and am able to create the component and set usage though the onPlugDefault of the Child View.
    But I observe that when i make a call from the parent, the flow is like this:
    1. The wdDoInit of the Child Component Controller gets triggered first.
    2. Then the wdDoInit of the Child's <b>VIEW</b> gets triggered
    3. and <b>THEN</b> the onPlugDefault of the Child Component Interface View
    What I had actually wanted was to Fire onPlugDefault where Im calling a method LoadData(), after which the Child DC's view must be triggered so it can display the fetched data.
    What is actually happening is the view gets displayed, but no data is displayed in the view.
    Right now I have just given a work around where Im triggering <b>LoadData()</b> of the <b>COmponent COntroller</b> from the <b>wdDoInit</b> of the <b>VIEW</b>.
    Is there a better way to do this? I find it strange that I have to load the Data from the view.
    Thanks
    Jack

  • Irritating bugs in file upload component !!

    Bug 1
    During a postback operation the text (file path name) in the file upload component is cleared ! When a resubmit of a form is required, the user has to re-browse the file again.
    Bug 2
    The processValueChandge() method is never called when the value in the file upload component is changed (and the mouse is clicked outside the component).
    Any suggestions or workarounds are very much appreciated.
    Thanks.

    I can't answer to Bug 1. That is, I don't have any solutions. If you want to submit this, go to http://developers.sun.com/prodtech/javatools/jscreator/support/index.html and look at the section titled Bug Report /Feature Request
    Bug 2
    The processValueChandge() method is never called when
    the value in the file upload component is changed
    (and the mouse is clicked outside the component).This is not a bug.
    processValueChange methods are server side methods and do not get called until the page is submitted to the server. Clicking outside the component will not cause the page to get submitted. If you want a client-side action (such as when focus is lost) then you can add some JavaScript.
    The file upload does not have a process value change method, it is an action method and thus has a uploadFileButton_action method. This method gets called when the upload button is clicked.

  • Validator for file upload component is not working !!

    This validator method for a file upload component is throwing a java.lang.NullPointerException.
    public void fileUpload1_validate(FacesContext context, UIComponent component, Object value) {
    long size= fileUpload1.getUploadedFile().getSize();
    if (size>65535){
    throw new ValidatorException(new FacesMessage("Your image is too big!"));
    Any help to solve this problem is very much appreciated.
    Thanks.

    Hi i have a fileUpload in a pop-up and the methods are :
    public void fileUpload1_validate(FacesContext context, UIComponent component, Object value) {
    try {
    com.sun.rave.web.ui.model.UploadedFile uploadedFile = ((Upload)component).getUploadedFile();
    long l_filesize = uploadedFile.getSize();
    if ( l_filesize > 1000000)
    throw new ValidatorException(new FacesMessage("File Size should be less than 1000000 bytes! It is" + l_filesize));
    else {
    String tipo = uploadedFile.getContentType();
    if ( tipo.compareTo("application/word") == -1 )
    if ( tipo.compareTo("application/rtf") == -1 )
    if ( tipo.compareTo("application/pdf") == -1 )
    throw new ValidatorException(new FacesMessage("Error : los tipos de archivo aceptados son PDF, WORD y RTF"));
    } catch (Exception ex) {
    this.mauvaisFichier = true;
    error(ex.getMessage());
    public String botonValidar_action() {
    if ( !this.mauvaisFichier )
    if ( this.fileUpload1.getUploadedFile() != null )
    if ( this.fileUpload1.getUploadedFile().getSize() > 0 )
    try {
    this.getSessionBean1().getComunicacion().setArchivo( new javax.sql.rowset.serial.SerialBlob(this.fileUpload1.getUploadedFile().getBytes() ) );
    this.getSessionBean1().getComunicacion().setTipoArchivo( this.fileUpload1.getUploadedFile().getOriginalName().substring(this.fileUpload1.getUploadedFile().getOriginalName().length() - 3 ) );
    } catch(Exception e){
    e.getMessage();
    return null;
    I have to put a boolean value because the first time, validation code doesn't function ( the method botonValidar_action() is called ) correctly. The error message appears but empty.
    If I try next time then it's ok.
    Thx for any issue.

  • Htmlb table - File upload component

    Hi all,
    Is it possible to use the file upload component in a table view (htmlb for java) column?
    Rgds,
    Subu

    Hi,
    Here is one thought, there is onCellClick event for the Tableview, use that for the required column and add the file upload component as the event handler method in the onCellClick method.
    Link on table view events:
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/eb/220a415a47f06fe10000000a1550b0/content.htm">Table view attributes and events</a>
    Link on OnCellClick:
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/37/3d8b41b4b3b25fe10000000a1550b0/content.htm">onCellClick</a>
    Check the following link:
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/63/9c0e41a346ef6fe10000000a1550b0/frameset.htm">File upload</a>
    Hope it helps.
    Regards,
    Vivekanadan
    Message was edited by: Vivekanandan

  • How to use file upload component inside a portlet

    Hi
    Thank you for reading my post.
    does file upload works inside portlets ?
    can some one help me with a sample code , does it need some tricks ?
    Thank you

    any help is welcomeLegolas,
    You could try your own implementation. Someone was able to implement a file upload with Creator 2004Q4 and the O'Reilly Servlet. See http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=50186.
    You will have to configure O'Reilly Servlet's "MultiPart Filter" in your application. Creator 2 uses a same approach (a filter) to accomplish this. Given that the file upload component is not supported on portlets, this leads me to the following: I don't know anything about portlets and portlet containers, but I'd check first for some architechtural restriction in the portlet subsystem that avoids the use of a filter for a file upload. If think this could be the only thing that will restrict you to implement your own file upload.
    Hope this helps.
    Antonio

  • File Upload Component

    I can not find a function in the Upload class that will allow me to access the browse button
    child component nor can I see any mention of the file upload component in the
    master stylesheet of the defaulttheme jar.
    what am i missing here guys?

    Dear Manjunath Jayaram,
    You don't think it is a problem that one can not access the child of a
    composite component ???
    I am sorry if you don't appreciate the problem but I can not state it any more plainly.
    "I can not find a function in the Upload class that will allow me to access the browse button
    child component nor can I see any mention of the file upload component in the
    master stylesheet of the defaulttheme jar".

  • Calling a method from another file

    This is pretty basic stuff but i can't seem to get it right. I am calling a method from another file. The other file IS located in the same folder BUT when i compile i get errors
    "cannot find symbol" <===referring to limit and sieve i believe.
    The method name is "sieve" the file name is "PrimeSieve2008" and "limit" is the variable in brackets in the real method.
         public static void main (String [] args) {
    final int [] PRIMES;
    int sieve = PrimeSieve2008.sieve(limit);
         PRIMES = sieve(getValidInt());
              for (int j = 0; j<PRIMES.length; j++) {
                   System.out.println("Prime[" + j + "] = " + PRIMES[j]);
    Is "int sieve = PrimeSieve2008.sieve(limit)" the wrong way to call a file?
    Thanks a million,
    Alex
    Edited by: Simplistic2099 on Apr 3, 2008 7:47 PM
    Edited by: Simplistic2099 on Apr 3, 2008 7:49 PM

    Simplistic2099 wrote:
    the other method runs fine:
    "public static int[] sieve(final int limit){
    int candidate; // possible prime
    int count; // no. of primes found
    boolean[] mayBePrime = new boolean[limit+1];
    // remaining possibilities
    final int[] PRIMES; // array to return
    // initialize mayBePrime
    for ( int j = 0 ; j <= limit ; j++ ) {
    mayBePrime[j] = true;
    mayBePrime[0] = mayBePrime[1] = false;
    // apply sieve, and count primes
    candidate = 2;
    count = 0;
    while ( candidate <= limit ) {
    if ( mayBePrime[candidate] ) {
    count++;
    for ( int j = 2 * candidate ; j <= limit ; j += candidate ) {
    mayBePrime[j] = false;
    } // end for
    } // end if
    candidate++;
    } // end while
    // fill up new array with the primes found
    PRIMES = new int[count];
    count = 0;
    for (int j = 2 ; j <= limit ; j++ ) {
    if ( mayBePrime[j] ) {
    PRIMES[count] = j;
    count++;
    } // end if
    } // for
    return PRIMES;
    } // sieve
    I really am clueless here.in this one you are passing in limit.
    in the other one you are getting limit from somewhere outside of main.

  • Calling a method in the backing bean when rendering a table

    I'm rendering a table that begins with :
    <h:dataTable value="#{showRooms.rooms}" var="rowRoom" ...
    There are several properties I'm displaying. Some are just displayed as they appear from the database like:
    <h:outputText value="#{rowRoom.roomNumber}"/>
    However, some I need to translate so they display a more meaningful message to the users. For example, status is stored 'A', or 'NA', but this should display 'Available' or 'Not Available'. To do this, I'm taking an idea I saw in another forum by providing a method to call and translate the text. For example:
    public String getDisplayedStatus(String status) {
    if (status.equals("A") {
    return "Available";
    } else {
    My problem is how can I invoke a method and pass in the current value of status for that row in the table. I think I need something like this:
    <h:outputText value="#{showRooms.getDisplayedStatus(#{rowRoom.roomStatus})"/>
    But that doesn't work. I can invoke the getDisplayedStatus method when passing in a hardcoded parameter, but it won't translate the value of both expressions(the method and the method param). How can I achieve this?
    Thanks,
    Mike

    Yes. I've done that and it does work....sort of. It works as long as I refer to it as 'displayStatus'. It looks up the getDisplayStatus and returns a value. The problem is getting the current status value from the object in the List. For example, the 3rd row in the table has either 'A;' or 'NA' for status. I need to know this value in order to do my translation. The way I see it, I either need
    1.)a way to call a method on the backing bean and pass the value of status from the current row into the method.
    -or-
    2.)in getDisplayStatus, I need a way to access the current row's value, perhaps through an expression. This appears to be what you can do in the AbstractPageBean class that all backing beans inherit in Studio Creator. I've seen code in a getter like 'getValue(#{currentRow.status}'), but I don't know how that is done. I looked for the source to AbstractPageBean on the web but couldn't find it - maybe its not open-source.
    Anyway, please share if anyone has a solution. I'm sure this has been done before.
    Thanks,
    Mike

  • Calling a method in the view controller from the component controller

    Hi
    Is there anyway to call a method in the view implementation from the component controller??
    Thanks
    jack

    Thanks for all your replies. I want this kind of a functionality because Im trying to invove a DC (Child DC) from a Parent DC such that the Child DC's view is displayed onto the view container of the Parent DC. I have embedded using 'interface view of a component instance' in the Parent Window and am able to create the component and set usage though the onPlugDefault of the Child View.
    But I observe that when i make a call from the parent, the flow is like this:
    1. The wdDoInit of the Child Component Controller gets triggered first.
    2. Then the wdDoInit of the Child's <b>VIEW</b> gets triggered
    3. and <b>THEN</b> the onPlugDefault of the Child Component Interface View
    What I had actually wanted was to Fire onPlugDefault where Im calling a method LoadData(), after which the Child DC's view must be triggered so it can display the fetched data.
    What is actually happening is the view gets displayed, but no data is displayed in the view.
    Right now I have just given a work around where Im triggering <b>LoadData()</b> of the <b>COmponent COntroller</b> from the <b>wdDoInit</b> of the <b>VIEW</b>.
    Is there a better way to do this? I find it strange that I have to load the Data from the view.
    Thanks
    Jack

  • Error calling a method of the tree control in BDC

    I'm connecting two systems Iplan(project management tool) with SAP PS using SAP XI.
    I've written an BDC(RFC) to assign people for the activity in an project(cj20n) it works fine in the foreground. But it doesn't work in the background.It doesn't give me error also.I've sap all authorization.
    When I connect with XI its throwing me an error "Error calling a method of the tree control" message type A (using the same user to connect r3). I believe something we should do prior handling the tree control in a BDC. IF any body come across this situation please let me know. your help is appreciated.
    Regards
    Anand

    BDCs over enjoy transactions do not get along together.  The containers and controls is more of a gui thing, and in background sometimes the BDC has a hard time with them.  I would suggest using the non-enjoy tcode instead, CJ20.
    Regards,
    Rich Heilman

  • Job is failing with the following error- Error calling a method of the tree

    dear SDNers,
    my question is where do i need to look for error.
    Will this be an ABAP issue?
    Please guide
    DETAILS
    In SM37 when we see the job XYZ, we get the following details.
       Job                              Ln    Job CreatedB    Status          Start date     Start time      Duration(sec.)     Delay (sec.)
      XYZ                                                                    Canceled        16.11.2009    10:11:30                  9                         27
    When the job log is checked this , we get the below details.
    The job XYZ is failing with the following error.
    Date      Time     Class  No.   Message
    +----
    +----
    2009/11/16 05:03:01 | 00     516 | Job started
    2009/11/16 05:03:01 | 00     550 | Step 001 started (program RBDMON00, variant
    SBCI287, user ID ABCDEF)
    2009/11/16 05:03:03 | TREE_C 000 | Error calling a method of the tree control
    2009/11/16 05:03:03 | 00     518 | Job cancelled
    Equest your assistance in knowing where to find the error for this.
    I have no clue as to where and how i need to debug or where i should i be looking for error.
    In BD87, the selection screen paramters that are given are changed on date (from and to) and IDOC status 51,66,69 and 64 and the message type is "Öutbound interface of picked shipments"
    Please guide.
    Regards,
    SuryaD.
    Edited by: SuryaD on Nov 23, 2009 5:36 PM
    Edited by: SuryaD on Nov 23, 2009 11:14 PM

    > 1. There is a job name ABCDEF
    > 2. When this job is run then the status shows cancelled and the job error log shows tHe details that "error calling a method of the tree control"
    > 3.ThIs error also points fingers to /link to BD87 as seen in the job log " (program RBDMON00, variant \SBCI287, user ID KRISF)"
    >
    BD87 is an IDOC processing.
    > My question to you Sampath.
    >
    > in order to answer your question on whether it is ALv or SALV.. please tell me as to how will i know which progrm is associated with the job ABCDEF?
    >
    Go to sm37 - double click on the job that was failed - Click on Step (on application tool bar) to get the program name - double click on the program name - new popup will be opened - then copy the program and variant
    Go to se38 - enter the program - execute (F8) - choose the variant that is there in the background job - run in forground first
    if the run is good - then check the program - SE38 - Display the program then see
    I just saw the above message BD87... .if that is true, you dont have to do all these
    I dont think it is possible to schedule a job with BD87. Is this the first time or is any job completed without errors for this?

  • Form UIBB using the File Upload display type

    Hello,
    I have a Form UIBB within the GAF. The Form UIBB contains
    1. Two input fields - Date(Input Field) and File Name(which is marked as Display Type - File Upload)
    2. Action button - (Upload).
    The File Name field is created as Predefined Type STRING in the underlying structure which gets read in eo_Field_catalog. If I enter some date and select an excel file after clicking Browse and then click Upload, the file name which gets read in method IF_FPM_GUIBB_FORM~FLUSH attribute IS_DATA shows junk characters and not the uploaded file name. The date field correctly shows the modified date.
    On debugging UPDATE_CHANGELOG (CL_FPM_FORM_UIBB_ASSIST) which gets called on clicking Upload,
    object LO_ELEMENT_VALUE -> STATIC_ATTRIBUTES has the changed structure which has the file name as junk characters(numeric).
    Does anything special need to be done to handle the File Upload in FORM UIBB??
    Regards,
    Prajyot

    You really should try SUSE support for help with that problem, as it sounds like a problem with the file browser, rather than Firefox. Plus, the version of Firefox you have installed is a modified version, and not an official Mozilla Linux build.
    Personally, I am a real noob with Ubuntu, and I don't know of a helper at this forum who uses SUSE, so I'd be surprised if anyone else here would be able to provide an answer.

  • Change upload file name with com.oreilly.servlet.MultipartRequest to handle the file upload

    1. when use com.oreilly.servlet.MultipartRequest to handle the file upload, can I change the upload file name .
    2. how com.oreilly.servlet.MultipartReques handle file upload? do it change to byte ?
    what  different?  if I use the following method?
       File uploadedFile = (File) mp.getFile("filename");
                   FileOutputStream fos = new FileOutputStream(filename);
                    byte[] uploadedFileBuf = new byte[(int) uploadedFile.length()];
                   fos.write(data);
                 fos.close();

    My questions are
    1) when use oreilly package to do file upload , it looks like i line of code is enough to store the upload file in the
    file direction.
    MultipartRequest multi =
            new MultipartRequest(request, dirName, 10*1024*1024); // 10MB
    why some example still use FileOutputStream?
    outs = new FileOutputStream(UPLOADDIR+fileName); 
        filePart.writeTo(outs); 
       outs.flush(); 
      outs.close();
    2) can I rename the file name when I use oreilly package?

Maybe you are looking for

  • [b]Periodic[/b] error using PortableRemoteObject.narrow

    I am trying to access a session bean on an oracle9ias(903) running on a windows 2000 server. Well I am actually accessing several beans, but on some of the beans the code works and on some it don't even though the code is alike. There is no execption

  • Ipod freezing when ever i watch 2 videos in a row

    i have used a software program to add a couple videos onto my ipod. when i watch one the videos it works fine, but when i go to watch the 2nd video, the ipod freezes and i basically have to wait for the the ipod to run out of battery then recharge it

  • "none already mounted or /dev/pts busy" udev 050-2

    Just did a clean install on a new hard drive. Using udev. Haven't made any changes from default, except added "devfs=nomount" to the grub boot line. I get this error message during boot up: "none already mounted or /dev/pts busy" when I issue "mount"

  • 2nd slide show won't play

    After creating a dvd with two slide shows using iDVD, the second slide show will not play past the first image. The first show plays with no problem. When the second show is activated the first image comes up but I can't advance to any of the others.

  • Problem when trying to delete shared metadata folder

    I am trying to undeploy one shared metadata folder from server using command: MIDDLEWARE_HOME/Oracle_SOA1/common/bin and execute wlst.sh connect('adminuser', 'adminpassword', 't3://hostname:port') deleteMetadata(application='soa-infra',server='soa_se