[jboss-user] [JBoss Seam] - <s:fileUpload and immediate attribute

dthibau@opencs.net do-not-reply at jboss.com
Fri Jan 25 06:23:02 EST 2008


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.




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123417#4123417

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123417



More information about the jboss-user mailing list