Ok.I think I found the solution. I removed the method= post from the Httpservice and it did the trick. But I did try the evaluation version. Thanks for all the input. -NB
--- On Mon, 11/24/08, valdhor <[EMAIL PROTECTED]> wrote: From: valdhor <[EMAIL PROTECTED]> Subject: [flexcoders] Re: checkbox usage in flex To: [email protected] Date: Monday, November 24, 2008, 7:42 PM At this point I would recommend using an HTTP Debugging Proxy like Charles (http://www.charlesp roxy.com) to see exactly what is being sent and where it is going. I'm afraid I don't know ColdFusion so can't tell if you CF code is correct or not. Once you see the actual data that is being sent to your backend code you should be able to figure out where the problem is very quickly. BTW. I have found Charles to be indispensable. It has saved me literally hundreds of hours in debugging time. It is one of two debugging proxies that understand AMF and the only one that is cross platform. It has been well worth its $50 asking price. --- In [EMAIL PROTECTED] ups.com, "sbnkn" <[EMAIL PROTECTED]> wrote: > > Hi, > > Thanks for your suggestions. I tried it and the code looks like this: > > submit button code: > <mx:Button label="Save" click="addAnnouncem ent(event) ;cancel() ;" > styleName="saveButt on"/> > > addAnnouncement function code: > > private function addAnnouncement( evt:Event) :void{ > var selArr:Array = []; > var oRequest:Object = new Object(); > var idx:int; > var len:int = userRequest. lastResult. partners. partner.length; > for (idx=0; idx<len; idx++) { > if (checkBox[idx] .selected) { > selArr.push( checkBox[ idx].label) ; > } > } > > var strPartners: String = selArr.join( ","); > > oRequest.strTitle = strTitle.text; > oRequest.strContent = strContent.text; > oRequest.cntAnnounc ement = cntAnnouncement. text; > oRequest.dtmAssignm entDueDate = > dtmAssignmentDueDat e.text; > oRequest.dtmOpenDat e = dtmOpenDate. text; > oRequest.dtmCloseDa te = dtmCloseDate. text; > oRequest.strPartner s = strPartners; > Alert.show(' partner'+ strPartners) ; > Alert.show(' title'+oRequest. strTitle) ; > Alert.show(' strContent' +oRequest. strContent) ; > Alert.show > ('cntannouncement' +oRequest. cntAnnouncement) ; > > userRequest. send(oRequest) ; > > //userRequest. send(); > > } > > httpservice code: > > <mx:HTTPService id="userRequest" > url="http://localhost: 8500/qry_ Announcement. cfm" useProxy="false" > method="POST" > > > </mx:HTTPService> > > When I execute, the alert shows all the values selected. but it is > not getting inserted into the table(DB). > > Here is the cfm code: > <cfprocessingdirect ive pageencoding = "utf-8" suppressWhiteSpace > = "Yes"> > <cfif isDefined("oRequest .strTitle" ) and isDefined > ("oRequest.strConte nt") and oRequest.strTitle NEQ ""> > <cfquery name="addAnnounceme nt" datasource=" Flex"> > INSERT INTO tblAnnouncement > (strTitle, strContent, dtmOpenDate, > dtmCloseDate, dtmAssignmentDueDat e ) > VALUES > (<cfqueryparam value="#oRequest. strTitle# " > cfsqltype="CF_ SQL_VARCHAR" maxlength="150" >, > <cfqueryparam value="#oRequest. strContent# " > cfsqltype="CF_ SQL_LONGVARCHAR" >, > <cfqueryparam value="#oRequest. dtmOpenDate# " > cfsqltype="CF_ SQL_DATE" >, > <cfqueryparam value="#oRequest. dtmCloseDate# " > cfsqltype="CF_ SQL_DATE" >, > <cfqueryparam value="#oRequest. dtmAssignmentDue Date#" > cfsqltype="CF_ SQL_DATE" > > ) > </cfquery> > </cfprocessingdirec tive> > > i'm stuck here..not sure, where to look for the bug..i do not see > any error..any help is really appreciated. > > -NB > </cfif> > > --- In [EMAIL PROTECTED] ups.com, "Tracy Spratt" <tspratt@> > wrote: > > > > Yes. To go a bit further, while you can create the request object > > declaratively in mxml as you have done, it is dificult to debug > and not > > very flexible. Instead, remove mx:request tagg and do this in a > > function. There is some almost-code below. > > > > > > > > But, it is not clear from your post quite what you want to sent to > the > > server. The repeater will produce multiple check boxes. What is > the > > server expecting? A delimited list of values? If so, then > Repeater > > creates an array of references to repeated items that have an id > > property. You can reference each check box like this: checkBox[n], > where > > "n" is the index in the dataProvider. > > > > > > > > So, in a for loop, with length equal to the Repeater dataProvider, > get a > > reference to each checkbox. Build your return data structure as > needed. > > Then put that into the request object, like below. > > > > > > > > var oRequest:Object = new Object(); > > > > oRequest. strTitle = strTitle.text; > > > > oRequest.strContent = strContent.text; > > oRequest.dtmAssignm entDueDate = dtmAssignmentDueDat e.text; > > > > //oRequest.selected = See above??; > > > > userRequest. send(oRequest) ; > > > > > > > > Now, > > > > > > > > ____________ _________ _________ __ > > > > From: [EMAIL PROTECTED] ups.com > [mailto:[EMAIL PROTECTED] ups.com] On > > Behalf Of valdhor > > Sent: Friday, November 21, 2008 1:11 PM > > To: [EMAIL PROTECTED] ups.com > > Subject: [flexcoders] Re: checkbox usage in flex > > > > > > > > Instead of initiating send in the button, call a function. In the > > function, use the getRepeaterItem method of the repeated item to > get > > each checkbox value then add that as a parameter of the call. > > > > Check the help for more detail: > > http://livedocs. adobe.com/ flex/3/html/ help.html? > content=repeater_ 3.html > > <http://livedocs. adobe.com/ flex/3/html/ help.html? > content=repeater_ 3.html > > > > > > > --- In [EMAIL PROTECTED] ups.com <mailto:flexcoders% > 40yahoogroups. com> > > , "sbnkn" <sbnkn@> wrote: > > > > > > Hi All, > > > > > > I'm new to Flex development and have strong CF background. > > > > > > My simple project detail: > > > I have a datagrid and a form (text field, textarea field, > datefield, > > > and checkbox). Once I provide all the information, and submit the > > > form, the data gets inserted into the table(SQL DB) and shows in > the > > > datagrid. > > > > > > All these work fine except, the checkbox. I use mx:HTTPService. > > > > > > My question: How do I pass the selected checkbox value(s) to the > > > httpservice. > > > > > > checkbox code: > > > > > > <mx:Repeater id="checkBoxRepeate r" > > > dataProvider= "{userRequest. lastResult. partners. partner}" > > > > <mx:CheckBox id="checkBox" > > > label="{checkBoxRep eater.currentIte m.strPartner} " > > > data="{checkBoxRepe ater.currentItem .strPartner} " > > > /> > > > </mx:Repeater> > > > > > > save button code: > > > <mx:Button label="Save" click="userRequest. send();cancel( );" > > > styleName="saveButt on"/> > > > > > > httpservice code: > > > <mx:HTTPService id="userRequest" > > > url="http://url.com/ dispaly/qry_ Annoucement. cfm > > <http://url.com/ dispaly/qry_ Annoucement. cfm> " useProxy="false" > > > method="POST" > > > > <mx:request xmlns=""> > > > <strTitle>{strTitle .text}</strTitle > > > > <strContent> {strContent. text}</strConten t> > > > > > > > > <dtmAssignmentDueDa te>{dtmAssignmen tDueDate. text} > </dtmAssignmentDueD ate> > > > <strPartners> {strPartners. text}</strPartne rs> > > > </mx:request> > > > </mx:HTTPService> > > > > > > Any help or direction will be great. > > > > > > Thanks for your help in advance, > > > NB > > > > > >

