Hi Brad, Without the validation, the loop runs fine, and all the data get inserted into the database correctly. But in the validator, I do some checking for valid emailaddresses, and duplicate email, that I can't use now.
I am puzzled with this error. I have tried in in another app, and it worked fine... Hope you can help! Erik-Jan -----Oorspronkelijk bericht----- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Brad Haas Verzonden: vrijdag 26 mei 2006 21:33 Aan: [email protected] Onderwerp: Re: [Reactor For CF] FW: Problem with validation in iterator object Erik-Jan, Have you tried the loop without the validate() method? What about your list? Could the delimiters be screwed up or could there be some other characters in it that might cause a problem? Brad On May 26, 2006, at 11:30 AM, Erik-Jan Jaquet wrote: > Hi All. > > Now that everybody is busy, I would like to ask you to take a look > at myu > problem. I think I chose a bad time to send it, last night... > > Thanks in advance, > > Erik-Jan > > > Hi all, > > I am running into some problem with the iterator object, and I am > not sure > that it is because I am doing something wrong, or that there is > something > else that's wrong... > > I have a ListRecord, which holds the data for a mailinglist. The List > hasMany recipients. > > I want to do an import of addresses to the mailing list, so I call the > ListRecord.getRecipientIterator. This is the code I have so far: > > <cfloop index="index" list="#filecontent#" delimiters="#chr(10)##chr > (13)#"> > <cfset newRecord = #ListRecord.getrecipientiterator().add()#> > <cfset newRecord.setEmail(currentaddress)> > <cfset newRecord.setStatus('1')> > <cfset newRecord.setDateAdded(Dateformat(now(), 'yyyy-mm-dd'))> > <cfset newRecord.setListID(ListRecord.getlistid())> > <cfset newRecord.validate()> > </cfloop> > > <cfset #ListRecord.getrecipientiterator().save()#> > > > But when I do this, I get the following error: > > An error occured while Transforming an XML document. > Empty expression! > > The error occurred in > C:\var\cfmxroot\wwwroot\mailman.jaquet.net\reactor\core > \objectTranslator.cfc > : line 153 > > Am I going about it the wrong way? Should I take a different approach? > > Hope you can help! > > Kind regards, > > Erik-Jan > > > > > > -- Reactor for ColdFusion Mailing List -- [email protected] > -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/ > > -- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/ -- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/

