Re: Inserting rows into a 2d array
Looks like this may already be answered, but I just got around to playing with this.My solution is very similar, but maybe a bit more streamlined, if you are still just trying to add blank rows for output purposes. cfset Test = ArrayNew(2) cfset Test[1][1] = 'Sacramento' cfset Test[1][2] = 'C001' cfset Test[2][1] = 'Los Angles' cfset Test[2][2] = 'C002' cfset Test[3][1] = 'New York' cfset Test[3][2] = 'C003' cfset Test[4][1] = 'Seattle' cfset Test[4][2] = 'C004' h3Dump Test Array/h3 cfdump var=#Test# h3Output Row 4/h3 cfoutput#Test[4][1]# #Test[4][2]#/cfoutput cfset ArrayInsertAt(Test,3,ArrayNew(1)) h3Dump Test Array After new row added/h3 cfdump var=#test# h3Output Row 4/h3 cfoutput#Test[4][1]# #Test[4][2]#/cfoutput The only real difference then the other example, is I don't bother creating a blank placeholder array.Just put the ArraNew(1) function as the third parameter of the ArrayInsertAt function.This creates a blank new array at the new position.Then, if you later decide you need to put data here, you can just use simple assignment. cfset Test[3][1] = first value cfset Test[3][2] = second value ect. What took me a little to get my head around, when I first learned Cold Fusion Arrays, is that, when you have a two dimension Array, it does not have to be a grid or table.It is more proper to visualize it as a one diminsion array, that each element contains individual one diminsion arrays.Thus you can have different size arrays at each element.Something like this. 1 : Apples Oranges Peaches 2 : Joe Sally Jim Paul Mary Ringo George 3 : 1 2 3 4 5 6 7 8 9 10 4 : Cool 5 : A B C D E F G H I J K L M N O P Q Thus you have a 3 element sub-array in position 1, a 7 element sub-array in position 2, a 10 element sub-array in position 3, a 1 element sub-array in position 4 and finally 17 element sub-array in position 5. This is powerfull stuff, because each sub-element can contain another level of array, thus you can create truely mind boggeling array demeinsions, only limited by memory, performance and sanity. If you wanted an 11 dimension array {StringTheoryArray[2][3][1][5][7][8][1][9][17][22][4]}, this is perfectly leagle and allowed.May not be advisable, but you can do it. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Inserting rows into a 2d array
Glad you got this to work for you, but just as a last thought.Your method requries the code to loop through all the data three times. Once to transfer the data from the query to the array, once to process blank rows into the array, and a third time to display it.I would be a bit leary for something like this on a high trafic page with a large data set.If neither of these apply to this application then you shouldn't have a problem.But it's a trade off to be aware of if used on such a page. ___ Ian Skinner Web Developer Sierra Outdoor Recreation (http://www.SierraOutdoorRecreation.com) - Original Message - From: DougF To: CF-Talk Sent: Monday, November 17, 2003 9:22 PM Subject: Re: Inserting rows into a 2d array Thanks Dave. Just what I was fishing for... As a visual learner I need an example to help understand the concept. Here is what I have come up with. Tested, works, and solved my problem. - cfset My2DArray = ArrayNew(2) cfloop index=row from=1 to=#query.RecordCount# CFSET My2DArray[row][1] = #query.var_name[row]# CFSET My2DArray[row][2] = #query.var_id[row]# CFSET My2DArray[row][3] = #query.var_count[row]# /cfloop cfset firstLetter = A cfset count=1 cfif My2DArray[count][1] NEQ cfloop condition=count LTE ArrayLen(My2DArray) cfif Left(My2DArray[count][1],1) NEQ firstLetter cfset firstLetter = left(My2DArray[count][1],1) cfset NewElement = ArrayNew(1) cfset NewElement[1] = cfset NewElement[2] = cfset NewElement[3] = cfset InsertSuccess = ArrayInsertAt(My2DArray, #count#, NewElement) /cfif cfset count = count + 1 /cfloop /cfif -- - Original Message - From: Dave Watts [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, November 17, 2003 4:46 PM Subject: RE: Inserting rows into a 2d array Something like this might work: cfset My2DArray = ArrayNew(2) cfset My2DArray[1][1] = outer 1 inner 1 cfset My2DArray[1][2] = outer 1 inner 2 cfset My2DArray[2][1] = outer 2 inner 1 cfset My2DArray[2][2] = outer 2 inner 2 cfset NewElement = ArrayNew(1) cfset NewElement[1] = foo cfset NewElement[2] = bar cfset rs = ArrayInsertAt(My2DArray, 2, NewElement) Note that I haven't tested this, exactly, but something close to this should work. You could also create the element in place, then populate it, I suspect. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF Studio 5 resource windows
NO -Original Message- From: Jeff Beer [mailto:[EMAIL PROTECTED] Sent: maandag 17 november 2003 22:03 To: CF-Talk Subject: OT: CF Studio 5 resource windows Studio has two file windows (file 1, primary and file 2, secondary).Is there any way to add more? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF and strange HTTP 500 error
Is the city the only difference between users.Do they have different passwords or different access variables.Are you using cfc's or udf's? Are you using cflogin?I've encounterd the frustrating http 500 when there were errors in my cfc or udf.I've noticed that when when the error in my code, usely cfquery,is burried behind cfc's or under udf's I might run into this problem. Dwayne Cole, MS in MIS, MBA Florida AM University Certified Advanced ColdFusion Developer 850-591-0212 It can truly be said that nothing happens until there is vision. But it is equally true that a vision with no underlying sense of purpose, no calling, is just a good idea - all sound and fury, signifying nothing.The Fifth Discipline - Peter Senge -- Original Message -- From: Mosh Teitelbaum [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Mon, 17 Nov 2003 17:55:30 -0500 Uwe: A status code of 500 indicates that there was an internal server error... i.e., something funky happened, probably somewhere in your code.What is the code for login.cfm trying to do?Check the code for any conditional logic that may be affected by external things (such as cookies, IP Address, etc). Or you could post the code here (login.cfm, application.cfm, onRequestEnd.cfm and any other applicable code) and let us have a look see. -- Mosh Teitelbaum evoch, LLC Tel: (301) 942-5378 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 5:38 PM To: CF-Talk Subject: CF and strange HTTP 500 error Hi list, I have a strange problem with a CF-server in an Intranet of a customer: User A from city X clicks the following URL: www.foo.com/login.cfm with no problem at all. User B clicks the same URL from city Y and will get the following error: HTTP 500 error (in detailled: -2146893054 (0x80090302)) Any clues how this is going to get happen ? On a sitenote: User B can access normal html-pages from the same web-server without a problem. Uwe [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:HTML e-Newsletter
Thanks for the pointers.I kinda knew what to do from a technical perspective but I wanted to hear from someone about the issues and challenges faced when using cfmail to send html email to opt-in list that is expected to grow to about 8000.I've heard of .aol as well. Dwayne, Let me point out a few gotchas that hopefully the tutorial will cover. 1) Outlook XP and the latesxt versions of Outlook Express block by default any _javascript_ or Active X Controls. That means if you send out any videos, Flash or a snippy _javascript_ most folks can't see it. 2) The latest beta of Outlook blocks HTML email having formating or images from an external source. HTML email requires external images for displaying the images properly as the email is forwared from one person to the next. Marketers use this feature to embed web bugs allowing one to track the number of people who have opened the email message. 3) You must use an opt-in list to send out the email. In some US States and contries, you can be legally liable for emails not sent to an opt in list. Even worse, you can also be placed on a Black Hole list if you're using an external server acting as a relay. 4) You need to configrue your mail server to ensure outsiders can not relay off of the server you're using to send CFMAIL. CFMAIL does require an open relay to send out email-- on the other hand if you use NAT to make sure only non-routeable IP addresses are relayed by CFMAIL and specifically specify the non-routeable IP address of the Cold Fusion in the mail server, then you can protect yourself from spammers and not get yourself on a black hole list for having an open relay. From a business point of view this has the following reprocussions. A) Your subject line must clear, consise and meaningful to the opener B) You should use plain text without forwarding unless the email generated is from an Intranet (where one can control the user experiance while using the firewall and black hole lists to control spam) C) If your trying this for an external audiance, you need to purcahse or generate an opt in list, have a privacy policy in place and have a real secure set-up from a hosting point of view. On the other hand why send out a message people can not read because they are protecting themselves from spam, viruses-- and protect yourself from potential legal and network configuration issues. IMHO, HTML email should only be used in an Intranet setting where one can control the message and the client. I know that this is a hot button issue among the CF talkers out there -- this has been discussed at length on this forum. However, I have seen the reprocussions of a poor network configuration and HTML email. Jeremy P.S. I've included how to set up the HTML email below as an FYI [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Mailpart and 6.1
But that¹s not the right order? You are supposed to do the most simple version first?? On 17/11/03 11:51 pm, Stacy Young [EMAIL PROTECTED] wrote: Try setting the HTML first then text Stace _ From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: November 17, 2003 6:34 PM To: CF-Talk Subject: Mailpart and 6.1 Hello Having a few issues with some code in 6.1 I have the following cfmail cfmail to=#arguments.to# from=#arguments.from# subject=#removeHTML(arguments.subject)# charset=iso-8859-1 cfmailpart type=text charset=iso-8859-1 #plaintext# /cfmailpart cfif arguments.html cfmailpart type=html charset=iso-8859-1 #arguments.header# #body# #arguments.footer# /cfmailpart /cfif /cfmail Which is all fine and wonderful The problem is it creates 2 types of text/plain, one at the top which it should, and one after the html one... And hotmail being hotmail decides to take the 2nd one and so I get a blank email... How do I stop this? Ryan _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
ZIP file
Hi folks, I am looking for a cftag which zip files and keeps the relative paths in the archive. Any recommendation? thx Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: ZIP file
I am looking for a cftag which zip files and keeps the relative paths in the archive. Any recommendation? If you are using MX, give this a try: http://www.cflib.org/udf.cfm?ID=744 Massimo Foti http://www.massimocorner.com Co-Author of Dreamweaver MX 2004 Magic: http://www.dwmagic.com/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: ZIP file
Thanks for the link. Is there a way to call it with relative paths? When I extract the zip the hole file path is stored: CFusionMX\wwwroot\DevArea\ZipTest\icons\test.gif I need the need the relative path: \icons\test.gif Thanks for your help Chris -Original Message- From: Massimo Foti [mailto:[EMAIL PROTECTED] Sent: mardi 18 novembre 2003 10:59 To: CF-Talk Subject: Re: ZIP file I am looking for a cftag which zip files and keeps the relative paths in the archive. Any recommendation? If you are using MX, give this a try: http://www.cflib.org/udf.cfm?ID=744 http://www.cflib.org/udf.cfm?ID=744 Massimo Foti http://www.massimocorner.com http://www.massimocorner.com Co-Author of Dreamweaver MX 2004 Magic: http://www.dwmagic.com/ http://www.dwmagic.com/ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: ZIP file
Thanks for the link. Is there a way to call it with relative paths? When I extract the zip the hole file path is stored: CFusionMX\wwwroot\DevArea\ZipTest\icons\test.gif I need the need the relative path: \icons\test.gif I have no idea... Sorry. You may try to check Java APIs to see if it's feasible, look for java.util.zip: http://java.sun.com/j2se/1.4.2/docs/api/ Massimo Foti http://www.massimocorner.com Co-Author of Dreamweaver MX 2004 Magic: http://www.dwmagic.com/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: ZIP file
Thanks for your help Massimo, I will dig into the Java API. -Original Message- From: Massimo Foti [mailto:[EMAIL PROTECTED] Sent: mardi 18 novembre 2003 11:20 To: CF-Talk Subject: Re: ZIP file Thanks for the link. Is there a way to call it with relative paths? When I extract the zip the hole file path is stored: CFusionMX\wwwroot\DevArea\ZipTest\icons\test.gif I need the need the relative path: \icons\test.gif I have no idea... Sorry. You may try to check Java APIs to see if it's feasible, look for java.util.zip: http://java.sun.com/j2se/1.4.2/docs/api/ http://java.sun.com/j2se/1.4.2/docs/api/ Massimo Foti http://www.massimocorner.com http://www.massimocorner.com Co-Author of Dreamweaver MX 2004 Magic: http://www.dwmagic.com/ http://www.dwmagic.com/ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
TDateTime conversion
Hi Has anyone written any UDF or something to convert TDateTime value (in Delphi) to normal ODBC date/time format? Even a TSQL command will help me as well.. Thanks Shahzad.Butt Ph:+44 (0) 1992 701 722 Fax: +44 (0) 1992 701 604 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Weird PC Error - Part II
This might seem like a pain, but I remember running into this all the time while working in college... the approach that always seemed to work was the following: If you have more than one memory chip installed, remove them and leave one in the 0 or 1 bank, whichever is first. Remove all other PCI/ISA cards... (network card, sound card, controller cards, DVD decoder cards, etc.. take them all out). Try installing XP at this point. If all goes well, add your hardware back to the machine one by one, rebooting in between. You might discover the piece that was giving you a problem. If this approach does not work, the next step is to disconnect all drives so that only the CD-ROM and Hard drive are attached. If this works, install your other pieces one by one and you should find the culprit piece. If that approach fails as well you are getting down to the nitty gritty here... check the BIOS and make sure you have the latest flash which you can get from the manufacturers website. Check connections, reset BIOS to defaults, try exchanging the video card out for a basic one. If that fails too, you are SOL. :-) Mike -Original Message- From: ColdFusion Developer [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 8:34 PM To: CF-Talk Subject: RE: Weird PC Error - Part II I have ran a Hard Drive diagnostics test utility and the Quick Test came back just fine. The Advanced test is almost done and does not seem to be anything wrong there either. So now I am a bigger loss as to why i can not install Windows XP without the machine locking up. -- Original Message -- From: ColdFusion Developer [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Mon, 17 Nov 2003 19:59:22 -0500 unable to do that since there is only the one strip -- Original Message -- From: Dave Watts [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Mon, 17 Nov 2003 20:03:02 -0500 ANy other ideas before I toss the thing out the window??? You might try removing some of the memory, if possible. Sometimes, memory chip defects manifest themselves in odd ways. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Weird PC Error - Part II
A friend introduced me to this application at the weekend... http://oca.microsoft.com/en/windiag.asp I've just bought myself a shiny new gigabyte m/b, amd 2400+ processor, CPU fan, power supply and 512mb of 400DDR memory. Despite all the new kit, the damn thing kept crashing.I thought it was the video card.My friend came around at the weekend to help me solve the issue.First thing he suggested doing was checking the memory with a disk he'd created earlier.He rebooted my PC, booted off the floppy and ran the extended tests and hey presto up came an error on about the 7th test.Quick replace of the memory with some known good memory and problem solved! All I've got to do now is go and get the shop to replace it. Never have I had such an easy time with diagnosing a hardware issue. Stephen ColdFusion Developer wrote: unable to do that since there is only the one strip -- Original Message -- From: Dave Watts [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Mon, 17 Nov 2003 20:03:02 -0500 ANy other ideas before I toss the thing out the window??? You might try removing some of the memory, if possible. Sometimes, memory chip defects manifest themselves in odd ways. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re[2]: CF and strange HTTP 500 error
Hi list, thanks for everyone who answered this thread on this list. It turned out, that the anonymous access to the website was disabled and user A made a hidden login via a trusted domain. Oh man. What a nightmare. The bad part is, that IIS didn't give any useful information in terms of error-messages at all !! Uwe DC Is the city the only difference between users.Do they have different passwords or different access variables.Are you using cfc's or udf's? Are you using cflogin?I've encounterd the DC frustrating http 500 when there were errors in my cfc or udf.I've noticed that when when the error in my code, usely cfquery,is burried behind cfc's or under udf's I might run into this DC problem. DC Dwayne Cole, MS in MIS, MBA DC Florida AM University DC Certified Advanced ColdFusion Developer DC 850-591-0212 DC It can truly be said that nothing happens until there is vision. But it is equally true that a vision with no underlying sense of purpose, no calling, is just a good idea - all sound and fury, DC signifying nothing.The Fifth Discipline - Peter Senge DC -- Original Message -- DC From: Mosh Teitelbaum [EMAIL PROTECTED] DC Reply-To: [EMAIL PROTECTED] DC Date:Mon, 17 Nov 2003 17:55:30 -0500 Uwe: A status code of 500 indicates that there was an internal server error... i.e., something funky happened, probably somewhere in your code.What is the code for login.cfm trying to do?Check the code for any conditional logic that may be affected by external things (such as cookies, IP Address, etc). Or you could post the code here (login.cfm, application.cfm, onRequestEnd.cfm and any other applicable code) and let us have a look see. -- Mosh Teitelbaum evoch, LLC Tel: (301) 942-5378 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 5:38 PM To: CF-Talk Subject: CF and strange HTTP 500 error Hi list, I have a strange problem with a CF-server in an Intranet of a customer: User A from city X clicks the following URL: www.foo.com/login.cfm with no problem at all. User B clicks the same URL from city Y and will get the following error: HTTP 500 error (in detailled: -2146893054 (0x80090302)) Any clues how this is going to get happen ? On a sitenote: User B can access normal html-pages from the same web-server without a problem. Uwe DC [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Weird PC Error - Part II
Good call. I used to buy cheaper memory all the time (eBay, etc..) but after having so many issues I just buy the good stuff when its on sale at newegg.com or amazon... Kingston usually. I am running a 2400+ as well :-) -Original Message- From: Stephen Moretti [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 6:58 AM To: CF-Talk Subject: Re: Weird PC Error - Part II A friend introduced me to this application at the weekend... http://oca.microsoft.com/en/windiag.asp http://oca.microsoft.com/en/windiag.asp I've just bought myself a shiny new gigabyte m/b, amd 2400+ processor, CPU fan, power supply and 512mb of 400DDR memory. Despite all the new kit, the damn thing kept crashing.I thought it was the video card.My friend came around at the weekend to help me solve the issue.First thing he suggested doing was checking the memory with a disk he'd created earlier.He rebooted my PC, booted off the floppy and ran the extended tests and hey presto up came an error on about the 7th test.Quick replace of the memory with some known good memory and problem solved! All I've got to do now is go and get the shop to replace it. Never have I had such an easy time with diagnosing a hardware issue. Stephen ColdFusion Developer wrote: unable to do that since there is only the one strip -- Original Message -- From: Dave Watts [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Mon, 17 Nov 2003 20:03:02 -0500 ANy other ideas before I toss the thing out the window??? You might try removing some of the memory, if possible. Sometimes, memory chip defects manifest themselves in odd ways. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
re: REPOST: Implementing cfftp along with cfdirectory????
Hi, The CF code below displays directories/files on D: drive on the server using cfdirectory. I have an app where I want to FTP into the server and list directories/files the same way. I'm not sure how to incorporate CFFTP into the below code to produce the output? Can someone give me a hand? Thanks HEAD titleDirectory Listing/title style .dlinks {font-family:arial, verdana, helvetica, sanserif;font-weight:normal;font-size:12px; } a:hover { color:#FF9900 } A { text-decoration: none } /style /HEAD BODY text=#00 leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 link=#66 vlink=#66 alink=#66 cfscript // Copy form and URL variables to attributes scope if (NOT IsDefined(attributes)) attributes = StructNew(); if (IsDefined(form)) StructAppend(attributes,form,yes); if (IsDefined(url)) StructAppend(attributes,url,yes); // Expected parameters variables.defaultdrive = d:; if (NOT IsDefined(attributes.directorypath)) attributes.directorypath=variables.defaultdrive\; attributes.directorypath = URLDecode(attributes.directorypath); if (NOT IsDefined(attributes.indent)) attributes.indent = 1; // use this to make sure the display tables have enough columns variables.leftoverindent = ListLen(attributes.directorypath,\)-attributes.indent+1; if (variables.leftoverindent LT 0) variables.leftoverindent = ListLen(attributes.directorypath,\)+1; // default variables variables.currentpath = ; variables.nextfolder = ; variables.ignorelist = .,..; // Set up the information required for the display of this level for (i=1; i lte attributes.indent; i=i+1) currentpath = ListAppend(currentpath,ListGetAt(attributes.directorypath,i,\),\); if (attributes.indent LT listlen(attributes.directorypath,\)) variables.nextfolder = ListGetAt(attributes.directorypath,attributes.indent+1,\); /cfscript cfdirectory action="" directory=#variables.currentpath# name=DirListing sort=type ASC, name ASC cfoutput query=DirListing cfsilent cfscript // Set up the next path nextpath = variables.currentpath\name\; nextindent = attributes.indent +1; updir = listdeleteat(variables.currentpath,listlen(variables.currentpath,\),\) \; /cfscript /cfsilent cfif attributes.indent EQ 1 cfif DirListing.type IS dir AND ListFindNoCase(variables.ignorelist,dirlisting.name) EQ 0 !--- Display restricted top level --- TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 cfifDirListing.name eq variables.nextfolder !--- Display Expanded Folder --- TR TD colspan=#attributes.indent#nbsp;/TD TD valign=middle width=16 height=13A href="" alt=BackIMG src="" width=16 border=0 alt=Back/A/TD TD colspan=#leftoverindent#nbsp;A href="" alt=Back#dirlisting.name#/A/TD /TR CFMODULE TEMPLATE=listing.cfm directorypath=#attributes.directorypath# indent=#nextindent# cfelse !--- Display collapsed folder --- TR TD colspan=#attributes.indent#nbsp;/TD TD width=16 height=13A href="" alt=#dirlisting.name#IMG src="" border=0/A/TD TD colspan=#leftoverindent# align=left !--- Display directory folders --- nbsp;A href="" alt=#dirlisting.name##dirlisting.name#/A /TD /TR /cfif /cfif cfelse !--- Display Directory 2nd level + --- cfif DirListing.type IS dir AND ListFindNoCase(variables.ignorelist,dirlisting.name) EQ 0 cfifDirListing.name eq variables.nextfolder !--- Display Expanded Folder --- TR TD colspan=#attributes.indent#nbsp;/TD TD valign=middle width=16 height=13A href="" alt=BackIMG src="" width=16 border=0 alt=Back/A/TD TD colspan=#leftoverindent#nbsp;A href="" alt=Back#dirlisting.name#/A/TD /TR CFMODULE TEMPLATE=listing.cfm directorypath=#attributes.directorypath# indent=#nextindent# cfelse !--- Display collapsed folder --- TR TD colspan=#attributes.indent#/TD TD valign=middle width=16 height=13A href="" alt=#dirlisting.name#IMG src="" border=0/A/TD TD colspan=#leftoverindent# align=left !--- Display directory folders --- nbsp;A href="" alt=#dirlisting.name##dirlisting.name#/A /TD /TR /cfif cfelseif ListFindNoCase(variables.ignorelist,dirlisting.name) EQ 0 !--- Display File --- TR height=20 TD colspan=#attributes.indent#nbsp;/TD TD width=18 height=20nbsp;/TD TD valign=middle height=20 colspan=#evaluate(leftoverindent+1)# !--- Display file names --- a href=""> /TD /TR /TABLE /cfif /cfif /cfoutput !--- DUMP SESSION, CLIENT VARIABLES cfdump var=#session# label=Session variables cfdump var=#client# label=Client variables --- /body [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Weird PC Error - Part II
Oh another suggestion... In the BIOS there is probably a setting that allows you to say whether you will be installing a Plug-and-Play OS on the machine.Try setting this to NO.This means that the M/B and BIOS will get its claws into the IRQ settings etc. rather than letting Windows attempt to sort them out.Apparently it has been known that windows xp makes a bit of a hash of the IRQ sharing. (Just passing on what has been mentioned to me, no evidence to support this statement, but might be worth a try as well) Regards Stephen ColdFusion Developer wrote: It is after the Installation of the devices and right after it asked for the keyboard language, machine name, as well as the Product Key. Reminder.. This is a LEGAL fully purchased copy of Windows XP. -- Original Message -- From: John Munyan [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Mon, 17 Nov 2003 17:24:21 -0800 At what point does it bomb?When I have seen machines just 'freeze' it has been either the memory as someone mentioned or the hard drive, or the drivers associated with the disk subsystem.Is in doing installing components, or is it in gui plug and play detection?If it is in the gui mode detecting hardware it I would think that perhaps there is a hand detecting a piece of hardware it such as the disk controller etc. -Original Message- From: [EMAIL PROTECTED] [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 3:46 PM To: CF-Talk Subject: Weird PC Error - Part II Well I updated the BIOS and began the reformat process. Formatted with NTFS and then loaded Windows XP back onto the system Yet with the same results, the machine still locks up around 25-26 minutes. I can hold the power switch and then when it restarts it will attempt to continue with the installation process but bombs out each time virtually at the same spot. ANy other ideas before I toss the thing out the window??? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Re:HTML e-Newsletter
From an anti-spam perspective, there is no such thing as a purchased opt-in listUsage of such a mail list is a sure route to becoming listed on blacklists. == Stop spam on your domain, use our gateway! For hosting solutions http://www.clickdoug.com Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1 and PHP == If you are not satisfied with my service, my job isn't done! - Original Message - From: Dwayne Cole [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 3:23 AM Subject: Re:HTML e-Newsletter | Thanks for the pointers.I kinda knew what to do from a technical perspective but I wanted to hear from someone about the issues and challenges faced when using cfmail to send html email to opt-in list that is expected to grow to about 8000.I've heard of .aol as well. | | Dwayne, | | Let me point out a few gotchas that hopefully the tutorial will cover. | | 1) Outlook XP and the latesxt versions of Outlook Express block by default any _javascript_ or Active X Controls. That means if you send out any videos, Flash or a snippy _javascript_ most folks can't see it. | | | 2) The latest beta of Outlook blocks HTML email having formating or images from an external source. HTML email requires external images for displaying the images properly as the email is forwared from one person to the next. Marketers use this feature to embed web bugs allowing one to track the number of people who have opened the email message. | | 3) You must use an opt-in list to send out the email. In some US States and contries, you can be legally liable for emails not sent to an opt in list. Even worse, you can also be placed on a Black Hole list if you're using an external server acting as a relay. | | 4) You need to configrue your mail server to ensure outsiders can not relay off of the server you're using to send CFMAIL. CFMAIL does require an open relay to send out email-- on the other hand if you use NAT to make sure only non-routeable IP addresses are relayed by CFMAIL and specifically specify the non-routeable IP address of the Cold Fusion in the mail server, then you can protect yourself from spammers and not get yourself on a black hole list for having an open relay. | | | From a business point of view this has the following reprocussions. | | A) Your subject line must clear, consise and meaningful to the opener | B) You should use plain text without forwarding unless the email generated is from an Intranet (where one can control the user experiance while using the firewall and black hole lists to control spam) | C) If your trying this for an external audiance, you need to purcahse or generate an opt in list, have a privacy policy in place and have a real secure set-up from a hosting point of view. | | | On the other hand why send out a message people can not read because they are protecting themselves from spam, viruses-- and protect yourself from potential legal and network configuration issues. IMHO, HTML email should only be used in an Intranet setting where one can control the message and the client. | | I know that this is a hot button issue among the CF talkers out there -- this has been discussed at length on this forum. However, I have seen the reprocussions of a poor network configuration and HTML email. | | Jeremy | | P.S. I've included how to set up the HTML email below as an FYI | | | | [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Errors when using cfcontent for an attachment
I'm using cfcontent to serve up a file not in the wwwroot folder of my site. I also have a script that emails me every time an error occurs on the site. This is the code used to serve out the file: !--- in downloads.cfm, so when someone visits the page they get the download file dialog --- cfheader name=Content-Type value=application/pdf cfheader name=Content-Disposition value=attachment; filename=#myFile# cfcontent type=application/pdf file=c:\inetpub\downloads\#myFile# This works well except for one thing -- if I cancel the file download, I receive an error email that looks like this: The cause of this output exception was that: java.net.SocketException: Connection reset by peer: socket write error Is there any way around this? I'd like to not get an email everytime someone cancels the download -d [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
cfargument required=no in cfscript???
Hi Folks, Is there any equivalence for the required attribute when the function is written with cfscript? cffunction name=fctFoo cfargument name=sFoo type=string required=no /cffunction cfscript function fctFoo(sFoo){ } /cfscript thx Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: cfargument required=no in cfscript???
You can use the arguments structure for non required arguments function fctFoo(){ var sFoo = defaultValue; if(ArrayLen(arguments) GE 1) sFoo = arguments[1]; } -Original Message- From: BOUDOT Christian [mailto:[EMAIL PROTECTED] Sent: dinsdag 18 november 2003 15:09 To: CF-Talk Subject: cfargument required=no in cfscript??? Hi Folks, Is there any equivalence for the required attribute when the function is written with cfscript? cffunction name=fctFoo cfargument name=sFoo type=string required=no /cffunction cfscript function fctFoo(sFoo){ } /cfscript thx Chris _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: cfargument required=no in cfscript???
You use the arguments array's length to determine how many arguments you have.When writing functions in CF script the arguments have to be in order, first the required attributes, and then the optional ones, so something like this: function checkName(cFirstName){ if(arrayLen(arguments) gt 1){ cLastName = arguments[2] } } This allows you to have an optional argument of cLastName.It might not be exact but it should be pretty close. That what you mean? Timothy Heald Web Portfolio Manager Overseas Security Advisory Council U.S. Department of State 571.345.2319 The opinions expressed here do not necessarily reflect those of the U.S. Department of State or any affiliated organization(s).Nor have these opinions been approved or sanctioned by these organizations. This e-mail is unclassified based on the definitions in E.O. 12958. -Original Message- From: BOUDOT Christian [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 9:10 AM To: CF-Talk Subject: cfargument required=no in cfscript??? Hi Folks, Is there any equivalence for the required attribute when the function is written with cfscript? cffunction name=fctFoo cfargument name=sFoo type=string required=no /cffunction cfscript function fctFoo(sFoo){ } /cfscript thx Chris _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: cfargument required=no in cfscript???
That's it! Thanks :-) -Original Message- From: Heald, Tim [mailto:[EMAIL PROTECTED] Sent: mardi 18 novembre 2003 15:19 To: CF-Talk Subject: RE: cfargument required=no in cfscript??? You use the arguments array's length to determine how many arguments you have.When writing functions in CF script the arguments have to be in order, first the required attributes, and then the optional ones, so something like this: function checkName(cFirstName){ if(arrayLen(arguments) gt 1){ cLastName = arguments[2] } } This allows you to have an optional argument of cLastName.It might not be exact but it should be pretty close. That what you mean? Timothy Heald Web Portfolio Manager Overseas Security Advisory Council U.S. Department of State 571.345.2319 The opinions expressed here do not necessarily reflect those of the U.S. Department of State or any affiliated organization(s).Nor have these opinions been approved or sanctioned by these organizations. This e-mail is unclassified based on the definitions in E.O. 12958. -Original Message- From: BOUDOT Christian [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 9:10 AM To: CF-Talk Subject: cfargument required=no in cfscript??? Hi Folks, Is there any equivalence for the required attribute when the function is written with cfscript? cffunction name=fctFoo cfargument name=sFoo type=string required=no /cffunction cfscript function fctFoo(sFoo){ } /cfscript thx Chris _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
SOT: OO Design
Hi Folks, I'm trying to get my head around OO design for CF and I have a ton of questions, of course. I'll try to keep them limited, as they're sort of off-topic (though not entirely, because whatever I have to design I have to build in CF). Here's my first basic question: When you're designing an object that includes a multiple has-a type relationship, do you typically build the objects such that their is an intermediate collection type object? For example, I'm working on a project management system. It involves tasks. Tasks can have 0 to many consumables associated with them. Do I have one object Task and one object Consumable with the consumable object having both a getOne(consumableID) and a getAll(taskID) method? Or, do I have an intermediate ConsumableList object that takes a taskID and gets all the consumables associated with that task by calling a method in the Consumable object. Does that make sense? Thanks. -Deanna - Deanna Schneider UWEX-Cooperative Extension Interactive Media Developer [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
CF JS Issue
I have a textarea on my form and it accepts users comments. I am using qForms to set the values of my form fields once the page loads which works ok... Except if the text to populate the textarea has characters that need to be escaped. When those characters are encountered the string is broken and a JS error results. Is there a way around this? Thanks, Mike [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF JS Issue
JSStringFormat() -Original Message- From: Tangorre, Michael [mailto:[EMAIL PROTECTED] Sent: dinsdag 18 november 2003 15:26 To: CF-Talk Subject: CF JS Issue I have a textarea on my form and it accepts users comments. I am using qForms to set the values of my form fields once the page loads which works ok... Except if the text to populate the textarea has characters that need to be escaped. When those characters are encountered the string is broken and a JS error results. Is there a way around this? Thanks, Mike _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF JS Issue
Thanks, just found that. -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 9:38 AM To: CF-Talk Subject: RE: CF JS Issue JSStringFormat() -Original Message- From: Tangorre, Michael [mailto:[EMAIL PROTECTED] Sent: dinsdag 18 november 2003 15:26 To: CF-Talk Subject: CF JS Issue I have a textarea on my form and it accepts users comments. I am using qForms to set the values of my form fields once the page loads which works ok... Except if the text to populate the textarea has characters that need to be escaped. When those characters are encountered the string is broken and a JS error results. Is there a way around this? Thanks, Mike _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: SOT: OO Design
So are you thinking of creating three objects: a task object, a consumable object, consumableList object that acts like a associative entity? Dwayne Cole, MS in MIS, MBA Florida AM University Certified Advanced ColdFusion Developer 850-591-0212 It can truly be said that nothing happens until there is vision. But it is equally true that a vision with no underlying sense of purpose, no calling, is just a good idea - all sound and fury, signifying nothing.The Fifth Discipline - Peter Senge -- Original Message -- From: Deanna Schneider [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Tue, 18 Nov 2003 08:28:11 -0600 Hi Folks, I'm trying to get my head around OO design for CF and I have a ton of questions, of course. I'll try to keep them limited, as they're sort of off-topic (though not entirely, because whatever I have to design I have to build in CF). Here's my first basic question: When you're designing an object that includes a multiple has-a type relationship, do you typically build the objects such that their is an intermediate collection type object? For example, I'm working on a project management system. It involves tasks. Tasks can have 0 to many consumables associated with them. Do I have one object Task and one object Consumable with the consumable object having both a getOne(consumableID) and a getAll(taskID) method? Or, do I have an intermediate ConsumableList object that takes a taskID and gets all the consumables associated with that task by calling a method in the Consumable object. Does that make sense? Thanks. -Deanna - Deanna Schneider UWEX-Cooperative Extension Interactive Media Developer [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: OO Design
Deanna, one thing I have found helpful in thinking more in OO style terms with CFMX is the Mach-II framework, which evolved around the OO concepts afforded by CFMX.There is a good insight in this article by Sean Corfield, which analyzes a sample app created to demonstrate Mach-II. http://www.webapper.net/index.cfm?fuseaction=Fuseblog.ShowCommentsArticleID =20030920095757 Hth. Kind Regards - Mike Brunt Webapper Services LLC Web Site http://www.webapper.com Blog http://www.webapper.net Webapper Web Application Specialists -Original Message- From: Deanna Schneider [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 6:28 AM To: CF-Talk Subject: SOT: OO Design Hi Folks, I'm trying to get my head around OO design for CF and I have a ton of questions, of course. I'll try to keep them limited, as they're sort of off-topic (though not entirely, because whatever I have to design I have to build in CF). Here's my first basic question: When you're designing an object that includes a multiple has-a type relationship, do you typically build the objects such that their is an intermediate collection type object? For example, I'm working on a project management system. It involves tasks. Tasks can have 0 to many consumables associated with them. Do I have one object Task and one object Consumable with the consumable object having both a getOne(consumableID) and a getAll(taskID) method? Or, do I have an intermediate ConsumableList object that takes a taskID and gets all the consumables associated with that task by calling a method in the Consumable object. Does that make sense? Thanks. -Deanna - Deanna Schneider UWEX-Cooperative Extension Interactive Media Developer _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: SOT: OO Design
That's what I'm wondering if I should do, yes. Or, if it works better to just have the two objects, with the task object having an array of consumable objects. -d - Original Message - From: Dwayne Cole [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 8:59 AM Subject: Re: SOT: OO Design So are you thinking of creating three objects: a task object, a consumable object, consumableList object that acts like a associative entity? Dwayne Cole, MS in MIS, MBA Florida AM University Certified Advanced ColdFusion Developer 850-591-0212 It can truly be said that nothing happens until there is vision. But it is equally true that a vision with no underlying sense of purpose, no calling, is just a good idea - all sound and fury, signifying nothing. The Fifth Discipline - Peter Senge -- Original Message -- From: Deanna Schneider [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Tue, 18 Nov 2003 08:28:11 -0600 Hi Folks, I'm trying to get my head around OO design for CF and I have a ton of questions, of course. I'll try to keep them limited, as they're sort of off-topic (though not entirely, because whatever I have to design I have to build in CF). Here's my first basic question: When you're designing an object that includes a multiple has-a type relationship, do you typically build the objects such that their is an intermediate collection type object? For example, I'm working on a project management system. It involves tasks. Tasks can have 0 to many consumables associated with them. Do I have one object Task and one object Consumable with the consumable object having both a getOne(consumableID) and a getAll(taskID) method? Or, do I have an intermediate ConsumableList object that takes a taskID and gets all the consumables associated with that task by calling a method in the Consumable object. Does that make sense? Thanks. -Deanna - Deanna Schneider UWEX-Cooperative Extension Interactive Media Developer [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: OO Design
Got Head First Java at the weekend (good recommendation Hal :-) If you haven't got it, get it... it's funny and although I have only been able to flick through it at the moment. It's done a lot more to help me get my head round OO stuff than getting Core Servlets and JavaServer Pages (JSP) Book I tried a year ago (good book, bit above my head tho) -dc -Original Message- From: Mike Brunt [mailto:[EMAIL PROTECTED] Sent: 18 November 2003 15:08 To: CF-Talk Subject: RE: OO Design Deanna, one thing I have found helpful in thinking more in OO style terms with CFMX is the Mach-II framework, which evolved around the OO concepts afforded by CFMX.There is a good insight in this article by Sean Corfield, which analyzes a sample app created to demonstrate Mach-II. http://www.webapper.net/index.cfm?fuseaction=Fuseblog.ShowCommentsArtic leID =20030920095757 Hth. Kind Regards - Mike Brunt Webapper Services LLC Web Site http://www.webapper.com Blog http://www.webapper.net Webapper Web Application Specialists -Original Message- From: Deanna Schneider [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 6:28 AM To: CF-Talk Subject: SOT: OO Design Hi Folks, I'm trying to get my head around OO design for CF and I have a ton of questions, of course. I'll try to keep them limited, as they're sort of off-topic (though not entirely, because whatever I have to design I have to build in CF). Here's my first basic question: When you're designing an object that includes a multiple has-a type relationship, do you typically build the objects such that their is an intermediate collection type object? For example, I'm working on a project management system. It involves tasks. Tasks can have 0 to many consumables associated with them. Do I have one object Task and one object Consumable with the consumable object having both a getOne(consumableID) and a getAll(taskID) method? Or, do I have an intermediate ConsumableList object that takes a taskID and gets all the consumables associated with that task by calling a method in the Consumable object. Does that make sense? Thanks. -Deanna - Deanna Schneider UWEX-Cooperative Extension Interactive Media Developer _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: OO Design
Deanna, I am not sure that there is one answer.It depends on your specific usage. I used a concept of SnapShots to figure out for each of my classes what methods where needed.This helped me separate out how I would like it to work and how it actually would work. I started with a basic description of the business process in a story form, e.g.: Elsa, the OMG representative to Corner Bakery, is trying to get Holiday orders from all 70 stores.She emails Judy, who is in CB's corporate buying and asks for help getting the orders in from the stores.The email lists all of the stores and their outstanding orders and provides links to that store's history.Judy receives the email and forwards it on to all of the stores. Joe is a manager at one of CB's stores.He receives Judy's email and clicks on the link.He signs onto the site and looks at his purchases from the previous year.Overall, his sales are up 10%, so he decides to purchase 10% more cookies.He also decides that he wants to place bi-weekly orders, the same as he did last year.He selects the orders that he wants to copy, then verifies the requested In-Store Date, increases the quantities 10%, and adds the PO Number Then I took each of the objects(Corporate, Managers, sales representative, Purchase/Order History, Orders, etc.)and diagramed the information they would need and what they would do with it.After I had created maybe 50-60% of the projected SnapShots/stories, I started to lump the objects together into classes and this gave me the properties and methods that I needed for each class.In many cases I ended up with both an object Task and consumable list.For example for a Customer, I need to both set and get individual addresses as well as get list of all addresses.After I had 70% of stories for a specific process such as ordering done, I started to design the database and code the CFC's.During coding and the deeper thinking that that caused, I thought of more questions on the story -- would they really do this? For example, this led me to discover that many stores don't have access to email at work...So one of the objects in this story changed from email to telephone. If you have not done SnapShots before, try them.It really helped me design code that would be used versus how I would really prefer the process to work. I've been thinking of creating CFC's to document these and tie them to a requirements/rules list and CFC.As soon as I solve world hunger Andy -Original Message- From: Deanna Schneider [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 8:28 AM To: CF-Talk Subject: SOT: OO Design Hi Folks, I'm trying to get my head around OO design for CF and I have a ton of questions, of course. I'll try to keep them limited, as they're sort of off-topic (though not entirely, because whatever I have to design I have to build in CF). Here's my first basic question: When you're designing an object that includes a multiple has-a type relationship, do you typically build the objects such that their is an intermediate collection type object? For example, I'm working on a project management system. It involves tasks. Tasks can have 0 to many consumables associated with them. Do I have one object Task and one object Consumable with the consumable object having both a getOne(consumableID) and a getAll(taskID) method? Or, do I have an intermediate ConsumableList object that takes a taskID and gets all the consumables associated with that task by calling a method in the Consumable object. Does that make sense? Thanks. -Deanna - Deanna Schneider UWEX-Cooperative Extension Interactive Media Developer [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: SOT: OO Design
First, I wouldn't use an array.If you build a big array (say, 1024) you waste a lot of space if most tasks have 3 consumables.If you build it too small, it's too small.:-)Linked list is the way to go here. As to how to break up your objects If you use ConsumableLists in places other than as part of a task, it should (obviously) be a separate object.Conversely, if a Comsumable is never loose, but is always part of a List, then maybe you don't need it to be a separate object.And if Consumables are always part of Lists are always part of Tasks, then you don't *have* to break them up due to logical devisions.Of course, I always use this to judge when I *should* break them, not when I *shouldn't* (if that makes sense). Next, what's the most flexible?Obviously (well, I think it's obvious) 3 objects is the most flexible, since you can pull out subobject separately.You could, for example, copy ConsumableLists from task to task. Finally, what's the easiest to code?Probably 3 objects, if they're designed well. Hmm.I guess I decided you should make 3 objects.Heh.I should be a manager.. --benD Deanna Schneider wrote: That's what I'm wondering if I should do, yes. Or, if it works better to just have the two objects, with the task object having an array of consumable objects. -d - Original Message - From: Dwayne Cole [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 8:59 AM Subject: Re: SOT: OO Design So are you thinking of creating three objects: a task object, a consumable object, consumableList object that acts like a associative entity? Dwayne Cole, MS in MIS, MBA Florida AM University Certified Advanced ColdFusion Developer 850-591-0212 It can truly be said that nothing happens until there is vision. But it is equally true that a vision with no underlying sense of purpose, no calling, is just a good idea - all sound and fury, signifying nothing. The Fifth Discipline - Peter Senge -- Original Message -- From: Deanna Schneider [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Tue, 18 Nov 2003 08:28:11 -0600 Hi Folks, I'm trying to get my head around OO design for CF and I have a ton of questions, of course. I'll try to keep them limited, as they're sort of off-topic (though not entirely, because whatever I have to design I have to build in CF). Here's my first basic question: When you're designing an object that includes a multiple has-a type relationship, do you typically build the objects such that their is an intermediate collection type object? For example, I'm working on a project management system. It involves tasks. Tasks can have 0 to many consumables associated with them. Do I have one object Task and one object Consumable with the consumable object having both a getOne(consumableID) and a getAll(taskID) method? Or, do I have an intermediate ConsumableList object that takes a taskID and gets all the consumables associated with that task by calling a method in the Consumable object. Does that make sense? Thanks. -Deanna - Deanna Schneider UWEX-Cooperative Extension Interactive Media Developer [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: SOT: OO Design
Aren't both part of the same business object, eg Task?For this task, you probably need to perform a number of actions or methods, such as Set's and Gets for: -Task Name -Description -Due Date . You also need to be able to manage resources needed to complete a task.The 2 methods that you discussed are integral to performing this task and therefore below to the same object? Andy -Original Message- From: Deanna Schneider [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 9:07 AM To: CF-Talk Subject: Re: SOT: OO Design That's what I'm wondering if I should do, yes. Or, if it works better to just have the two objects, with the task object having an array of consumable objects. -d - Original Message - From: Dwayne Cole [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 8:59 AM Subject: Re: SOT: OO Design So are you thinking of creating three objects: a task object, a consumable object, consumableList object that acts like a associative entity? Dwayne Cole, MS in MIS, MBA Florida AM University Certified Advanced ColdFusion Developer 850-591-0212 It can truly be said that nothing happens until there is vision. But it is equally true that a vision with no underlying sense of purpose, no calling, is just a good idea - all sound and fury, signifying nothing. The Fifth Discipline - Peter Senge -- Original Message -- From: Deanna Schneider [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Tue, 18 Nov 2003 08:28:11 -0600 Hi Folks, I'm trying to get my head around OO design for CF and I have a ton of questions, of course. I'll try to keep them limited, as they're sort of off-topic (though not entirely, because whatever I have to design I have to build in CF). Here's my first basic question: When you're designing an object that includes a multiple has-a type relationship, do you typically build the objects such that their is an intermediate collection type object? For example, I'm working on a project management system. It involves tasks. Tasks can have 0 to many consumables associated with them. Do I have one object Task and one object Consumable with the consumable object having both a getOne(consumableID) and a getAll(taskID) method? Or, do I have an intermediate ConsumableList object that takes a taskID and gets all the consumables associated with that task by calling a method in the Consumable object. Does that make sense? Thanks. -Deanna - Deanna Schneider UWEX-Cooperative Extension Interactive Media Developer [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: OO Design
A native data type like a ColdFusion structure or array will be much faster than a component. Additionally, in writing your own component, you will introduce complexity and, as a result, more opportunity for bugs. So, in general, I'd say use a native data type unless you specifically need a feature that the native data type doesn't support. For instance, if you needed to reference objects using a key, but the order is also important, you might want to create your own data type as ColdFusion structures return keys unordered. However, if you did that, you'd be limiting yourself to the methods and properties you write yourself. In other words, you can't just run all of the built in structure and array functions on your component (though you could potentially use them from within your component). Ben Rogers http://www.c4.net v.508.240.0051 f.508.240.0057 -Original Message- From: Deanna Schneider [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 9:28 AM To: CF-Talk Subject: SOT: OO Design Hi Folks, I'm trying to get my head around OO design for CF and I have a ton of questions, of course. I'll try to keep them limited, as they're sort of off-topic (though not entirely, because whatever I have to design I have to build in CF). Here's my first basic question: When you're designing an object that includes a multiple has-a type relationship, do you typically build the objects such that their is an intermediate collection type object? For example, I'm working on a project management system. It involves tasks. Tasks can have 0 to many consumables associated with them. Do I have one object Task and one object Consumable with the consumable object having both a getOne(consumableID) and a getAll(taskID) method? Or, do I have an intermediate ConsumableList object that takes a taskID and gets all the consumables associated with that task by calling a method in the Consumable object. Does that make sense? Thanks. -Deanna - Deanna Schneider UWEX-Cooperative Extension Interactive Media Developer _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
itext
Just starting using CF to generate pdf's using itext.I have it so that it's hitting a CF page that displays nested tables(3 columns with a user defined number of tables(through includes) in each column), but itext doesn't seem to be able to parse nested tables.I tried real quick to play with div tags and CSS layouts, but it didn't display them right. Anyone use itext with fairly complex layouts like this? thanks in advance, seth [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: OO Design
Yah, I'd read that already. The MachII stuff is interesting, but it doesn't really answer my design questions. In fact, it generally makes more questions for me. But, maybe that's just how my head works. ;) -Deanna - Original Message - From: Mike Brunt [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 9:07 AM Subject: RE: OO Design Deanna, one thing I have found helpful in thinking more in OO style terms with CFMX is the Mach-II framework, which evolved around the OO concepts afforded by CFMX.There is a good insight in this article by Sean Corfield, which analyzes a sample app created to demonstrate Mach-II. http://www.webapper.net/index.cfm?fuseaction=Fuseblog.ShowCommentsArticleID =20030920095757 Hth. Kind Regards - Mike Brunt Webapper Services LLC Web Site http://www.webapper.com Blog http://www.webapper.net Webapper Web Application Specialists -Original Message- From: Deanna Schneider [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 6:28 AM To: CF-Talk Subject: SOT: OO Design Hi Folks, I'm trying to get my head around OO design for CF and I have a ton of questions, of course. I'll try to keep them limited, as they're sort of off-topic (though not entirely, because whatever I have to design I have to build in CF). Here's my first basic question: When you're designing an object that includes a multiple has-a type relationship, do you typically build the objects such that their is an intermediate collection type object? For example, I'm working on a project management system. It involves tasks. Tasks can have 0 to many consumables associated with them. Do I have one object Task and one object Consumable with the consumable object having both a getOne(consumableID) and a getAll(taskID) method? Or, do I have an intermediate ConsumableList object that takes a taskID and gets all the consumables associated with that task by calling a method in the Consumable object. Does that make sense? Thanks. -Deanna - Deanna Schneider UWEX-Cooperative Extension Interactive Media Developer _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Pollster - Intermittent Error
Hi, More often than not, I am receiving an error on the Flash Poll provided by Macromedia in one of their more recent DevNet Subscription releases. The error is in a CFC that has an SQL statement that aggregates the responses and dumps them into the poll. The line the logs point to is the one occupied by the WHERE clause in that SQL Statement (see below). It seems to only have begun recently, so perhaps there is a timeout or other mechanism that factors into pulling in a couple of thousand votes into the poll. After all, the datasource is MS Access. I will try to move to SQL Server - perhaps that is the problem. Any ideas? The generic error in the Flash Pollster states We are sorry, an error has occurred and the poll will not be able to continue. The error log is posted below. Thanks in advance for any assistance. You can see the poll yourself at www.ioc.state.il.us Sincerely, Andrew Here's the query that is throwing the error: !--- Gets a Poll's aggregated responses. @param pollId The ID of the Poll you want to retrieve responses for. --- cffunction name=getAggregatedResponses returnType=query output=no hint=Gets a Poll's aggregated responses. cfargument name=pollId type=string required=yes/ cfset var q = / cfquery name=q datasource=#application.dataSource# SELECT Options.optionText as label, Options.sortOrder, count(responses.responseId) as data FROM Responses RIGHT JOIN Options ON Responses.optionId = Options.optionId WHERE Options.optionId in (SELECT Options.optionId FROM Options WHERE pollId = cfqueryparam value=#arguments.pollId# maxLength=#sqlLengths.Polls_pollId#/) GROUP BY Options.sortOrder, Options.optionText /cfquery cfreturn q/ /cffunction HERE IS THE ERROR MESSAGE IN THE LOG: [Flash Remoting MX]-coldfusion.tagext.sql.QueryTag$DatabaseQueryException: Error Executing Database Query. at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:495) at cfPolls2ecfc416965643$funcGETAGGREGATEDRESPONSES.runFunction(C:\web app\prod\html\pollster\components\entities\Polls.cfc:235) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:338) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:44) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:286) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.j ava:250) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java: 53) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:203) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:165) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:192) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:130) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1622) at cfFlashHandler2ecfc1964209537$funcGETPOLLRESULTS.runFunction(C:\web app\prod\html\pollster\components\handlers\FlashHandler.cfc:84) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:338) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:44) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:286) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.j ava:250) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java: 53) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:203) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:165) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:1768) at cfFlashHandler2ecfc1964209537$funcGETPOLLINFO.runFunction(C:\web app\prod\html\pollster\components\handlers\FlashHandler.cfc:23) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:338) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:44) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:286) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.j ava:250) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java: 53) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:203) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:359) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:196) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:139) at coldfusion.filter.FlashComponentFilter.invoke(FlashComponentFilter.java: 48) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:107) at coldfusion.filter.FlashFilter.invoke(FlashFilter.java:75) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersist enceFilter.java:28) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:43) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.flash.FlashProxy.invokeComponent(FlashProxy.java:139) at flashgateway.adapter.coldfusion.CFCAdapter.invokeFunction(CFCAdapter.jav a:95) at flashgateway.filter.AdapterFilter.invoke(AdapterFilter.java:266) at flashgateway.filter.SecurityFilter.invoke(SecurityFilter.java:85) at flashgateway.filter.LicenseFilter.invoke(LicenseFilter.java:58) at
posting XML to CF - escape characters?
I'm generating an XML document in Flash and using xml.send() to pass it to ColdFusion to be saved to the server's file system. In flash I have a form that the user fills out, and that information is used to populate the XML object. When I trace the finished XML object in Flash it shows that apostrophes are being escaped properly with apos;So if a user enters into one of the fields: Adam's Input Text - it traces as Adamapos;s Input Text (I hope the escaped characters stay escaped in this email). In coldfusion I use GetHttpRequestData().content to access the XML in the POST data. This works fine if all of the attributes in the XML have only one escaped apostrophe in them. It breaks when there are two or more apostrophes though. So if I had Adamapos;s and Jenapos;s Input Text as one of the attributes in an XML element, ColdFusion returns this error - this is just from trying to output GetHttpRequestData().content with nothing else on the page: java.lang.IllegalArgumentException at coldfusion.filter.FormScope.parseQueryString(FormScope.java:267) at coldfusion.filter.FormScope.parsePostData(FormScope.java:239) at coldfusion.filter.FormScope.fillForm(FormScope.java:190) at coldfusion.filter.FusionContext.SymTab_initForRequest(FusionContext.java:345 ) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.CfmServlet.service(CfmServlet.java:105) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:252) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527) at jrun.servlet.http.WebService.invokeRunnable(WebService.java:168) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java: 348) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451 ) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:29 4) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) Does anyone know what I should look for? I'm having a hard time telling if this is a flash or a CF thing. Adam. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: HTML e-Newsletter
Jeremy Brodie wrote: CFMAIL does require an open relay to send out email Just to clarify, CFMAIL doesn't need an open relay.On pre-MX systems, The CF server's IP needs to be acceptable to an otherwise locked down mail server.This can and commonly is easily done with Imail.If you're using a mail server that doesn't allow for this sort of thing then yes, you'd need an open relay -- or a mail server with a better feature set. Quite awhile back there was a thread on a way to do SMTP AUTH with CFMAIL, but after a fairly involved discussion it was clear the method was far from universally workable. Lastly, CFMAIL in MX6.1 now supports SMTP AUTH directly via the new username and password parms. Matt Robertson [EMAIL PROTECTED] MSB Designs, Inc.http://mysecretbase.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
java in CFMX question
I am doing this now before any time they try to open the file: cfobject type=JAVA name=jFile class=java.io.File action="" cfscript newAttribute = jFile.init('filenameher'); newAttribute.setReadOnly(); /cfscript ...which seems to be working well. The only thing is, ther are certain times I need to make it writeable too... when researcfing the FILE class at http://java.sun.com/j2se/1.4.2/docs/api/index.html I noticed that they have setReadOnly(); and but no way to set it to writeable... it has a function to check if it is currently wriateable (canWrite();) but nothing else I can see... any thoughts on this? tia, k [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Pollster - Intermittent Error
Just a follow up - I migrated my MS Access database to SQL Server, and am still getting the exact same issue. Also, I removed the poll from the site until this problem could be resolved, so the referring url below is useless. However, you can still see the poll at www.ioc.state.il.us/polltest2.cfm TIA. Sincerely, Andrew Webmaster Illinois Comptroller's Office www.IllinoisComptroller.com -Original Message- From: Andrew Peterson [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 10:18 AM To: CF-Talk Subject: Pollster - Intermittent Error Hi, More often than not, I am receiving an error on the Flash Poll provided by Macromedia in one of their more recent DevNet Subscription releases. The error is in a CFC that has an SQL statement that aggregates the responses and dumps them into the poll. The line the logs point to is the one occupied by the WHERE clause in that SQL Statement (see below). It seems to only have begun recently, so perhaps there is a timeout or other mechanism that factors into pulling in a couple of thousand votes into the poll. After all, the datasource is MS Access. I will try to move to SQL Server - perhaps that is the problem. Any ideas? The generic error in the Flash Pollster states We are sorry, an error has occurred and the poll will not be able to continue. The error log is posted below. Thanks in advance for any assistance. You can see the poll yourself at www.ioc.state.il.us Sincerely, Andrew Here's the query that is throwing the error: !--- Gets a Poll's aggregated responses. @param pollId The ID of the Poll you want to retrieve responses for. --- cffunction name=getAggregatedResponses returnType=query output=no hint=Gets a Poll's aggregated responses. cfargument name=pollId type=string required=yes/ cfset var q = / cfquery name=q datasource=#application.dataSource# SELECT Options.optionText as label, Options.sortOrder, count(responses.responseId) as data FROM Responses RIGHT JOIN Options ON Responses.optionId = Options.optionId WHERE Options.optionId in (SELECT Options.optionId FROM Options WHERE pollId = cfqueryparam value=#arguments.pollId# maxLength=#sqlLengths.Polls_pollId#/) GROUP BY Options.sortOrder, Options.optionText /cfquery cfreturn q/ /cffunction HERE IS THE ERROR MESSAGE IN THE LOG: [Flash Remoting MX]-coldfusion.tagext.sql.QueryTag$DatabaseQueryException: Error Executing Database Query. at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:495) at cfPolls2ecfc416965643$funcGETAGGREGATEDRESPONSES.runFunction(C:\web app\prod\html\pollster\components\entities\Polls.cfc:235) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:338) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:44) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:286) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.j ava:250) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java: 53) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:203) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:165) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:192) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:130) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1622) at cfFlashHandler2ecfc1964209537$funcGETPOLLRESULTS.runFunction(C:\web app\prod\html\pollster\components\handlers\FlashHandler.cfc:84) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:338) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:44) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:286) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.j ava:250) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java: 53) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:203) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:165) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:1768) at cfFlashHandler2ecfc1964209537$funcGETPOLLINFO.runFunction(C:\web app\prod\html\pollster\components\handlers\FlashHandler.cfc:23) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:338) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:44) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:286) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.j ava:250) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java: 53) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:203) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:359) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:196) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:139) at coldfusion.filter.FlashComponentFilter.invoke(FlashComponentFilter.java: 48) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:107) at coldfusion.filter.FlashFilter.invoke(FlashFilter.java:75) at
RE: Pollster - Intermittent Error
Another update - I just love when my posts turn into my own personal error log :-). For anyone keeping track, I reduced the number of records in the pollster application down to 10 from about 1700, and I am still getting the error, so the problem isn't volume. I'll keep looking, and I won't post again unless someone else posts first. Sincerely, Andrew -Original Message- From: Andrew Peterson [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 11:03 AM To: CF-Talk Subject: RE: Pollster - Intermittent Error Just a follow up - I migrated my MS Access database to SQL Server, and am still getting the exact same issue. Also, I removed the poll from the site until this problem could be resolved, so the referring url below is useless. However, you can still see the poll at www.ioc.state.il.us/polltest2.cfm TIA. Sincerely, Andrew Webmaster Illinois Comptroller's Office www.IllinoisComptroller.com -Original Message- From: Andrew Peterson [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 10:18 AM To: CF-Talk Subject: Pollster - Intermittent Error Hi, More often than not, I am receiving an error on the Flash Poll provided by Macromedia in one of their more recent DevNet Subscription releases. The error is in a CFC that has an SQL statement that aggregates the responses and dumps them into the poll. The line the logs point to is the one occupied by the WHERE clause in that SQL Statement (see below). It seems to only have begun recently, so perhaps there is a timeout or other mechanism that factors into pulling in a couple of thousand votes into the poll. After all, the datasource is MS Access. I will try to move to SQL Server - perhaps that is the problem. Any ideas? The generic error in the Flash Pollster states We are sorry, an error has occurred and the poll will not be able to continue. The error log is posted below. Thanks in advance for any assistance. You can see the poll yourself at www.ioc.state.il.us Sincerely, Andrew Here's the query that is throwing the error: !--- Gets a Poll's aggregated responses. @param pollId The ID of the Poll you want to retrieve responses for. --- cffunction name=getAggregatedResponses returnType=query output=no hint=Gets a Poll's aggregated responses. cfargument name=pollId type=string required=yes/ cfset var q = / cfquery name=q datasource=#application.dataSource# SELECT Options.optionText as label, Options.sortOrder, count(responses.responseId) as data FROM Responses RIGHT JOIN Options ON Responses.optionId = Options.optionId WHERE Options.optionId in (SELECT Options.optionId FROM Options WHERE pollId = cfqueryparam value=#arguments.pollId# maxLength=#sqlLengths.Polls_pollId#/) GROUP BY Options.sortOrder, Options.optionText /cfquery cfreturn q/ /cffunction HERE IS THE ERROR MESSAGE IN THE LOG: [Flash Remoting MX]-coldfusion.tagext.sql.QueryTag$DatabaseQueryException: Error Executing Database Query. at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:495) at cfPolls2ecfc416965643$funcGETAGGREGATEDRESPONSES.runFunction(C:\web app\prod\html\pollster\components\entities\Polls.cfc:235) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:338) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:44) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:286) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.j ava:250) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java: 53) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:203) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:165) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:192) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:130) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1622) at cfFlashHandler2ecfc1964209537$funcGETPOLLRESULTS.runFunction(C:\web app\prod\html\pollster\components\handlers\FlashHandler.cfc:84) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:338) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:44) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:286) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.j ava:250) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java: 53) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:203) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:165) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:1768) at cfFlashHandler2ecfc1964209537$funcGETPOLLINFO.runFunction(C:\web app\prod\html\pollster\components\handlers\FlashHandler.cfc:23) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:338) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:44) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:286) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.j ava:250) at
Re:HTML e-Newsletter
Matt, Could you point me to the SMTP AUTH discussion? I'd like to see how others approach using CFMAIL in this way. Matt also wrote: The CF server's IP needs to be acceptable to an otherwise locked down mail server. You're still allowing relaying in this case from a single (preferably) non-routeable IP address. The correlary to this is if one uses CFMAIL then best practices dictate using NAT as well. I'mI reading into your comment correctly? Thanks Jeremy Brodie Intelix an Edgewater Technology Solutions Company web: http://www.edgewater.com phone:(703) 815-2500 nasdaq symbol: EDGE Jeremy Brodie wrote: CFMAIL does require an open relay to send out email Just to clarify, CFMAIL doesn't need an open relay.On pre-MX systems, The CF server's IP needs to be acceptable to an otherwise locked down mail server.This can and commonly is easily done with Imail.If you're using a mail server that doesn't allow for this sort of thing then yes, you'd need an open relay -- or a mail server with a better feature set. Quite awhile back there was a thread on a way to do SMTP AUTH with CFMAIL, but after a fairly involved discussion it was clear the method was far from universally workable. Lastly, CFMAIL in MX6.1 now supports SMTP AUTH directly via the new username and password parms. Matt Robertson [EMAIL PROTECTED] MSB Designs, Inc.http://mysecretbase.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: HTML e-Newsletter
CFMAIL does require an open relay to send out email Just to clarify, CFMAIL doesn't need an open relay You're still allowing relaying in this case from a single (preferably) non-routeable IP address. Correct, but its not an *open* relay.:-) Could you point me to the SMTP AUTH discussion? Here's what looks to be the Readers Digest version: http://www.houseoffusion.com/cf_lists/cache.cfm/4/10/10052.htm I searched the archives for 'smtp auth' and can't find the original and much more involved thread.The method the author was pushing is what Jochem is mentioning in his post.I've only heard one poster actually claim to have done it, and as you'll see the method has obvious weaknesses. Cheers, Matt Robertson [EMAIL PROTECTED] MSB Designs, Inc.http://mysecretbase.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Using cfhttp to display pdf file
I'm trying to retrieve a pdf file that is from a virtual directory on the webserver using cfhttp... can anybody tell me what I'm doing wrong?All I'm getting back is something that starts out like this: %PDF-1.2 %£ 6 0 obj /Linearized 1 /O 8 /H [ 997 192 ] /L 11898 /E 9167 /N 2 /T 11661 endobj xref 6 30 16 0 n 000944 0 n 001189 0 n 001394 0 n 001552 0 n 001732 0 n 002074 0 n 002253 0 n 002274 0 n 003107 0 n 003295 here is my code: cfhttp url=""> il_200310.pdf https://inview.wng.com/investor/resource/2010/AgingDetail/2010AgingDetail_2 00310.pdf method=GET resolveurl=YES /cfhttp cfcontent type=application/pdf cfoutput #cfhttp.fileContent# /cfoutput Thanks, Tim [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: SOT: OO Design
If you use 3 objects you might run into a conceptual trap.You will begin designing objects as if they were tables and that can be problem.I don't know what they are, but I do know that there are conflicts with OO and Relational Theory.THere has be alot written about incompatiblity between the two methodologies.So be careful. Dwayne Cole, MS in MIS, MBA Florida AM University Certified Advanced ColdFusion Developer 850-591-0212 It can truly be said that nothing happens until there is vision. But it is equally true that a vision with no underlying sense of purpose, no calling, is just a good idea - all sound and fury, signifying nothing.The Fifth Discipline - Peter Senge -- Original Message -- From: Ben Doom [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Tue, 18 Nov 2003 10:36:18 -0500 First, I wouldn't use an array.If you build a big array (say, 1024) you waste a lot of space if most tasks have 3 consumables.If you build it too small, it's too small.:-)Linked list is the way to go here. As to how to break up your objects If you use ConsumableLists in places other than as part of a task, it should (obviously) be a separate object.Conversely, if a Comsumable is never loose, but is always part of a List, then maybe you don't need it to be a separate object.And if Consumables are always part of Lists are always part of Tasks, then you don't *have* to break them up due to logical devisions.Of course, I always use this to judge when I *should* break them, not when I *shouldn't* (if that makes sense). Next, what's the most flexible?Obviously (well, I think it's obvious) 3 objects is the most flexible, since you can pull out subobject separately.You could, for example, copy ConsumableLists from task to task. Finally, what's the easiest to code?Probably 3 objects, if they're designed well. Hmm.I guess I decided you should make 3 objects.Heh.I should be a manager.. --benD Deanna Schneider wrote: That's what I'm wondering if I should do, yes. Or, if it works better to just have the two objects, with the task object having an array of consumable objects. -d - Original Message - From: Dwayne Cole [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 8:59 AM Subject: Re: SOT: OO Design So are you thinking of creating three objects: a task object, a consumable object, consumableList object that acts like a associative entity? Dwayne Cole, MS in MIS, MBA Florida AM University Certified Advanced ColdFusion Developer 850-591-0212 It can truly be said that nothing happens until there is vision. But it is equally true that a vision with no underlying sense of purpose, no calling, is just a good idea - all sound and fury, signifying nothing. The Fifth Discipline - Peter Senge -- Original Message -- From: Deanna Schneider [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Tue, 18 Nov 2003 08:28:11 -0600 Hi Folks, I'm trying to get my head around OO design for CF and I have a ton of questions, of course. I'll try to keep them limited, as they're sort of off-topic (though not entirely, because whatever I have to design I have to build in CF). Here's my first basic question: When you're designing an object that includes a multiple has-a type relationship, do you typically build the objects such that their is an intermediate collection type object? For example, I'm working on a project management system. It involves tasks. Tasks can have 0 to many consumables associated with them. Do I have one object Task and one object Consumable with the consumable object having both a getOne(consumableID) and a getAll(taskID) method? Or, do I have an intermediate ConsumableList object that takes a taskID and gets all the consumables associated with that task by calling a method in the Consumable object. Does that make sense? Thanks. -Deanna - Deanna Schneider UWEX-Cooperative Extension Interactive Media Developer [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Creating treeview structure using cfftp?
Hi, Is it possible to create a treeview structure using cfftp similar to the following and by clicking on the directory will drilldown? + dir1 + dir2 + dir3 + dir4 Click on dir2 + dir2 + subdir1 + subdir2 file1 file1 file1 I've done something similar using cfdirectory and cfloop but I'm stuck on how to achive this using cfftp. Pleasesomeone help George Bush! [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: java in CFMX question
At a guess, have a look at the Permission class, sounds like it might be of some use. Ade -Original Message- From: Kyle McNamara [mailto:[EMAIL PROTECTED] Sent: 18 November 2003 16:03 To: CF-Talk Subject: java in CFMX question I am doing this now before any time they try to open the file: cfobject type=JAVA name=jFile class=java.io.File action="" cfscript newAttribute = jFile.init('filenameher'); newAttribute.setReadOnly(); /cfscript ...which seems to be working well. The only thing is, ther are certain times I need to make it writeable too... when researcfing the FILE class at http://java.sun.com/j2se/1.4.2/docs/api/index.html I noticed that they have setReadOnly(); and but no way to set it to writeable... it has a function to check if it is currently wriateable (canWrite();) but nothing else I can see... any thoughts on this? tia, k _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: SOT: OO Design
I'm not sure how 3 objects makes this any more likely than 2 objects. Am I missing something? --Ben Doom Dwayne Cole wrote: If you use 3 objects you might run into a conceptual trap.You will begin designing objects as if they were tables and that can be problem.I don't know what they are, but I do know that there are conflicts with OO and Relational Theory.THere has be alot written about incompatiblity between the two methodologies.So be careful. Dwayne Cole, MS in MIS, MBA Florida AM University Certified Advanced ColdFusion Developer 850-591-0212 It can truly be said that nothing happens until there is vision. But it is equally true that a vision with no underlying sense of purpose, no calling, is just a good idea - all sound and fury, signifying nothing.The Fifth Discipline - Peter Senge -- Original Message -- From: Ben Doom [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Tue, 18 Nov 2003 10:36:18 -0500 First, I wouldn't use an array.If you build a big array (say, 1024) you waste a lot of space if most tasks have 3 consumables.If you build it too small, it's too small.:-)Linked list is the way to go here. As to how to break up your objects If you use ConsumableLists in places other than as part of a task, it should (obviously) be a separate object.Conversely, if a Comsumable is never loose, but is always part of a List, then maybe you don't need it to be a separate object.And if Consumables are always part of Lists are always part of Tasks, then you don't *have* to break them up due to logical devisions.Of course, I always use this to judge when I *should* break them, not when I *shouldn't* (if that makes sense). Next, what's the most flexible?Obviously (well, I think it's obvious) 3 objects is the most flexible, since you can pull out subobject separately.You could, for example, copy ConsumableLists from task to task. Finally, what's the easiest to code?Probably 3 objects, if they're designed well. Hmm.I guess I decided you should make 3 objects.Heh.I should be a manager.. --benD Deanna Schneider wrote: That's what I'm wondering if I should do, yes. Or, if it works better to just have the two objects, with the task object having an array of consumable objects. -d - Original Message - From: Dwayne Cole [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 8:59 AM Subject: Re: SOT: OO Design So are you thinking of creating three objects: a task object, a consumable object, consumableList object that acts like a associative entity? Dwayne Cole, MS in MIS, MBA Florida AM University Certified Advanced ColdFusion Developer 850-591-0212 It can truly be said that nothing happens until there is vision. But it is equally true that a vision with no underlying sense of purpose, no calling, is just a good idea - all sound and fury, signifying nothing. The Fifth Discipline - Peter Senge -- Original Message -- From: Deanna Schneider [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Tue, 18 Nov 2003 08:28:11 -0600 Hi Folks, I'm trying to get my head around OO design for CF and I have a ton of questions, of course. I'll try to keep them limited, as they're sort of off-topic (though not entirely, because whatever I have to design I have to build in CF). Here's my first basic question: When you're designing an object that includes a multiple has-a type relationship, do you typically build the objects such that their is an intermediate collection type object? For example, I'm working on a project management system. It involves tasks. Tasks can have 0 to many consumables associated with them. Do I have one object Task and one object Consumable with the consumable object having both a getOne(consumableID) and a getAll(taskID) method? Or, do I have an intermediate ConsumableList object that takes a taskID and gets all the consumables associated with that task by calling a method in the Consumable object. Does that make sense? Thanks. -Deanna - Deanna Schneider UWEX-Cooperative Extension Interactive Media Developer [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
CFMX6.1 MS Access Driver - plain vs Unicode
I moved an application from CF5 to MX 6.1 and I wanted to convert the existing MS access 2000 db from the std driver to the new access Unicode driver (for current and future compatibility). When I place the UTF-8 tags in where everyone suggests (in the application.cfm) and the cfprocessingdirective tag on each page, the output from the MS access Unicode driver is rendered correctly (without square boxes or other rubbish). Here's the problem though: I found that when using the Unicode driver, some of my existing cfquery statements fail. In other words, the tables in the db all have a primary key set to an auto-incrementing long integer (so there's no duplicates). Now, with the Unicode driver, errors are thrown from the queries stating that the value is undefined (in all cases referencing the primary key numeric value). So a statement in a query WHERE memberID - #URL.memberID# throws an error. If I go to the CFAdmin datasources, and change the access driver back to the plain one (without Unicode support), the problem goes away, and the cfquery statements again execute successfully. I've noticed that the error message seems to get thrown when there are numeric id's of three or more characters in length, for example 123. Characters in the single or double digits don't seem to throw errors, even when using the Unicode driver.Too weird. HELP! Thanks, Mark [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Inserting rows into a 2d array
Thanks Ian, - Original Message - From: Ian Skinner [EMAIL PROTECTED] Sent: Monday, November 17, 2003 11:06 PM Subject: Re: Inserting rows into a 2d array What took me a little to get my head around, when I first learned Cold Fusion Arrays, is that, when you have a two dimension Array, it does not have to be a grid or table.It is more proper to visualize it as a one dimension array, that each element contains individual one dimension arrays. Thus you can have different size arrays at each element. Yes, understanding that each element contains an individual one dimension array was the ah ha moment for me. Was looking for an example to get it through my thick head... ...don't bother creating a blank placeholder array. Just put the ArrayNew(1) function as the third parameter of the ArrayInsertAt function.This creates a blank new array at the new position.Then, if you later decide you need to put data here, you can just use simple assignment. I need the three elements in the new array or logic that uses the new array will choke when it hits a non-existence element. At most there are any about 20 inserts on the largest record set processed so I don't it makes much difference to the speed. ...just as a last thought.Your method requires the code to loop through all the data three times. Once to transfer the data from the query to the array, once to process blank rows into the array, and a third time to display it.I would be a bit leery for something like this on a high traffic page with a large data set. Efficiency is now the challenge. Was suspicious of this and testing confirmed that record sets of 100 or more were noticeably slower even on fast development server. Converting to a CFscript helped. Tickcount is still about 70 ms with record set of 500. Any suggestions to help speed it up? -- cfscript My2DArray = ArrayNew(2); row = 1; while (row LTE query.RecordCount) { My2DArray[row][1] = query.city_name[row]; My2DArray[row][2] = query.lcid[row]; My2DArray[row][3] = query.listingcount[row]; row = row + 1; } firstLetter = A; countVar = 1; // if (ArrayLen(My2DArray) GT 20) while (countVar LTE (ArrayLen(My2DArray))) if (Left(My2DArray[countVar][1],1) NEQ firstLetter) { firstLetter = left(My2DArray[countVar][1],1); NewElement = ArrayNew(1); NewElement[1] = ; NewElement[2] = ; NewElement[3] = ; InsertSuccess = ArrayInsertAt(My2DArray, countVar, NewElement); countVar = countVar + 1; } else {countVar = countVar + 1;} /cfscript [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: SOT: OO Design
I'm not sure how 3 objects makes this any more likely than 2 objects. I think Dwayne is referring to the fact that, once you've gone beyond having one table or object class to model each real-world thing, the criteria you apply in each method for discovering your other artefacts are quite different. A good relational design is (roughly) that contains one entity for each real-world thing, *plus* one entity in every place where an intersection entity is required to avoid many-to-many relationships. You would never dream (normally) of having an entity (hence table) to model a collection of items, as distinct from a single item. In relational design, you normally try to avoid creating design artefacts that are only there to make processing easier (and anyway, it wouldn't). The idea is to reflect the inherent structure of the data - which is why well-normalised relational designs support a variety of processing tasks. So presumably Deanna would have a Task table and a Consumable table. Nothing else. In OO design, the idea of modelling real-world objects doesn't take you very far, once you've got your basic objects. (In an OO design you wouldn't normally model intersection entities.) Clearly Deanna wants a Task object, and probably a Consumable one too. But beyond that, it's purely a question of using efficient/elegant design patterns. My answer to the original question When you're designing an object that includes a multiple has-a type relationship, do you typically build the objects such that their is an intermediate collection type object? would be, I would normally define the parent object to contain a collection of the child objects. But I wouldn't design a special object to model that collection, I'd just use a built-in class. But to be honest, if I was using CF, OO design methodology would not be at the forefront of my mind. Nick [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: SOT: OO Design
But to be honest, if I was using CF, OO design methodology would not be at the forefront of my mind. Okay, so I was following along, but then you throw this out there. Huh? I thought that we're all supposed to start thinking OO to fully leverage CFC's. Am I wrong here? -Deanna, procedural and database girl, trying to branch out [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Inserting rows into a 2d array
(sorry sent last message before it was finished) Thanks Ian, What took me a little to get my head around, when I first learned Cold Fusion Arrays, is that, when you have a two dimension Array, it does not have to be a grid or table.It is more proper to visualize it as a one dimension array, that each element contains individual one dimension arrays. Thus you can have different size arrays at each element. Yes, understanding that each element contains an individual one dimension array was the ah ha moment for me. Was looking for an example to get it through my thick head... ...don't bother creating a blank placeholder array. Just put the ArrayNew(1) function as the third parameter of the ArrayInsertAt function.This creates a blank new array at the new position.Then, if you later decide you need to put data here, you can just use simple assignment. I need the three elements in the new array or logic that uses the new array will choke when it hits a non-existence element. At most there are any about 20 inserts on the largest record set processed so I don't it makes much difference to the speed. ...just as a last thought.Your method requires the code to loop through all the data three times. Once to transfer the data from the query to the array, once to process blank rows into the array, and a third time to display it.I would be a bit leery for something like this on a high traffic page with a large data set. Efficiency is now the challenge. Was suspicious of this and testing confirmed that record sets of 100 or more were noticeably slower even on fast development server. Converting to a CFscript helped. Tickcount is still about 70 ms with record set of 500. Any suggestions to help speed it up? -- cfscript My2DArray = ArrayNew(2); row = 1; while (row LTE query.RecordCount) { My2DArray[row][1] = query.city_name[row]; My2DArray[row][2] = query.lcid[row]; My2DArray[row][3] = query.listingcount[row]; row = row + 1; } firstLetter = A; countVar = 1; // if (ArrayLen(My2DArray) GT 20) while (countVar LTE (ArrayLen(My2DArray))) if (Left(My2DArray[countVar][1],1) NEQ firstLetter) { firstLetter = left(My2DArray[countVar][1],1); NewElement = ArrayNew(1); NewElement[1] = ; NewElement[2] = ; NewElement[3] = ; InsertSuccess = ArrayInsertAt(My2DArray, countVar, NewElement); countVar = countVar + 1; } else {countVar = countVar + 1;} /cfscript [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Test...
-- M.Sc. Hassan Arteaga Rodrguez. Microsoft Certified System Engineer. Grupo de Desarrollo. DIGI COPEXTEL, S.A [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: SOT: OO Design
Holy crap, was that a long and remarkably well thought-out post. You would never dream (normally) of having an entity (hence table) to model a collection of items Perhaps that's why I wasn't seeing what he meant.I'm so used to objects being over here and relational stuff being over there that I didn't see a conflict. would be, I would normally define the parent object to contain a collection of the child objects. But I wouldn't design a special object to model that collection, I'd just use a built-in class. Hmm.I generally would have taken a generic linked-list, added some neat features, and declared it a new object type.But point taken. I guess it's all in how you are trying to think about it. But to be honest, if I was using CF, OO design methodology would not be at the forefront of my mind. Me neither, at the moment.While I was very excited at first, and am still interested in, OO in CF, until they iron out the wrinkles in true OO implementation, it's going to be hard to do it right and complete. --Ben Doom [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:java in CFMX question
java.io.FilePermission >From j2se/1.4.2 Javdocs: Creates a new FilePermission object with the specified actions. path is the pathname of a file or directory, and actions contains a comma-separated list of the desired actions granted on the file or directory. Possible actions are read, write, execute, and delete. I am not sure of how to do the syntax though... is this accurate to people's knowledge? it does not appear to be working. cfobject type=JAVA name=jFile class=java.io.FilePermission action="" cfscript newPermission = jFile.init('blah.rtf','write'); /cfscript [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: SOT: OO Design
Deanna Okay, so I was following along, but then you throw this out there. Huh? I thought that we're all supposed to start thinking OO to fully leverage CFC's. Am I wrong here? No, of course you're not wrong - but there's more to CF than CFC's :-) Nick [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
nesting output from 2 queries
If you have two different queries and you want to put the output of one of those queries within the other, is that possible, if so how (group processing doesn't appear to be an option)?Such as: cfquery datasource=DSN name=query1 SELECT fields_various FROMtable1 /cfquery cfquery datasource=DSN name=query2 SELECT columns_various FROM table2 /cfquery cfoutput query=query1 #fields_various# cfoutput query=query2 #columns_various# /cfquery /cfoutput TIA Tim [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Inserting rows into a 2d array
Well, my first suggestion is to combine at least the first two loops.You should be able to check for the breaks you want, while you are converting the query to the array, and insert the blank rows at that time.This way, you don't even need the ArrayInsertAt function. Something like this. cfquery name=getdata/ cfset rowCounter = 1 cfset firstLetter = A cfset dataAry = ArrayNew(2) cfloop query=getdata !--- a bit simplier syntax then your from-to loop--- cfif left(getdata.city,1) NEQ firstLetter cfset dataAry[rowCounter][1] = cfset dataAry[rowCounter][2] = cfset rowCounter = rowCounter + 1 cfset firstLetter = left(getdata.city,1) /cfif cfset dataAry[rowCounter][1] = getdata.city cfset dataAry[rowCounter[2] = code cfset rowCounter = rowCounter + 1 /cfloop That should cut the processing time by about 30% by eliminating one loop. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA -Original Message- From: DougF [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 10:58 AM To: CF-Talk Subject: Re: Inserting rows into a 2d array Thanks Ian, - Original Message - From: Ian Skinner [EMAIL PROTECTED] Sent: Monday, November 17, 2003 11:06 PM Subject: Re: Inserting rows into a 2d array What took me a little to get my head around, when I first learned Cold Fusion Arrays, is that, when you have a two dimension Array, it does not have to be a grid or table.It is more proper to visualize it as a one dimension array, that each element contains individual one dimension arrays. Thus you can have different size arrays at each element. Yes, understanding that each element contains an individual one dimension array was the ah ha moment for me. Was looking for an example to get it through my thick head... ...don't bother creating a blank placeholder array. Just put the ArrayNew(1) function as the third parameter of the ArrayInsertAt function.This creates a blank new array at the new position.Then, if you later decide you need to put data here, you can just use simple assignment. I need the three elements in the new array or logic that uses the new array will choke when it hits a non-existence element. At most there are any about 20 inserts on the largest record set processed so I don't it makes much difference to the speed. ...just as a last thought.Your method requires the code to loop through all the data three times. Once to transfer the data from the query to the array, once to process blank rows into the array, and a third time to display it.I would be a bit leery for something like this on a high traffic page with a large data set. Efficiency is now the challenge. Was suspicious of this and testing confirmed that record sets of 100 or more were noticeably slower even on fast development server. Converting to a CFscript helped. Tickcount is still about 70 ms with record set of 500. Any suggestions to help speed it up? -- cfscript My2DArray = ArrayNew(2); row = 1; while (row LTE query.RecordCount) { My2DArray[row][1] = query.city_name[row]; My2DArray[row][2] = query.lcid[row]; My2DArray[row][3] = query.listingcount[row]; row = row + 1; } firstLetter = A; countVar = 1; // if (ArrayLen(My2DArray) GT 20) while (countVar LTE (ArrayLen(My2DArray))) if (Left(My2DArray[countVar][1],1) NEQ firstLetter) { firstLetter = left(My2DArray[countVar][1],1); NewElement = ArrayNew(1); NewElement[1] = ; NewElement[2] = ; NewElement[3] = ; InsertSuccess = ArrayInsertAt(My2DArray, countVar, NewElement); countVar = countVar + 1; } else {countVar = countVar + 1;} /cfscript _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: nesting output from 2 queries
Replace one (or both) your CFOUTPUT with CFLOOP QUERY=queryname -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 12:08 PM To: CF-Talk Subject: nesting output from 2 queries If you have two different queries and you want to put the output of one of those queries within the other, is that possible, if so how (group processing doesn't appear to be an option)?Such as: cfquery datasource=DSN name=query1 SELECT fields_various FROMtable1 /cfquery cfquery datasource=DSN name=query2 SELECT columns_various FROM table2 /cfquery cfoutput query=query1 #fields_various# cfoutput query=query2 #columns_various# /cfquery /cfoutput TIA Tim [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: SOT: OO Design
True, and that's what I've been doing for, oh 5 years now...that other stuff. ;) -Deanna - Original Message - From: Nick de Voil [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 1:54 PM Subject: Re: SOT: OO Design Deanna Okay, so I was following along, but then you throw this out there. Huh? I thought that we're all supposed to start thinking OO to fully leverage CFC's. Am I wrong here? No, of course you're not wrong - but there's more to CF than CFC's :-) Nick [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: nesting output from 2 queries
Sure...see below: cfquery datasource=DSN name=query1 SELECT fields_various FROMtable1 /cfquery cfquery datasource=DSN name=query2 SELECT columns_various FROM table2 /cfquery cfoutput query=query1 #fields_various# cfloop query=query2 !--- just loop the query instead of outputting it. --- #columns_various# /cfloop /cfoutput [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: nesting output from 2 queries
The simplest fix to your posted code is to use the cfloop tag for at least one of the queries.Cfloop tags can be nested. cfquery datasource=DSN name=query1 SELECT fields_various FROMtable1 /cfquery cfquery datasource=DSN name=query2 SELECT columns_various FROM table2 /cfquery cfquery query=query1 #fields_various# cfloop query=query2 #columns_various# /cfloop /cfoutput Now when you start to nest queries, the automatic scoping of queries can get confused and problematic, so it's evan more important to scope your query variables (query1.fields_various, query2.fields_various). Beyond this you can get into using the array notation form of queries and do some really sophisticated mixing. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 12:08 PM To: CF-Talk Subject: nesting output from 2 queries If you have two different queries and you want to put the output of one of those queries within the other, is that possible, if so how (group processing doesn't appear to be an option)?Such as: cfquery datasource=DSN name=query1 SELECT fields_various FROMtable1 /cfquery cfquery datasource=DSN name=query2 SELECT columns_various FROM table2 /cfquery cfoutput query=query1 #fields_various# cfoutput query=query2 #columns_various# /cfquery /cfoutput TIA Tim _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: SOT: OO Design
I think my main problem is that I'm coming at this from a very database-centric point of view. So, I'm having a hard time changing that line of thinking. Okay, so if I go with a two object model (grossly simplified, of course), then I have a consumables object as an attribute of my task object? Is that correct? So, if I instantiate a consumables object inside my task object, I can then call the method getallConsumables and get all the consumables for that task. Do I do all my new consumable creation from within my task object, too? Or, do I instantiate outside the task object and just pass in a taskid when I want to add a consumable (to the database)? So, my SnapShot would be something like this: Sue has a Videotape Interviews task in the system. The task involves $500 worth of videographer's service (considered a consumable good). Sue needs to enter the amount and type of consumables used into the system. Procedurally, it would go like this (skipping a bunch of steps to get to this point): 1. Sue selects the Videotape Interviews task from her drop down list of tasks. (A query result set of all Sue's tasks.) 2. Sue selects manage consumables from her to do list. (A standard list of things we can do with tasks.) 3. Sue enters the type and amount of consumables, and optionally a date (defaults to today). (An html form page) 4. A new consumable is added to the database for the selected task. (An action page with a cfquery.) Sample object-centric interpretation anyone? - Original Message - From: Ben Doom [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 1:36 PM Subject: Re: SOT: OO Design Holy crap, was that a long and remarkably well thought-out post. You would never dream (normally) of having an entity (hence table) to model a collection of items Perhaps that's why I wasn't seeing what he meant.I'm so used to objects being over here and relational stuff being over there that I didn't see a conflict. would be, I would normally define the parent object to contain a collection of the child objects. But I wouldn't design a special object to model that collection, I'd just use a built-in class. Hmm.I generally would have taken a generic linked-list, added some neat features, and declared it a new object type.But point taken. I guess it's all in how you are trying to think about it. But to be honest, if I was using CF, OO design methodology would not be at the forefront of my mind. Me neither, at the moment.While I was very excited at first, and am still interested in, OO in CF, until they iron out the wrinkles in true OO implementation, it's going to be hard to do it right and complete. --Ben Doom [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: java in CFMX question
By default the file is writable, set to readonly.. if you require so.. wouldnt this work? filePath = C:\\Inetpub\wwwroot\mytest.txt; jFile = createObject(Java,java.io.File); jFile.init(filePath); jFile.setReadOnly();// only if you require it to be ready only Or You can use FilePermisssion jFileSecurity = createObject(Java,java.io.FilePermission); jFileSecurity.init(jFile, write); Joe - Original Message - From: Kyle McNamara To: CF-Talk Sent: Tuesday, November 18, 2003 11:02 AM Subject: java in CFMX question I am doing this now before any time they try to open the file: cfobject type=JAVA name=jFile class=java.io.File action="" cfscript newAttribute = jFile.init('filenameher'); newAttribute.setReadOnly(); /cfscript ...which seems to be working well. The only thing is, ther are certain times I need to make it writeable too... when researcfing the FILE class at http://java.sun.com/j2se/1.4.2/docs/api/index.html I noticed that they have setReadOnly(); and but no way to set it to writeable... it has a function to check if it is currently wriateable (canWrite();) but nothing else I can see... any thoughts on this? tia, k [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Macromedia launches Flex (Was Royale)
So it looks like Flex is a JSP application 1st, and an ASP.NET 2nd...but there's not any real mention of CFMX in the presentation.Hmmm... Tyler _ From: Mike Brunt [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 10:30 AM To: CF-Talk Subject: Macromedia launches Flex (Was Royale) Ben Forta just blogged the launch of Macromedia Flex (previously Royale). Verbatim - Flex is designed to leverage existing and standards based back-ends, and ColdFusion developers will find that they can use Flex to build sophisticated n-tier applications (with ColdFusion providing the back-end processing, and Flex generating the client-side code). There's a Breeze preso here http://www.macromedia.com/software/flex/productinfo/brz_overview/ Kind Regards - Mike Brunt Webapper Services LLC Web Site http://www.webapper.com Blog http://www.webapper.net Webapper Web Application Specialists _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Server expire?
Why do I get this error when I access the CF Admin? Error Diagnostic Information An error occurred while evaluating the _expression_: request.expiration = duplicate(server.coldFusion.expiration) Error near line 27, column 8. Error resolving parameter SERVER.COLDFUSION.EXPIRATION The object COLDFUSION.EXPIRATION is not present in the scope named SERVER. It is likely that you have misspelled the name of the object you are trying to access. Robert O. HWW [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Using cfhttp to display pdf file
I'm trying to retrieve a pdf file that is from a virtual directory on the webserver using cfhttp... can anybody tell me what I'm doing wrong?All I'm getting back is something that starts out like this: %PDF-1.2 %£ 6 0 obj /Linearized 1 /O 8 /H [ 997 192 ] /L 11898 /E 9167 /N 2 /T 11661 endobj xref 6 30 16 0 n 000944 0 n 001189 0 n 001394 0 n 001552 0 n 001732 0 n 002074 0 n 002253 0 n 002274 0 n 003107 0 n 003295 here is my code: cfhttp url=""> il_200310.pdf https://inview.wng.com/investor/resource/2010/AgingDetail/2010AgingDetail_2 00310.pdf method=GET resolveurl=YES /cfhttp cfcontent type=application/pdf cfoutput #cfhttp.fileContent# /cfoutput 2 things: 1. If using CFMX 6.1, use the getAsBinary=yes setting on the cfhttp call (see LiveDocs for more info) 2. Your output should be: cfoutput#cfhttp.filecontent#/cfoutput Note that the the cfhttp.filecontent *must* be on the same line as the opening cfoutput, or else there will be a line of whitespace at the top of your page that will cause the PDF output to break. Hopefully one if, not both, of the above resolve your problem. Regards, Dave. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Question about data validation (beginner)
I have a page which accepts several url variables.I want to make sure if someone manipulated the url in the browser and set the value outside what is handled by the page that this is handled. I was thinking I could check for the existence of the url variable and then if set check for the value not being what I am accepting.If the value is not what I am expecting I take corrective action. I am at a lose to figure out how you handle the 'if it's not what I am expecting ' as opposed to the 'I am expecting this, do that' Below is my failed attempt.Any advice? Thanks, John !--- Catch ChartType values outside the range that are accepted by this page --- cfif IsDefined(URL.ChartType) AND url.ChartType NEQ pie or IsDefined(URL.ChartType) AND url.ChartType NEQ bar or IsDefined(URL.ChartType) AND url.ChartType NEQ line or IsDefined(URL.ChartType) AND url.ChartType NEQ pyramid or IsDefined(URL.ChartType) AND url.ChartType NEQ area or IsDefined(URL.ChartType) AND url.ChartType NEQ cone or IsDefined(URL.ChartType) AND url.ChartType NEQ curve or IsDefined(URL.ChartType) AND url.ChartType NEQ cylinder or IsDefined(URL.ChartType) AND url.ChartType NEQ step or IsDefined(URL.ChartType) AND url.ChartType NEQ scatter cflocation url=""> addtoken=no /cfif !--- End Catch ChartType values outside the range that are accepted by this page --- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: SOT: OO Design
Okay, so if I go with a two object model (grossly simplified, of course), then I have a consumables object as an attribute of my task object? Is that correct? So, if I instantiate a consumables object inside my task object, I can then call the method getallConsumables and get all the consumables for that task. In this case, does get imply that the Task goes and gets them, or that the caller gets them from the Task? Do I do all my new consumable creation from within my task object, too? Or, do I instantiate outside the task object and just pass in a taskid when I want to add a consumable (to the database)? Huh?First, let's ignore database storage for the moment. If you are using the Consumable as a portable object -- that is, other things know about Consumables besides just Tasks, then I'd create an object and pass the whole object into the Task.An example:You create an object called a Project which contains Tasks.It has a function which collects all Consumables from the contained Tasks and flags duplicates.It needs to know what Consumables are.Therefore, it makes a lot of sense for the Task to send and recieve Consumable data as Consumable Objects.Does that make sense? Of course, create from data and accept object are not mutually exclusive.You could certainly do either.And, of course, you can have a third option:create from query. Which brings us back to the database.From this point out, I'm assuming a one-Task to many-Consumables relationship, so two tasks never share a Consumable. How you track Consumables as they relate to their Tasks is more of an ownership relationship than a relational database one.How they are stored in the DB is irrelevant, in many ways, to the relationship that they have in your object model.Think of it more like XML, where a Task is a container for zero or more Consumables.Does that help? If you have more questions, feel free to contact me off-list or on-list as you please. --Ben [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Question about data validation (beginner)
look up the cfswitch cfcase tags, will work much ber than what ur doing. pluas u need to take those or's out and use cfelseif if u gunna do it taht way I have a page which accepts several url variables.I want to make sure if someone manipulated the url in the browser and set the value outside what is handled by the page that this is handled. I was thinking I could check for the existence of the url variable and then if set check for the value not being what I am accepting.If the value is not what I am expecting I take corrective action. I am at a lose to figure out how you handle the 'if it's not what I am expecting ' as opposed to the 'I am expecting this, do that' Below is my failed attempt.Any advice? Thanks, John !--- Catch ChartType values outside the range that are accepted by this page --- cfif IsDefined(URL.ChartType) AND url.ChartType NEQ pie or IsDefined(URL.ChartType) AND url.ChartType NEQ bar or IsDefined(URL.ChartType) AND url.ChartType NEQ line or IsDefined(URL.ChartType) AND url.ChartType NEQ pyramid or IsDefined(URL.ChartType) AND url.ChartType NEQ area or IsDefined(URL.ChartType) AND url.ChartType NEQ cone or IsDefined(URL.ChartType) AND url.ChartType NEQ curve or IsDefined(URL.ChartType) AND url.ChartType NEQ cylinder or IsDefined(URL.ChartType) AND url.ChartType NEQ step or IsDefined(URL.ChartType) AND url.ChartType NEQ scatter cflocation url=""> addtoken=no /cfif !--- End Catch ChartType values outside the range that are accepted by this page --- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Question about data validation (beginner)
and yes i have been drinking, lol bad spelling day look up the cfswitch cfcase tags, will work much ber than what ur doing. pluas u need to take those or's out and use cfelseif if u gunna do it taht way I have a page which accepts several url variables.I want to make sure if someone manipulated the url in the browser and set the value outside what is handled by the page that this is handled. I was thinking I could check for the existence of the url variable and then if set check for the value not being what I am accepting.If the value is not what I am expecting I take corrective action. I am at a lose to figure out how you handle the 'if it's not what I am expecting ' as opposed to the 'I am expecting this, do that' Below is my failed attempt.Any advice? Thanks, John !--- Catch ChartType values outside the range that are accepted by this page --- cfif IsDefined(URL.ChartType) AND url.ChartType NEQ pie or IsDefined(URL.ChartType) AND url.ChartType NEQ bar or IsDefined(URL.ChartType) AND url.ChartType NEQ line or IsDefined(URL.ChartType) AND url.ChartType NEQ pyramid or IsDefined(URL.ChartType) AND url.ChartType NEQ area or IsDefined(URL.ChartType) AND url.ChartType NEQ cone or IsDefined(URL.ChartType) AND url.ChartType NEQ curve or IsDefined(URL.ChartType) AND url.ChartType NEQ cylinder or IsDefined(URL.ChartType) AND url.ChartType NEQ step or IsDefined(URL.ChartType) AND url.ChartType NEQ scatter cflocation url=""> addtoken=no /cfif !--- End Catch ChartType values outside the range that are accepted by this page --- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Question about data validation (beginner)
Hi John, So, any of the chart types are acceptable? You can probably just do this: cfif isdefined(url.charttype) AND NOT listfindnocase(pie,bar,line,pyramid,area,cone,curve,cylinder,step,scatter, url.charttype) cflocation url=""> /cfif This assumes that you're only checking the charttype if the url.charttype variable exists. If you want to make sure they both exist, you would do this: cfif NOT isdefined(url.charttype) OR NOT listfindnocase(pie,bar,line,pyramid,area,cone,curve,cylinder,step,scatter, url.charttype) cflocation url=""> /cfif - Original Message - From: John Munyan [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 3:03 PM Subject: Question about data validation (beginner) I have a page which accepts several url variables.I want to make sure if someone manipulated the url in the browser and set the value outside what is handled by the page that this is handled. I was thinking I could check for the existence of the url variable and then if set check for the value not being what I am accepting.If the value is not what I am expecting I take corrective action. I am at a lose to figure out how you handle the 'if it's not what I am expecting ' as opposed to the 'I am expecting this, do that' Below is my failed attempt.Any advice? Thanks, John !--- Catch ChartType values outside the range that are accepted by this page --- cfif IsDefined(URL.ChartType) AND url.ChartType NEQ pie or IsDefined(URL.ChartType) AND url.ChartType NEQ bar or IsDefined(URL.ChartType) AND url.ChartType NEQ line or IsDefined(URL.ChartType) AND url.ChartType NEQ pyramid or IsDefined(URL.ChartType) AND url.ChartType NEQ area or IsDefined(URL.ChartType) AND url.ChartType NEQ cone or IsDefined(URL.ChartType) AND url.ChartType NEQ curve or IsDefined(URL.ChartType) AND url.ChartType NEQ cylinder or IsDefined(URL.ChartType) AND url.ChartType NEQ step or IsDefined(URL.ChartType) AND url.ChartType NEQ scatter cflocation url=""> addtoken=no /cfif !--- End Catch ChartType values outside the range that are accepted by this page --- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: HTML e-Newsletter
Matt Robertson wrote: I searched the archives for 'smtp auth' and can't find the original and much more involved thread.The method the author was pushing is what Jochem is mentioning in his post.I've only heard one poster actually claim to have done it, and as you'll see the method has obvious weaknesses. IIRC using HELO is hardcoded in CF, and EHLO is required for authentication. In other words, I don't think it is going to fly. Jochem -- Who needs virtual reality if you can just dream? - Loesje [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Question about data validation (beginner)
Deanna, On 11/18/2003 at 16:19, you wrote: DS cfif NOT isdefined(url.charttype) OR NOT DS listfindnocase(pie,bar,line,pyramid,area,cone,curve,cylinder,step,scatter, url.charttype) DS cflocation url=""> DS /cfif Or cfif NOT (isdefined(url.charttype) AND listfindnocase(pie,bar,line,pyramid,area,cone,curve,cylinder,step,scatter, url.charttype))cflocation url="" /cfif ~ Ubqtous ~ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Question about data validation (beginner)
Hello. I think you're on the right track.You could make this all smaller like this: cfparam name=url.charttype default=!--- OR OTHER DEFAULT --- cfset validChartTypes=pie,bar,line,pyramid !--- ETC --- cfif not listFindNoCase(validChartTypes,url.charttype cflocation url=""> addtoken=no /cfif -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 1:15 PM To: CF-Talk Subject: Re: Question about data validation (beginner) and yes i have been drinking, lol bad spelling day look up the cfswitch cfcase tags, will work much ber than what ur doing. pluas u need to take those or's out and use cfelseif if u gunna do it taht way I have a page which accepts several url variables.I want to make sure if someone manipulated the url in the browser and set the value outside what is handled by the page that this is handled. I was thinking I could check for the existence of the url variable and then if set check for the value not being what I am accepting.If the value is not what I am expecting I take corrective action. I am at a lose to figure out how you handle the 'if it's not what I am expecting ' as opposed to the 'I am expecting this, do that' Below is my failed attempt.Any advice? Thanks, John !--- Catch ChartType values outside the range that are accepted by this page --- cfif IsDefined(URL.ChartType) AND url.ChartType NEQ pie or IsDefined(URL.ChartType) AND url.ChartType NEQ bar or IsDefined(URL.ChartType) AND url.ChartType NEQ line or IsDefined(URL.ChartType) AND url.ChartType NEQ pyramid or IsDefined(URL.ChartType) AND url.ChartType NEQ area or IsDefined(URL.ChartType) AND url.ChartType NEQ cone or IsDefined(URL.ChartType) AND url.ChartType NEQ curve or IsDefined(URL.ChartType) AND url.ChartType NEQ cylinder or IsDefined(URL.ChartType) AND url.ChartType NEQ step or IsDefined(URL.ChartType) AND url.ChartType NEQ scatter cflocation url=""> addtoken=no /cfif !--- End Catch ChartType values outside the range that are accepted by this page --- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
OT: Unblocking Ports
Hi All, I was just reading this article on Macromedia's site: http://www.macromedia.com/support/coldfusion/ts/documents/tn18336.htm, and this may be a stupid question but how do I unblock ports on my Windows server? TIA, Lee [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Question about data validation (beginner)
How about something like this: cfset AcceptableList = pie,bar,line,pyramid,area,cone,curve,cylinder,step,scatter cfif (IsDefined(URL.ChartType)) AND (AcceptableList DOES NOT CONTAIN url.ChartType ) pGet lost you bum!/p cfabort /cfif Chart stuff follows here because you have acceptable values. Cheers, Michael Kear Windsor, NSW, Australia AFP Webworks. -Original Message- From: John Munyan [mailto:[EMAIL PROTECTED] Sent: Wednesday, 19 November 2003 8:03 AM To: CF-Talk Subject: Question about data validation (beginner) I have a page which accepts several url variables.I want to make sure if someone manipulated the url in the browser and set the value outside what is handled by the page that this is handled. I was thinking I could check for the existence of the url variable and then if set check for the value not being what I am accepting.If the value is not what I am expecting I take corrective action. I am at a lose to figure out how you handle the 'if it's not what I am expecting ' as opposed to the 'I am expecting this, do that' Below is my failed attempt.Any advice? Thanks, John http://www.houseoffusion.com/banners/view.cfm?bannerid=34 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
CF and Java integration..
Hi all: I'm looking for a Java reference in PDF or chm format about the most used packages and short examples. I'd like to startdevelop some examples with CF MX 6.1 using java classes. Just to start !!! *in CFLib.org it's a good example how to implement zip features with java.util.zip package Regards, -- M.Sc. Hassan Arteaga Rodrguez. Microsoft Certified System Engineer. Grupo de Desarrollo. DIGI COPEXTEL, S.A [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Question about data validation (beginner)
Thank you all very much :-)It is working like a champ!!I really appreciate everyone's help! Sincerely, John -Original Message- From: Deanna Schneider [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 1:20 PM To: CF-Talk Subject: Re: Question about data validation (beginner) Hi John, So, any of the chart types are acceptable? You can probably just do this: cfif isdefined(url.charttype) AND NOT listfindnocase(pie,bar,line,pyramid,area,cone,curve,cylinder,step,scatt er, url.charttype) cflocation url=""> /cfif This assumes that you're only checking the charttype if the url.charttype variable exists. If you want to make sure they both exist, you would do this: cfif NOT isdefined(url.charttype) OR NOT listfindnocase(pie,bar,line,pyramid,area,cone,curve,cylinder,step,scatt er, url.charttype) cflocation url=""> /cfif - Original Message - From: John Munyan [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 3:03 PM Subject: Question about data validation (beginner) I have a page which accepts several url variables.I want to make sure if someone manipulated the url in the browser and set the value outside what is handled by the page that this is handled. I was thinking I could check for the existence of the url variable and then if set check for the value not being what I am accepting.If the value is not what I am expecting I take corrective action. I am at a lose to figure out how you handle the 'if it's not what I am expecting ' as opposed to the 'I am expecting this, do that' Below is my failed attempt.Any advice? Thanks, John !--- Catch ChartType values outside the range that are accepted by this page --- cfif IsDefined(URL.ChartType) AND url.ChartType NEQ pie or IsDefined(URL.ChartType) AND url.ChartType NEQ bar or IsDefined(URL.ChartType) AND url.ChartType NEQ line or IsDefined(URL.ChartType) AND url.ChartType NEQ pyramid or IsDefined(URL.ChartType) AND url.ChartType NEQ area or IsDefined(URL.ChartType) AND url.ChartType NEQ cone or IsDefined(URL.ChartType) AND url.ChartType NEQ curve or IsDefined(URL.ChartType) AND url.ChartType NEQ cylinder or IsDefined(URL.ChartType) AND url.ChartType NEQ step or IsDefined(URL.ChartType) AND url.ChartType NEQ scatter cflocation url=""> addtoken=no /cfif !--- End Catch ChartType values outside the range that are accepted by this page --- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Question about data validation (beginner)
You wouldn't want to use contains for this. Contains doesn't look for the whole string as a unit, just the piece. If you take your example and set a cfparam name=url.charttype default=ie it'll pass the cfif because pie contains ie. -d - Original Message - From: Mike Kear [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 3:32 PM Subject: RE: Question about data validation (beginner) How about something like this: cfset AcceptableList = pie,bar,line,pyramid,area,cone,curve,cylinder,step,scatter cfif (IsDefined(URL.ChartType)) AND (AcceptableList DOES NOT CONTAIN url.ChartType ) pGet lost you bum!/p cfabort /cfif Chart stuff follows here because you have acceptable values. Cheers, Michael Kear Windsor, NSW, Australia AFP Webworks. -Original Message- From: John Munyan [mailto:[EMAIL PROTECTED] Sent: Wednesday, 19 November 2003 8:03 AM To: CF-Talk Subject: Question about data validation (beginner) I have a page which accepts several url variables.I want to make sure if someone manipulated the url in the browser and set the value outside what is handled by the page that this is handled. I was thinking I could check for the existence of the url variable and then if set check for the value not being what I am accepting.If the value is not what I am expecting I take corrective action. I am at a lose to figure out how you handle the 'if it's not what I am expecting ' as opposed to the 'I am expecting this, do that' Below is my failed attempt.Any advice? Thanks, John http://www.houseoffusion.com/banners/view.cfm?bannerid=34 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:java in CFMX question
hey joe, my read only approach works already... it is just trying to write that is the trouble now... ity appears that the syntax you gave me was the smae thing I did using cfobject.. also, a guy from a java posting said this: FilePermission is used in conjunction with SecurityManager and .policy files. You can't just grant write permission to a file solely within your application. joe... did you get the changing of file attributes to write to work the way you posted? thank you [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
kloodge
hey, does anyone have ideas about how to cloodge the process of making a file writeable? i thought about renaming it to itself or something... thanks, k [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Using cfhttp to display pdf file
Thanks Dave, But now I'm getting this error: coldfusion.runtime.Cast$ComplexByteArrayException: ByteArray objects cannot be converted to strings. -Original Message- From: Dave Carabetta [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 12:53 PM To: CF-Talk Subject: Re: Using cfhttp to display pdf file I'm trying to retrieve a pdf file that is from a virtual directory on the webserver using cfhttp... can anybody tell me what I'm doing wrong?All I'm getting back is something that starts out like this: %PDF-1.2 %£ 6 0 obj /Linearized 1 /O 8 /H [ 997 192 ] /L 11898 /E 9167 /N 2 /T 11661 endobj xref 6 30 16 0 n 000944 0 n 001189 0 n 001394 0 n 001552 0 n 001732 0 n 002074 0 n 002253 0 n 002274 0 n 003107 0 n 003295 here is my code: cfhttp url=""> a il_200310.pdf https://inview.wng.com/investor/resource/2010/AgingDetail/2010AgingDetail_ 2 00310.pdf method=GET resolveurl=YES /cfhttp cfcontent type=application/pdf cfoutput #cfhttp.fileContent# /cfoutput 2 things: 1. If using CFMX 6.1, use the getAsBinary=yes setting on the cfhttp call (see LiveDocs for more info) 2. Your output should be: cfoutput#cfhttp.filecontent#/cfoutput Note that the the cfhttp.filecontent *must* be on the same line as the opening cfoutput, or else there will be a line of whitespace at the top of your page that will cause the PDF output to break. Hopefully one if, not both, of the above resolve your problem. Regards, Dave. _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Using cfhttp to display pdf file
Thanks Dave, But now I'm getting this error: coldfusion.runtime.Cast$ComplexByteArrayException: ByteArray objects cannot be converted to strings. OK, I got that error before when I was using getAsBinary on a PDF. Not really sure why I got the error because a PDF is technically a binary file, but removing the attribute helped. Try and stick with my second point then and do everything possible to make sure that the cfoutput is the absolute first line on the page with zero whitespace above it (cfsilent, etc.). Regards, Dave. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: SOT: OO Design
What is a consumable? Dwayne Cole, MS in MIS, MBA Florida AM University Certified Advanced ColdFusion Developer 850-591-0212 It can truly be said that nothing happens until there is vision. But it is equally true that a vision with no underlying sense of purpose, no calling, is just a good idea - all sound and fury, signifying nothing.The Fifth Discipline - Peter Senge -- Original Message -- From: Ben Doom [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Tue, 18 Nov 2003 16:09:18 -0500 Okay, so if I go with a two object model (grossly simplified, of course), then I have a consumables object as an attribute of my task object? Is that correct? So, if I instantiate a consumables object inside my task object, I can then call the method getallConsumables and get all the consumables for that task. In this case, does get imply that the Task goes and gets them, or that the caller gets them from the Task? Do I do all my new consumable creation from within my task object, too? Or, do I instantiate outside the task object and just pass in a taskid when I want to add a consumable (to the database)? Huh?First, let's ignore database storage for the moment. If you are using the Consumable as a portable object -- that is, other things know about Consumables besides just Tasks, then I'd create an object and pass the whole object into the Task.An example:You create an object called a Project which contains Tasks.It has a function which collects all Consumables from the contained Tasks and flags duplicates.It needs to know what Consumables are.Therefore, it makes a lot of sense for the Task to send and recieve Consumable data as Consumable Objects.Does that make sense? Of course, create from data and accept object are not mutually exclusive.You could certainly do either.And, of course, you can have a third option:create from query. Which brings us back to the database.From this point out, I'm assuming a one-Task to many-Consumables relationship, so two tasks never share a Consumable. How you track Consumables as they relate to their Tasks is more of an ownership relationship than a relational database one.How they are stored in the DB is irrelevant, in many ways, to the relationship that they have in your object model.Think of it more like XML, where a Task is a container for zero or more Consumables.Does that help? If you have more questions, feel free to contact me off-list or on-list as you please. --Ben [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Question about data validation (beginner)
further...add in cfparam name=url.charttype default= at the top and avoid all those IsDefined() calls.cfdefaultcase in the cfswitch can catch when the url var doesn't exist. Doug -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 4:11 PM To: CF-Talk Subject: Re: Question about data validation (beginner) look up the cfswitch cfcase tags, will work much ber than what ur doing. pluas u need to take those or's out and use cfelseif if u gunna do it taht way I have a page which accepts several url variables.I want to make sure if someone manipulated the url in the browser and set the value outside what is handled by the page that this is handled. I was thinking I could check for the existence of the url variable and then if set check for the value not being what I am accepting.If the value is not what I am expecting I take corrective action. I am at a lose to figure out how you handle the 'if it's not what I am expecting ' as opposed to the 'I am expecting this, do that' Below is my failed attempt.Any advice? Thanks, John !--- Catch ChartType values outside the range that are accepted by this page --- cfif IsDefined(URL.ChartType) AND url.ChartType NEQ pie or IsDefined(URL.ChartType) AND url.ChartType NEQ bar or IsDefined(URL.ChartType) AND url.ChartType NEQ line or IsDefined(URL.ChartType) AND url.ChartType NEQ pyramid or IsDefined(URL.ChartType) AND url.ChartType NEQ area or IsDefined(URL.ChartType) AND url.ChartType NEQ cone or IsDefined(URL.ChartType) AND url.ChartType NEQ curve or IsDefined(URL.ChartType) AND url.ChartType NEQ cylinder or IsDefined(URL.ChartType) AND url.ChartType NEQ step or IsDefined(URL.ChartType) AND url.ChartType NEQ scatter cflocation url=""> addtoken=no /cfif !--- End Catch ChartType values outside the range that are accepted by this page --- _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Using cfhttp to display pdf file
Thanks Dave, But now I'm getting this error: coldfusion.runtime.Cast$ComplexByteArrayException: ByteArray objects cannot be converted to strings. Actually, a quick read of the LiveDocs stuff might solve this. Try putting: cfoutput#toString(cfhttp.fileContent)#/cfoutput when using the getAsBinary attribute. From the LiveDocs: If ColdFusion does not recognize the body as text and converts it to an object, but the body consists of text, the cfoutput tag can display it. The cfoutput tag cannot display Binary type data. (To convert binary data to text, use the ToString function.) That last sentence is where the idea came from. Give it a shot. It just worked in my application code where I was having trouble before. Regards, Dave. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Question about data validation (beginner)
doh!me thinks I've been dwinkin two!:| -Original Message- From: Knudsen, Douglas Sent: Tuesday, November 18, 2003 4:18 PM To: CF-Talk Subject: RE: Question about data validation (beginner) further...add in cfparam name=url.charttype default= at the top and avoid all those IsDefined() calls.cfdefaultcase in the cfswitch can catch when the url var doesn't exist. Doug -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 4:11 PM To: CF-Talk Subject: Re: Question about data validation (beginner) look up the cfswitch cfcase tags, will work much ber than what ur doing. pluas u need to take those or's out and use cfelseif if u gunna do it taht way I have a page which accepts several url variables.I want to make sure if someone manipulated the url in the browser and set the value outside what is handled by the page that this is handled. I was thinking I could check for the existence of the url variable and then if set check for the value not being what I am accepting.If the value is not what I am expecting I take corrective action. I am at a lose to figure out how you handle the 'if it's not what I am expecting ' as opposed to the 'I am expecting this, do that' Below is my failed attempt.Any advice? Thanks, John !--- Catch ChartType values outside the range that are accepted by this page --- cfif IsDefined(URL.ChartType) AND url.ChartType NEQ pie or IsDefined(URL.ChartType) AND url.ChartType NEQ bar or IsDefined(URL.ChartType) AND url.ChartType NEQ line or IsDefined(URL.ChartType) AND url.ChartType NEQ pyramid or IsDefined(URL.ChartType) AND url.ChartType NEQ area or IsDefined(URL.ChartType) AND url.ChartType NEQ cone or IsDefined(URL.ChartType) AND url.ChartType NEQ curve or IsDefined(URL.ChartType) AND url.ChartType NEQ cylinder or IsDefined(URL.ChartType) AND url.ChartType NEQ step or IsDefined(URL.ChartType) AND url.ChartType NEQ scatter cflocation url=""> addtoken=no /cfif !--- End Catch ChartType values outside the range that are accepted by this page --- _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Macromedia launches Flex (Was Royale)
It looks like Flex is to .swf as ColdFusion is to .HTML and the the new product Brady is the equivalent of ColdFusion Studio.Dreamweaver, the be all to all has inherited even more responsibility. Dwayne Cole, MS in MIS, MBA Florida AM University Certified Advanced ColdFusion Developer 850-591-0212 It can truly be said that nothing happens until there is vision. But it is equally true that a vision with no underlying sense of purpose, no calling, is just a good idea - all sound and fury, signifying nothing.The Fifth Discipline - Peter Senge -- Original Message -- From: Tyler Silcox [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Tue, 18 Nov 2003 15:43:52 -0500 So it looks like Flex is a JSP application 1st, and an ASP.NET 2nd...but there's not any real mention of CFMX in the presentation.Hmmm... Tyler _ From: Mike Brunt [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 10:30 AM To: CF-Talk Subject: Macromedia launches Flex (Was Royale) Ben Forta just blogged the launch of Macromedia Flex (previously Royale). Verbatim - Flex is designed to leverage existing and standards based back-ends, and ColdFusion developers will find that they can use Flex to build sophisticated n-tier applications (with ColdFusion providing the back-end processing, and Flex generating the client-side code). There's a Breeze preso here http://www.macromedia.com/software/flex/productinfo/brz_overview/ Kind Regards - Mike Brunt Webapper Services LLC Web Site http://www.webapper.com Blog http://www.webapper.net Webapper Web Application Specialists _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: SOT: OO Design
It's anything that costs actual money (as opposed to our time, which is tracked differently and is only funny money). For example, it's an outside contractor's services (because we actually pay them) as well as blank disks for a CD duplication job. You have to bill consumables to a particular task which is part of a particular project. Make sense? This is just one tiny piece of this whole wonky system. Don't even get me started on how a budget isn't really required, but if there is one, sometimes you bill out the whole budget even if we haven't provided services or goods that meet the whole budget, and other times we go over and don't bill at all. It's a university. What can I say. -d - Original Message - From: Dwayne Cole [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 3:51 PM Subject: Re: SOT: OO Design What is a consumable? Dwayne Cole, MS in MIS, MBA Florida AM University Certified Advanced ColdFusion Developer 850-591-0212 It can truly be said that nothing happens until there is vision. But it is equally true that a vision with no underlying sense of purpose, no calling, is just a good idea - all sound and fury, signifying nothing. The Fifth Discipline - Peter Senge -- Original Message -- From: Ben Doom [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date:Tue, 18 Nov 2003 16:09:18 -0500 Okay, so if I go with a two object model (grossly simplified, of course), then I have a consumables object as an attribute of my task object? Is that correct? So, if I instantiate a consumables object inside my task object, I can then call the method getallConsumables and get all the consumables for that task. In this case, does get imply that the Task goes and gets them, or that the caller gets them from the Task? Do I do all my new consumable creation from within my task object, too? Or, do I instantiate outside the task object and just pass in a taskid when I want to add a consumable (to the database)? Huh?First, let's ignore database storage for the moment. If you are using the Consumable as a portable object -- that is, other things know about Consumables besides just Tasks, then I'd create an object and pass the whole object into the Task.An example:You create an object called a Project which contains Tasks.It has a function which collects all Consumables from the contained Tasks and flags duplicates.It needs to know what Consumables are.Therefore, it makes a lot of sense for the Task to send and recieve Consumable data as Consumable Objects.Does that make sense? Of course, create from data and accept object are not mutually exclusive.You could certainly do either.And, of course, you can have a third option:create from query. Which brings us back to the database.From this point out, I'm assuming a one-Task to many-Consumables relationship, so two tasks never share a Consumable. How you track Consumables as they relate to their Tasks is more of an ownership relationship than a relational database one.How they are stored in the DB is irrelevant, in many ways, to the relationship that they have in your object model.Think of it more like XML, where a Task is a container for zero or more Consumables.Does that help? If you have more questions, feel free to contact me off-list or on-list as you please. --Ben [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Using cfhttp to display pdf file
I saw that earlier.. but that didn't work for me either... running out of ideas =( cfhttp url=""> il_200310.pdf https://inview.wng.com/investor/resource/2010/AgingDetail/2010AgingDetail_2 00310.pdf method=GET getAsBinary=yes /cfhttp cfcontent type=application/pdf cfoutput#ToString (cfhttp.filecontent)#/cfoutput -Original Message- From: Dave Carabetta [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 1:55 PM To: CF-Talk Subject: RE: Using cfhttp to display pdf file Thanks Dave, But now I'm getting this error: coldfusion.runtime.Cast$ComplexByteArrayException: ByteArray objects cannot be converted to strings. Actually, a quick read of the LiveDocs stuff might solve this. Try putting: cfoutput#toString(cfhttp.fileContent)#/cfoutput when using the getAsBinary attribute. From the LiveDocs: If ColdFusion does not recognize the body as text and converts it to an object, but the body consists of text, the cfoutput tag can display it. The cfoutput tag cannot display Binary type data. (To convert binary data to text, use the ToString function.) That last sentence is where the idea came from. Give it a shot. It just worked in my application code where I was having trouble before. Regards, Dave. _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Using cfhttp to display pdf file
I saw that earlier.. but that didn't work for me either... running out of ideas =( cfhttp url=""> il_200310.pdf https://inview.wng.com/investor/resource/2010/AgingDetail/2010AgingDetail_2 00310.pdf method=GET getAsBinary=yes /cfhttp cfcontent type=application/pdf cfoutput#ToString (cfhttp.filecontent)#/cfoutput Hmm, we display PDFs all the time without issue. Are you absolutely sure that the first byte of the PDF file is the absolute first character in the page (via View Source)? That's another culprit. Be sure to suppress not only the calling page, but also any parent pages such as Application.cfm. Regards, Dave. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: RE: Macromedia launches Flex (Was Royale)
There is a very good blog entry pointed out by Sean Corfield from David Mendels of Macromedia.It explains what Flex is and what the aims are.It compares Flex to the aims of MS's Longhorn. We will see or have seen the MS's Flash Killer-Sparkles BS this article is a good loin-girder to that line.ColdFusion is mentioned there and IMHO there is a great future in Flex and CF particularly for CF-ites who did not also want to become Flash-Timeline-Actionscript experts. http://weblogs.asp.net/jezell/posts/38319.aspx Kind Regards - Mike Brunt Original Message --- So it looks like Flex is a JSP application 1st, and an ASP.NET 2nd...but there's not any real mention of CFMX in the presentation.Hmmm... Tyler _ From: Mike Brunt [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 10:30 AM To: CF-Talk Subject: Macromedia launches Flex (Was Royale) Ben Forta just blogged the launch of Macromedia Flex (previously Royale). Verbatim - Flex is designed to leverage existing and standards based back-ends, and ColdFusion developers will find that they can use Flex to build sophisticated n-tier applications (with ColdFusion providing the back-end processing, and Flex generating the client-side code). There's a Breeze preso here http://www.macromedia.com/software/flex/productinfo/brz_overview/ Kind Regards - Mike Brunt Webapper Services LLC Web Site http://www.webapper.com Blog http://www.webapper.net Webapper Web Application Specialists _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Using cfhttp to display pdf file
Are you using cf5?I could not make it work on CF5, but it works like a charm on CFMX (6.1): cfsetting enablecfoutputonly=yes showdebugoutput=no cfhttp GetAsBinary=yes url=""> method=GET/cfhttp cfcontent type=application/pdfcfoutput#trim(toString(cfhttp.filecontent))#/c foutput -Original Message- From: Tim Do [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 5:00 PM To: CF-Talk Subject: RE: Using cfhttp to display pdf file I saw that earlier.. but that didn't work for me either... running out of ideas =( cfhttp url=""> /2010AgingDeta il_200310.pdf https://inview.wng.com/investor/resource/2010/AgingDetail/201 0AgingDetail_2 00310.pdf method=GET getAsBinary=yes /cfhttp cfcontent type=application/pdf cfoutput#ToString (cfhttp.filecontent)#/cfoutput -Original Message- From: Dave Carabetta [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 1:55 PM To: CF-Talk Subject: RE: Using cfhttp to display pdf file Thanks Dave, But now I'm getting this error: coldfusion.runtime.Cast$ComplexByteArrayException: ByteArray objects cannot be converted to strings. Actually, a quick read of the LiveDocs stuff might solve this. Try putting: cfoutput#toString(cfhttp.fileContent)#/cfoutput when using the getAsBinary attribute. From the LiveDocs: If ColdFusion does not recognize the body as text and converts it to an object, but the body consists of text, the cfoutput tag can display it. The cfoutput tag cannot display Binary type data. (To convert binary data to text, use the ToString function.) That last sentence is where the idea came from. Give it a shot. It just worked in my application code where I was having trouble before. Regards, Dave. _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Using cfhttp to display pdf file
I'm using mx6.1 as well... I took the binary data and pasted it into a file and saved with .pdf extension.. tired to open it and got The file is damaged and could not be repaired.Sometimes the browser would prompt and sometimes it would just display the binary data. -Original Message- From: Jeff Beer [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 2:42 PM To: CF-Talk Subject: RE: Using cfhttp to display pdf file Are you using cf5?I could not make it work on CF5, but it works like a charm on CFMX (6.1): cfsetting enablecfoutputonly=yes showdebugoutput=no cfhttp GetAsBinary=yes url=""> method=GET/cfhttp cfcontent type=application/pdfcfoutput#trim(toString(cfhttp.filecontent))#/c foutput -Original Message- From: Tim Do [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 5:00 PM To: CF-Talk Subject: RE: Using cfhttp to display pdf file I saw that earlier.. but that didn't work for me either... running out of ideas =( cfhttp url=""> /2010AgingDeta il_200310.pdf https://inview.wng.com/investor/resource/2010/AgingDetail/201 0AgingDetail_2 00310.pdf method=GET getAsBinary=yes /cfhttp cfcontent type=application/pdf cfoutput#ToString (cfhttp.filecontent)#/cfoutput -Original Message- From: Dave Carabetta [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 1:55 PM To: CF-Talk Subject: RE: Using cfhttp to display pdf file Thanks Dave, But now I'm getting this error: coldfusion.runtime.Cast$ComplexByteArrayException: ByteArray objects cannot be converted to strings. Actually, a quick read of the LiveDocs stuff might solve this. Try putting: cfoutput#toString(cfhttp.fileContent)#/cfoutput when using the getAsBinary attribute. From the LiveDocs: If ColdFusion does not recognize the body as text and converts it to an object, but the body consists of text, the cfoutput tag can display it. The cfoutput tag cannot display Binary type data. (To convert binary data to text, use the ToString function.) That last sentence is where the idea came from. Give it a shot. It just worked in my application code where I was having trouble before. Regards, Dave. _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
OT: JJ Allaire?
Does anyone know what JJ Allaire'es full name is (ie what is JJ short for). I saw it somewhere years ago but can't remember what it is. Also any ColdFusion trivia tidbits? Thanks! Peter Tilbrook Transitional Services - Enterprise eSolutions Centrelink (http://www.centrelink.gov.au) 2 Faulding Street Symonston ACT 2609 Tel: (02) 62115927 Important:This e-mail is intended for the use of the addressee and may contain information that is confidential, commercially valuable or subject to legal or parliamentary privilege.If you are not the intended recipient you are notified that any review, re-transmission, disclosure, use or dissemination of this communication is strictly prohibited by several Commonwealth Acts of Parliament.If you have received this communication in error please notify the sender immediately and delete all copies of this transmission together with any attachments. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]