OK, upon further review, I AM inside the CFC with an argument calling the
form LabView. So I think I have to call the form object "LabView".
Then while in this CFC if they chose "Test" I just do the data manipulation
with cfquery, if they chose "Live" I'm trying to hit the remote server via
the webservice. Here's the whole function:
<set name="postLabView" value="#application.appCustManager.postLabView(
attributes )#" />
<cffunction name="postLabView" hint="I process changes/removals of
appCust setting." access="public" returntype="string" output="false">
<cfargument name="LabView" type="struct" required="yes">
<cfset var local = structNew() />
<cfif LabView.server EQ "Test">
<cfset local.ds = "local_"&LabView.lab>
<!--- First delete overrides for this lab --->
<cfquery name="delOverrides" datasource="#local.ds#">
DELETE from appCustOverrides
WHERE LabID = <cfqueryparam value="#LabView.lab#"
cfsqltype="CF_SQL_VARCHAR">
</cfquery>
<!--- Now create overrides from the form --->
<cfparam name="dspAppCusts" default="">
<cfparam name="dspValues" default="">
<cfloop collection="#LabView#" item="i">
<cfif left(i, 9) EQ "override_">
<!--- Get the id off i --->
<cfset id = right(i, len(i) - 9)>
<cfset value = "OverrideValue_"&id>
<cfset appCust = "AppCust_"&id>
<cfset dspAppCusts = listappend(dspAppCusts,
evaluate(appCust))>
<cfset dspValues = listappend(dspValues,
evaluate(value))>
<cfquery name="addOverrides" datasource="#local.ds#">
INSERT INTO appCustOverrides (AppCust, LabID,
OverrideValue)
VALUES (<cfqueryparam value="#evaluate(appCust)#"
cfsqltype="CF_SQL_VARCHAR">,
<cfqueryparam value="#LabView.lab#"
cfsqltype="CF_SQL_VARCHAR">,
<cfqueryparam
value="#evaluate(value)#" cfsqltype="CF_SQL_VARCHAR">)
</cfquery>
</cfif>
</cfloop>
<cfelse>
<!--- Process liveoverrides for this lab --->
<cfinvoke method="postLabView"
returnvariable="qryGetLabView"
argumentcollection="#LabView#"
webservice="
http://localhost/Labtest/trunk/lts/com/appCustAdmin.cfc?wsdl">
</cfinvoke>
</cfif>
<cfset local.msg = "appCust settings updated for #LabView.lab# on
#LabView.server#.">
<cfreturn local.msg />
</cffunction>
Greg
On 2/9/07, Greg Luce <[EMAIL PROTECTED]> wrote:
>
> Oh crap! You are right. I was used to using that while IN the cfc because
> I named the argument LabView. Thanks.
>
> Greg
>
> On 2/9/07, Ian Skinner <[EMAIL PROTECTED]> wrote:
> >
> > "LabView" (name of the form that was submitted)
> >
> > What do you mean by this phrase? If you mean that you have something
> > like this on the form page <form name="LabView">, this does not apply on the
> > action page. On the action page the form values are always in a structure
> > named "form" and I would do something like this:
> > argumentcollection="#form#".
> >
> > If you do something on the action page that processes the form scope
> > into a structure named "LabView" then this does not apply.
> >
> >
> > --------------
> > Ian Skinner
> > Web Programmer
> > BloodSource
> > www.BloodSource.org
> > Sacramento, CA
> >
> > ---------
> > | 1 | |
> > --------- Binary Soduko
> > | | |
> > ---------
> >
> > "C code. C code run. Run code run. Please!"
> > - Cynthia Dunning
> >
> > Confidentiality Notice: This message including any
> > attachments is for the sole use of the intended
> > recipient(s) and may contain confidential and privileged
> > information. Any unauthorized review, use, disclosure or
> > distribution is prohibited. If you are not the
> > intended recipient, please contact the sender and
> > delete any copies of this message.
> >
> >
> >
> >
> >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269314
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4