2 Replies Latest reply on Jan 29, 2008 3:36 AM by dthibau1

    <s:fileUpload and immediate attribute

    dthibau1

      Hi,

      I'm using JBoss AS 4.2.1, Seam 2.0.0.GA and JSF RI 1.2

      I 'd like to allow the user to upload a file even if he has not fully filled
      its form.

      Then, I typed the following code

      <s:fileUpload id="inUploadFileCreate" data="#{document.data}"
       fileName="#{document.fileName}"
       contentType="#{document.contentType}" />
      
      <h:commandButton id="uploadCreate" value="#{labelsBundle['action.attacher']}" action="#{documentManager.upload}" immediate="true"/>



      The action (documentManager.upload) is indeed called during the apply request value phase, but no data are injected in the attributes of document.

      If I remove the immediate attribute, the data are correctly injected only if
      all form's inputs have been correctly filled.

      Is there a good way to implement this case ? Must I retrieve a reference
      from the UIInput corresponding to s:upload in order to handle file's data.