You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by blargy <zm...@hotmail.com> on 2007/03/17 04:41:02 UTC

FileUpload valueChangeListener questions.

Im using the t:inputFileUpload component and I want to upload a file. 

I want some sort of backing bean to be invoked right after a user chooses a
file. 
If i add onchange="this.form.submit()" then the whole page is submitted
which i do not want because it could through some validation errors if other
fields are not entered yet.

How come if i add a value change listener it is not invoked until I submit
the page? 

Is there anyway around this?

Any ajax components that would be able to do this?


Also is there anyway to force the user to have to use the browse button to
enter a file and not allow them to type in the path?

Thanks.
-- 
View this message in context: http://www.nabble.com/FileUpload-valueChangeListener-questions.-tf3417981.html#a9526161
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: FileUpload valueChangeListener questions.

Posted by blargy <zm...@hotmail.com>.
Ill explain my problem. 

I have a form that has an t:inputFileUpload and I have a mediaOutput
component. I want the mediaOutput component to display an image RIGHT after
i choose a file from the inputFileUpload WITHOUT a full page submission
because i do not want other components to be validated etc.

Can this be done with a4j somehow?



blargy wrote:
> 
> Im using the t:inputFileUpload component and I want to upload a file. 
> 
> I want some sort of backing bean to be invoked right after a user chooses
> a file. 
> If i add onchange="this.form.submit()" then the whole page is submitted
> which i do not want because it could through some validation errors if
> other fields are not entered yet.
> 
> How come if i add a value change listener it is not invoked until I submit
> the page? 
> 
> Is there anyway around this?
> 
> Any ajax components that would be able to do this?
> 
> 
> Also is there anyway to force the user to have to use the browse button to
> enter a file and not allow them to type in the path?
> 
> Thanks.
> 

-- 
View this message in context: http://www.nabble.com/FileUpload-valueChangeListener-questions.-tf3417981.html#a9526227
Sent from the MyFaces - Users mailing list archive at Nabble.com.