1 Reply Latest reply on Oct 21, 2008 8:03 PM by nbelaevski

    rich:fileupload - how can I get the entry.state


      Hi all,

      I am using the rich:fileupload component in my project. It's really great. However I got some troubles when I tried to get the entry.state.

      I have read http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/fileUpload.html
      And this is an example in the page
      <rich:fileUpload fileUploadListener="#{fileUploadBean.listener}"
      reRender="table" id="upload"
      acceptedTypes="jpg, gif, png, bmp">
      <a4j:support event="onuploadcomplete" reRender="info" />
      <h:commandButton onclick="if($('j_id232:upload').component.entries[0].state == FileUploadEntry.UPLOAD_SUCCESS) alert ('DONE');" value="Check file state"/>

      It seems that "$('j_id232:upload').component" should be different for different pages. So how can i get my value?

      Any help will be appreciated.