Yes that works!  Thanks!

event.getNewValue() is the UploadedFile that I need.  I will document
this on the Setup_For_File_Uploads wiki page with some more example
code, when I have all my stuff working well.

Cosma Colanicchia wrote:
> I don't know if (and when) ValueChangeListener is triggered with
> immediate UIInput components, but you can try this: set a binding on
> your upload component and set a valuechangelistener for it. If this
> fires before other validations, you should have a chance to retrieve
> the uploaded data from the component itself and save it somewhere..
> 
> Cosma
> 
> 
> 
> 2006/6/22, Dave Brondsema <[EMAIL PROTECTED]>:
>> Hmm, good idea but it doesn't work.  "if any non-immediate component
>> fails validation, then no backing bean updates will be performed"  So
>> the code in my backing bean still doesn't get executed.
>>
>> I'm thinking that it would have to be some sort of PhaseListener or
>> changes to the file upload component.  Anybody else have ideas?
>>
>> Matthias Wessendorf wrote:
>> > See [1]
>> >
>> > [1] http://wiki.apache.org/myfaces/How_The_Immediate_Attribute_Works
>> >
>> > On 6/21/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
>> >> have you tried immediate=true for the file input?
>> >> this "speacial logic" in the setMyFile() in your backingbean ?
>> >>
>> >> just a quick guess.
>> >>
>> >>
>> >> On 6/21/06, Dave Brondsema <[EMAIL PROTECTED]> wrote:
>> >> > Dave Brondsema wrote:
>> >> > > Is there a way to store the inputFileUpload file even if there are
>> >> > > process validation errors on other components?  I don't want the
>> >> user to
>> >> > > have to re-upload a file if they forgot some other required field,
>> >> for
>> >> > > example.
>> >> > >
>> >> > > Thanks,
>> >> > >
>> >> >
>> >> > So I guess there's no way to do this?  It seems like this would be a
>> >> > very important feature.  I really don't think it's acceptable to
>> >> force a
>> >> > user to upload a file multiple times.
>> >> >
>> >> > --
>> >> > Dave Brondsema
>> >> > Software Developer
>> >> > Cornerstone University
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> Matthias Wessendorf
>> >> Aechterhoek 18
>> >> 48282 Emsdetten
>> >> blog: http://jroller.com/page/mwessendorf
>> >> mail: mwessendorf-at-gmail-dot-com
>> >>
>> >
>> >
>>
>>
>> -- 
>> Dave Brondsema
>> Software Developer
>> Cornerstone University
>>
>>
>>
>>
> 


-- 
Dave Brondsema
Software Developer
Cornerstone University

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to