Hi...
Thank you Ron for the answer.
I know that immediate reduces the lifecycle.
I describe the context for better understanding what is my objective:
I have a JSP with different InputText-fields.
The user should has the possibility to fill this fields and upload a file to the server. The problem is, that when you use a commandButton with an action or actionListener, the validation of the other inputText-fields will avoid the upload function.
So the user must fill all fields before he uploads a file.
But I would like make it possible, that the user uploads the field at first and than he fills the field. So I would like avoid the validation of the page, when the user
starts the uploading.
I hope I described it, so that you can follow my behaviour...
Thanks for help..
naba



Ron Smits schrieb:
What exactly is the behaviour you are looking for? immediate is true will run the validators immediately, basically jumping from the second fase of the lifecycle to the third of the lifecycle. This is meant to validate something important and skipping all the other validators when it is not correct. immediate=true is not meant to immediately start, in this example, the upload. Ron

On 11/4/07, *NABA* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi..
    I use:
    Myfaces 1.1.5
    Tomahawk 1.1.5
    ajax4jsf 1.1.1
    I use the "t:inputFileUpload" in my jsp:
       <t:inputFileUpload id="fileupload" value="#{MyBean.upFile}"
    storage="file" />
       <h:commandButton id="uploadCB" value="Upload File"
    action="#{ MyBean.uploadFile}"/>
       <h:message for="fileupload" showDetail="true" />

    It works fine.
    But when I set the immediate = true in the commandButton:
       <h:commandButton id="uploadCB" value="Upload File"
    action="#{MyBean.uploadFile}" immediate="true" />
    the upFile stay null (the set-method of upFile doesn't call ) and no
    file can be uploaded.
    Any Idea, where is the problem based?? Or any declaration for this
    problem??
    And how can I solve this problem. I don't want, that when I upload the
    File a validation starts!!

    thanks for help...
    naba




--
I reject your reality and substitute my own
--- Adam Savage, the mythbusters

Reply via email to