4 Replies Latest reply on Mar 30, 2012 6:36 PM by brabbit27

    Manage a clean event for the fileupload component in Richfaces 4.1

    sviluppatorefico

      Hi... I'm triing to manage the deleting of an item with the fileUpoad component in Richfaces 4.1. Here the my example:

       

        <rich:fileUpload fileUploadListener="#{fileUpload.listener}"

        addLabel="Click here" maxFilesQuantity="2"

        acceptedTypes="bmp,gif,jpg">

             <a4j:ajax event="uploadcomplete" execute="@none"

                           render="myPanel" />

             <a4j:ajax event="clear"

                           listener="#{fileUpload.clearData}" />

        </rich:fileUpload>

       

      When I choose a file and I delete it, this method of my FileUpload class is executed:

       

      @Named

      @SessionScoped

      public class FileUpload implements Serializable {

       

          ......

       

          public void clearData() {

                 .........

          }

       

       

      How do I pass the parameter of the chosen file to my method?