CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Page flow and event firing order

Print topic Send  topic

Author Message
timdw

Posts: 25
Posted: 10/09/2005, 1:01 PM

I seem to remember seeing something somewhere which detailed the sequence of events as a Codecharge generated page loaded. Does anyone know where this is?

More specifically, I have a record form with a file upload control. Does BeforeProcessFile happen before or after validation? I'm trying to avoid the situation where a file is uploaded, record validation fails on another field, the changes are abandoned by the user leaving the uploaded file "orphaned" as the record is not updated with the newly uploaded file's location.

Thanks,

Tim
View profile  Send private message
DonB
Posted: 10/10/2005, 5:31 PM

The BeforeProcessFile event fires as part of the Upload method, which is
done before the insert/update (in which the Validate event occurs).

So, the answer is BeforeProcessFile happens long before Validate.

--
DonB

http://www.gotodon.com/ccbth


"timdw" <timdw@forum.codecharge> wrote in message
news:24349772129911@news.codecharge.com...
> I seem to remember seeing something somewhere which detailed the sequence
of
> events as a Codecharge generated page loaded. Does anyone know where this
is?
>
> More specifically, I have a record form with a file upload control. Does
> BeforeProcessFile happen before or after validation? I'm trying to avoid
the
> situation where a file is uploaded, record validation fails on another
field,
> the changes are abandoned by the user leaving the uploaded file "orphaned"
as
> the record is not updated with the newly uploaded file's location.
>
> Thanks,
>
> Tim
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

timdw

Posts: 25
Posted: 10/11/2005, 7:28 PM

I thought I'd replied to this - must have dreamed it .... :-/

Thanks for the info. I've moved the upload control into another record so I could handle it completely seperately.

Cheers,

Tim
View profile  Send private message
timdw

Posts: 25
Posted: 10/12/2005, 1:34 PM

Hmm, much head scratching later it turns out that the BeforeProcessFile and AfterProcessFile happen in the clsFileUpload method Move(). This is (as far as I can tell) only invoked in the record control's InsertRow() and UpdateRow() methods, which means two things:

- uploaded files are moved from temp only after successful validation and record insertion/update, and

- the upload control must be bound to a DB column otherwise it won't work. This is where I'm going wrong at the moment :-<

IMO the first is sensible behaviour, as only temp can get littered with files (so what - schedule a cleanup) but the second is a little aggravating mainly because it's not what I expected :-D
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.