Hi all

I'm using this in CFScript:

getPageContext().forward(thispage & "?action=addnew"); 

to reload the page after a save for a new form display. Trouble is that
it, with the logic I'm using (below), it seems to want to go around
again, like the FORM scope persists. Going back to CFLOCATION works
fine.

Can this happen? Because this is a server-side re-direct (reload the
target page), can the FORM scope still persist after getPageContext is
called? 

the main page processing logicw when the form submitted 

<cfscript>
        
        objRequisition = createobject("component", "XXX").init(dsnInfo,
cmpy);
        if (isDefined("form.fieldnames")){
                if (isNew){ // NEW 
                        setObjPropertiesFromForm(objRequisition);
                        objRequisition.AddNew();
                }else if(isEdit){ // EDIT 
                        setObjPropertiesFromForm(objRequisition);

                        objRequisition.Update();        
                }else{
                        abort();
                }
                getPageContext().forward(thispage & "?action=addnew");
// reload this page for a new requisition

                                        
        }else{
                if (isNew){ // new requisition
                        fillFormFromDefaults();
                }else if(isEdit){ // from link 
                        objRequisition.get(URL.req);
                        fillFormFromObject(objRequisition);

                }else{
                        abort();
                }
        }
</cfscript>




---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to