Hi John,

   PLP's can be a real bi%&h whe nyou're doing this kind of thing -
   the reason for it is annoying but fairly simple - to actually load
   any step of the plp, the *calling page* of the plp is reloaded
   every single time.  For example, if your object's edit handler
   contains the cfa_plp tag call, it is being reloaded every
   step/every iteration.  This can be a real problem when using input
   scopes, as if you start with a blank object, you'll often end up
   with it overwriting the output scope with a blank object each time
   you refresh.

   There are some other reasons your problem can occurr, but I'd suggest
   looking at that calling file first, and see if a little conditional
   logic around the input object can fix it.

   Give me a yell if you need any help (and if you get completely fed
   up or you know fusebox, I'll give you a tag to completely replace
   Plps <grin>)

cheers,
Toby


 ---------------------------------------

   Life is poetry - write it in your own words.

 ---------------------------------------

Toby Tremayne 
Senior Technical Consultant
Code Poet and Zen Master of the Heavy Sleep
Lyricist Software
www.lyricist.com.au
0416 048 090
ICQ:  13107913



Saturday, December 01, 2001, 2:32:39 AM, you wrote:

JB> Hi!  [Pardon the length of this email.  The question really isn't that long,
JB> I've just included some code chunkies for context.]

JB> I've written a PLP to edit an object.  The PLP works in its current, basic
JB> form (you can use it to edit some of the attributes of the object), however,
JB> as it's a complex object, I need one of the steps of the PLP to iterate.

JB> This is where I'm experiencing the problem.  When you click one of the
JB> buttons to iterate the page, this code runs...

JB> <CFA_controlHandlerEvent NAME="edit_question">
JB>         <!--- default form processing here --->
JB>         <CFSET output[thisstep.name] = StructNew()>

JB>         <!---
JB> --------------------------------------------------------------------
JB>                 notify the output struct about the form values just
submitted --->>
JB>         <CFPARAM NAME="Form.Showresults" DEFAULT="1">
JB>         <CFSET output.Showresults = Form.Showresults>
JB>         <CFSET output.Title = Form.Title>
JB>         <CFIF Form.Objrefid is not "">
JB>                 <CFSET output.Objrefid = Form.Objrefid>
JB>         </CFIF>                 

JB>         <!--- mark this step as incomplete --->
JB>         <cfset thisStep.isComplete = 0>
JB>         <!--- don't let the plp autoadvance --->
JB>         <cfset thisStep.advance = 0>
JB> </CFA_controlHandlerEvent>

JB> ..this works great.  The page reloads, I display the contents of Title, etc
JB> in non-editable form, and the value are right.  At this point, you can edit
JB> the question and, when you click Save, this code runs...

JB> <CFA_controlHandlerEvent NAME="save_question">
JB>         <!--- default form processing here --->
JB>         <CFSET output[thisstep.name] = StructNew()>

JB>         <!---
JB> --------------------------------------------------------------------
JB>                 notify the output struct about the form values just
submitted --->>
JB>         <CFSET output.aquestion[form.header.save_question].Body = Form.Body>
JB>         <CFSET output.aquestion[form.header.save_question].Responsetype =
Form.Responsetype>>

JB>         <!--- mark this step as incomplete --->
JB>         <cfset thisStep.isComplete = 0>
JB>         <!--- don't let the plp autoadvance --->
JB>         <cfset thisStep.advance = 0>
JB> </CFA_controlHandlerEvent>

JB> ..this also works great.  The page reloads and the Body and Responsetype
JB> just submitted are redisplayed in non-editable form.  The problem is that,
JB> now output.Title has reverted to its original value.

JB> It's important to note that output.Title works just fine when it gets
JB> processed through the "standard" Next handler...

JB> <CFA_controlHandlerEvent NAME="next">
JB>         <!--- default form processing here --->
JB>         <CFSET output[thisstep.name] = StructNew()>

JB>         <!---
JB> --------------------------------------------------------------------
JB>                 notify the output struct about the form values just
submitted --->>
JB>         <CFPARAM NAME="Form.Showresults" DEFAULT="1">
JB>         <CFSET output.Showresults = Form.Showresults>
JB>         <CFSET output.Title = Form.Title>
JB>         <CFIF Form.Objrefid is not "">
JB>                 <CFSET output.Objrefid = Form.Objrefid>
JB>         </CFIF>                 
        
JB>         <!--- mark this step as complete --->
JB>         <CFSET continue = true>
JB>         <cfset thisStep.isComplete = 1>
JB>         <!--- let the plp autoadvance --->
JB>         <cfset thisStep.advance = 1>
JB> </CFA_controlHandlerEvent>

JB> ..so, my question is, how do I get the PLP to "remember" or "commit" the
JB> output struct within iterative calls to the same step the way it does when
JB> you're moving between steps?

JB> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to