scheduled task save output to a network share
Hello, ColdFusion 10,286680 running on a Windows 2012R2 machine. I want to create a Scheduled Task. The output should be saved to a file on a network share. The network share is accessible via Windows explorer: either using the UNC notation (\\network_share) or via a mapping (F:). When I enable the option Publish on the Server Settings Add/Edit Scheduled Task page the UNC path in the field File is not accepted. Also using the mapped drive F: is not accepted. Submitting the form gives this error âIf you want to publish the result of this task, you must use an existing, valid directory name.â Using the âBrowse Serverâ button does not give me the directory - just drives: A,C and Z. Only C gives access to the C: drive. Clicking the other two driveletters do nothing. Is Coldfusion unable to save the result of a scheduled task to a network share? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359616 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: scheduled task save output to a network share
Are you still running cf under the system account? If so then this is why, and is also insecure. I forgot to add, CF10 is _not_ running under the local system acct - it runs as a dedicated user that has access to the share. I found a solution already: file: \\myNetworkShare\path\to\networkshare is not recognized by CF admin file: myNetworkShare\path\to\networkshare is recognized by CF admin Looks like you have to escape the \\ that is part of the UNC name... I tested this, the ST ran and it created a file on this network file location ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359618 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
F9 ORM: Path expected for join!
I have 2 tables, company and user with a many-to-many relation: cfcomponent entityname=company persistent=true table=company output=false cfproperty name=user cfc=userGateway fieldtype=many-to-one fkcolumn=FK_user /cfcomponent cfcomponent entityname=user persistent=true table=user output=false cfproperty name=companies cascade=all-delete-orphan fieldtype=one-to-many cfc=companyGateway fkcolumn=FK_user inverse=true singularname=company /cfcomponent (I only show the relevant code here) When I want to retrieve a company based on the id of an associated user I do this: cfquery name=local.company dbtype=hql select c.id from company as c join user as u where u.id=cfqueryparam value=#arguments.userId# /cfquery I add the join syntax _without_ the columns to join on since that is defined in the components using the cfproperty's fieldtype attribute. An cfdump var=#local.company#cfabort gives me Message Path expected for join! [ select c.id from company as c join user as u where u.id=? ] QueryString select c.id from company as c join user as u where u.id=? Either my hql is wrong or something is wrong with the mappings but I can't figure out what.. Does anyone have a clue? Coldfusion 9,0,1,274733, Win7,MySQL 5.5.16 Marc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349879 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CF9 ORM: Path expected for join!
I have 2 tables, company and user with a many-to-many relation: cfcomponent entityname=company persistent=true table=company output=false cfproperty name=user cfc=userGateway fieldtype=many-to-one fkcolumn=FK_user /cfcomponent cfcomponent entityname=user persistent=true table=user output=false cfproperty name=companies cascade=all-delete-orphan fieldtype=one-to-many cfc=companyGateway fkcolumn=FK_user inverse=true singularname=company /cfcomponent (I only show the relevant code here) When I want to retrieve a company based on the id of an associated user I do this: cfquery name=local.company dbtype=hql select c.id from company as c join user as u where u.id=cfqueryparam value=#arguments.userId# /cfquery I add the join syntax _without_ the columns to join on since that is defined in the components using the cfproperty's fieldtype attribute. An cfdump var=#local.company#cfabort gives me Message Path expected for join! [ select c.id from company as c join user as u where u.id=? ] QueryString select c.id from company as c join user as u where u.id=? Either my hql is wrong or something is wrong with the mappings but I can't figure out what.. Does anyone have a clue? Coldfusion 9,0,1,274733, Win7,MySQL 5.5.16 Marc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349880 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: How to search for all occurences of a string in a text?
Thanks, it works now! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348831 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
How to search for all occurences of a string in a text?
Hi, I have a series of texts, each of which I want to search for the occurence of links to images. From each text I want to extract image filenames that end on one of these strings: .gif,.jpg,.jpeg,.png,.bmp Searching a text containing the string img src=http://my.domain.com/path/to/images/testimg.gif; would give me testimg.gif, searching a text containing the strings img src=http://my.domain.com/path/to/images/testimg.gif; img src=http://my.domain.com/path/to/images/testimg.jpg; img src=http://my.domain.com/path/to/images/testimg.png; would give me testimg.gif,testimg.jpg,testimg.png I think REFindNoCase is most suitable for this since it's the only CF function that lets me search for multiple occurences of a pattern I know of. I can't get it to match _all_ occurences of the string I'm looking for. The regular expression I use: (img src ?= ?[|'][https?://]?[a-zA-Z0-9_\-/\\\.^\.jpg]+\.jpg)\s?(\1)* I do this: REFindNoCase(RE,string,1,true) where RE is the above regular expression and string is the string containing 3 img tags with an .jpg resource. This gives me an array containing the starting position and the length of the _first_ element in the string that matches with the regular expression. I can't get it to include all matches in the string. Is my regular expression wrong or is it not possible what I want? Marc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348829 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Webservice not recognized
Hi, Abstract: When I make a call to a webservice in a development environment I get a response as expected. Funny thing is, if I make the exact same call to the same template on a different machine (the testing environment) it does not work. Elaboration: when I make a call in my development environment to this remote method: {hostname}/template/skins/auc/edit/RemoteHomepageEditService.cfc?method=loadHomepageAdvertisement I note 2 things: 1 I get the requested data. In Firebug's Net tab under the request's line 'Html' tab I see the Json response this method returns. 2 If I add cfdump var=#this#cfabort in the body of the method I see a dump of the component in firebug as expected. If I follow the same scenario in a testing environment (call {hostname}/template/skins/auc/edit/RemoteHomepageEditService.cfc?method=loadHomepageAdvertisement 1 I see in Firebug's Net tab under the request line 'Html' nothing (stays blank, no data returned). 2 If I add cfdump var=#this#cfabort in the body of the method I _don't_ see a dump of the method in Firebug. The HTML and Response tab are empty and the Ext component that issued the call is eternally waiting for data. BUT If I put the cfdump var=#this#cfabort in the pseudo-constructor area of the cfc (still on the faulty testing environment) I _do_ get a dump of a cfc in Firebug but it is not a dump of RemoteHomepageEditService.cfc but of Application.cfc in the root of the application! So the component I call is found on both environment but it behaves as if it is Application.cfc. only on te testing environment. I tried removing the extends attribute of the component and minimizig to cfcomponent but that makes no difference. The cfdump still outputs a dump of the Application.cfc instead of itself (RemoteHomepageEditService.cfc) Any hints? CF 8,0,1 Windows server 2003 Thanks, Marc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347268 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Remote component not recognized by CF
Hi, Abstract: When I make a call to a webservice in a development environment I get a response as expected. Funny thing is, if I make the exact same call to the same template on a different machine (the testing environment) it does not work. Elaboration: when I make a call in my development environment to this remote method: {hostname}/template/skins/auc/edit/RemoteHomepageEditService.cfc?method=loadHomepageAdvertisement I note 2 things: 1 I get the requested data. In Firebug's Net tab under the request's line 'Html' tab I see the Json response this method returns. 2 If I add cfdump var=#this#cfabort in the body of the method I see a dump of the component in firebug as expected. If I follow the same scenario in a testing environment (call {hostname}/template/skins/auc/edit/RemoteHomepageEditService.cfc?method=loadHomepageAdvertisement 1 I see in Firebug's Net tab under the request line 'Html' nothing (stays blank, no data returned). 2 If I add cfdump var=#this#cfabort in the body of the method I _don't_ see a dump of the method in Firebug. The HTML and Response tab are empty and the Ext component that issued the call is eternally waiting for data. BUT If I put the cfdump var=#this#cfabort in the pseudo-constructor area of the cfc (still on the faulty testing environment) I _do_ get a dump of a cfc in Firebug but it is not a dump of RemoteHomepageEditService.cfc but of Application.cfc in the root of the application! So the component I call is found on both environment but it behaves as if it is Application.cfc. only on te testing environment. I tried removing the extends attribute of the component and minimizig to cfcomponent but that makes no difference. The cfdump still outputs a dump of the Application.cfc instead of itself (RemoteHomepageEditService.cfc) Any hints? CF 8,0,1 Windows server 2003 Thanks, Marc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347269 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Webservice not recognized
Solved! Turned out that all I needed was an Application.cfc in the same folder as the remote component. That Application extends the /Application.cfc and clears the implicit behaviors (onRequest() etc). Marc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347272 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Remote component not recognized by CF
this was accidently double-posted and is now solved ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347278 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Charge for meetings
I've done botha, and I vote iterative as well. Velocity seems to stay higher, and you can still make the bean counters happy by regularly discussing overall budget, timeline, and number/complexity of changes. It may not work for all clients, but I'd definitely encourage defining and trying both methods. Sean, it would be interesting to learn what source code repository + ticketing system you use. You can't budget on pay us $X an hour and we'll see where it goes. That's how a lot of agile practitioners do work tho'... very successfully (for both them and their clients). But I agree it doesn't work for all clients. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341928 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Is Coldfusion losing it biggest asset?
Or it could be seen as a negative sign that after ten years CF still hasn't been able to shake off the cf is dying stigma. True this. Scour the web - how many other languages have their devoted developers constantly asking this same question over and over? PHP? Ruby? Java? Etc.? Some HAVE actually died in the broadest sense of the word, by being about as low on the technologies chosen for new projects totem pole, but their communities just keep chugging away without a peep, like factory worker children. It's pretty funny how us CFers are always looking in the mirror like some collective Stuart Smalley or something. I haven't used CF9 yet (gasp! He's not on the bandwagon! GET HIM!!), but I know and have come to accept the limitations of CF8 and earlier, and I still make a huge, comfortable living writing useful code in this language. I'll just start to feel good again when someone on one of my favored lurk lists will hold up that damned mirror. CFer's, listen up! You're Good Enough, You're Smart Enough, and Doggone It, People Like You!! ;) Tongue in cheek, of course. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340904 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Is Coldfusion losing it biggest asset?
LOL Stuart Smalley, 2000-present: I don't know what I'm doing. They're gonna cancel the show {kill my programming language}. I'm gonna die homeless and penniless and twenty pounds overweight. Let's balance it out... I was recently reminded by a relative of this useful quote: I have lived a long life and had many troubles, most of which never happened. (Twain) Stop worrying and write code. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340905 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Is Coldfusion losing it biggest asset?
I'm probably going to embarass the s#$t out of myself now, but.. I wrote a painfully long, meandering, stream-of-consciousness blog post on this a couple years ago. I was frustrated, angry, worried, and felt like after years of trying, I had wasted a LOT of time. http://www.advantexllc.com/blog/post.cfm/how-oo-almost-destroyed-my-business Since then, well... I've managed to get the advanced features and OO religion a little more under control. It helped that I switched to a framework that was both simple AND still promoted good OO practices, yet stayed out of my way when I needed to get something done. I'm still learning, but that's the mantra of OO... you never really get it all. Someone once told me that saying you Know OO is like saying you Know Science... it's just such a broad subject and there are always new problems that can be solved any number of ways. ColdFusion is still very easy. Someone else here already said it -- don't solve problems you don't have... if OO isn't called for, even if an entire framework would be overkill... then don't use it. As far as jobs, don't worry about not having one until you don't have one... BUT, pick another language and learn it... one that (also) has market value. For me, I chose to switch from Fusebox (where v3 was the last one with which I had efficient success) to CFWheels. It was attractive because of how it mimics RoR... and if I get time (since I'm so busy with my CF jobs, no lie!!) to actually study RoR, there will now be quite an element of familiarity for me. Aside from being well supported, well coded, and well documented, CFWheels is also a nice gateway drug if you will. Don't let the design pattern police make OO a religion. Choose a framework, when a project appears to be a certain depth, that makes OO in CF as easy as it can be (and remember it's still painfully lacking compared to true OO languages), a framework that helps foster good OO practices WHERE APPROPRIATE. Don't force it, especially with CF... it's a PITA when you go too deep down the rabbit hole with it. My position has changed only a little since my ranting, blog post... but I have been able to start using OO in a bit more sensible way, given the limitations of CF, with the help of CFW and the smart and kind community over yonder. Hope this helps. Marc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340668 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Is Coldfusion losing it biggest asset?
Everyone deserves a second chance Marc :D A second chance to embarrass themselves? I'll take it! I learn a lot when the high and mighty correct me :) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340686 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
How do I get a save/download window using Ajax?
Hi, I have a page with a print button. When I click that button, a pdf is generated by CF and sent to the client using cfdocument, mime-type application/pdf and a header content-disposition so that the pdf is treated as an atachment. That works fine if I don't use Ajax. But I can't get this to work using Ajax. I try to do this using this Jquery: function printInvoice(){ $.ajax({ url:/?event=invoice.print, data:{invoiceId:$(input[name=invoiceId]).attr(value)}, success:function(data){location.href=/?event=invoice.list;}, async:false, type:get }); location.href=/?event=invoice.list; return false; } As you can see, when the pdf is retrieved the onsuccess callback should refresh the page. This refreshing does work but the pdf is not displayed - I don't get a window asking me if I want to save or view the attachment I get when not using Ajax. How can I get this to work? Marc fwiw - I use ModelGlue 3.1 and CF 9.0.1 on Mac OS X. JQuery 1.4.2 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340278 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
How do I get a save/download window using Ajax?
Hi, I have a page with a print button. When I click that button, a pdf is generated by CF and sent to the client using cfdocument, mime-type application/pdf and a header content-disposition so that the pdf is treated as an atachment. That works fine if I don't use Ajax. But I can't get this to work using Ajax. I try to do this using this Jquery: function printInvoice(){ $.ajax({ url:/?event=invoice.print, data:{invoiceId:$(input[name=invoiceId]).attr(value)}, success:function(data){location.href=/?event=invoice.list;}, async:false, type:get }); location.href=/?event=invoice.list; return false; } As you can see, when the pdf is retrieved the onsuccess callback should refresh the page. This refreshing does work but the pdf is not displayed - I don't get a window asking me if I want to save or view the attachment I get when not using Ajax. How can I get this to work? Marc fwiw - I use ModelGlue 3.1 and CF 9.0.1 on Mac OS X. JQuery 1.4.2 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340279 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: How do I get a save/download window using Ajax?
I just see that the Ajax call is getting the pdf data - if I do an alert(data) in the onSucess callback I get the binary data. Question is how to display this binary data ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340280 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
pdf creation hell
Hi, I create a pdf from cf-generated HTML. Part of it is a table with numbers. Most of the table cells contain input type=text with text or numbers inside. I want the fields with numbers in one of the columns to be right-aligned so it is easy to see how they ad up but I am unable to do so. When I view the page (that is to be rendered as pdf) in the browser the numbers are perfectly right-aligned. But when the pdf is generated from that same html/css, the numbers are either left-aligned or centered. I use an included style sheet. The css rule I use to right-align text is text-align:right. I use that in a style I apply to the input field in the table cells. This is my cfdocument tag: cfdocument name=invoice format=PDF pagetype=A4 fontembed=false fontembed=yes gave me the same problem. The rest of the pdf looks Ok so the pdf generator has no problem with the HTML. Just this text - align part. I use CF 9.0.1 on Mac OS X with apache 2.2 Does anyone have an idea what could be causing this? Thanks, Marc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340274 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: pdf creation hell
Hi Marc, Thanks for the reply. I already tried your suggestion before posting and that didn't work so I guess I will parse out the input fields as you suggested. Thanks, Marc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340276 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: pdf creation hell
Hi Marc, Thanks for the reply. I already tried your suggestion before posting and that didn't work so I guess I will parse out the input fields as you suggested. Thanks, Marc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340277 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: (ot) jQuery and char sets
You sound very smart, why didn't you just google this first? Called out and thrown under the bus (no disrespect):) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339976 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: manipulating Excel files
I am aware of the POI utility. Would appreciate an answer to my question if possible. I don't think it's as simple as converting from binary to text and back again (as you've discovered). There's no guarantee that there'll be a one-to-one correspondence between the content of the binary file and the content of the text you pull out. If there were, utilities like POI that understand the binary representation wouldn't be all that useful. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336661 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: manipulating Excel files
There's no guarantee that there'll be a one-to-one correspondence between the content of the binary file and the content of the text you pull out. Yes, I figure it has to do with the way binary files like Excel are laid out. If it were straight as I supposed I should be able to do the conversion like I tried. My question was just out of curiosity why the readbinary-translateToHex-replaceHex-writeBinary method didn't work. I'll look in to the POI utility later. Thanks, Marc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336662 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: manipulating Excel files
Hi, I am aware of the POI utility. Would appreciate an answer to my question if possible. Marc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336648 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: manipulating Excel files
Hi, I am aware of the POI utility. Would appreciate an answer to my question if possible. Marc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336649 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
manipulating Excel files
Hi, recently I wanted to stream an Excel file from the server to a client browser. Before streaming it to the user, I wanted to replace some placeholders in the file (like name,place) with their actual values (#user.name#,#user.place#). So this was the setup: 1 read binary (.xls) template file 2 read binary data and replace every occurence of the placeholder with it's actual value 3 stream the binary data to the client using cfcontent variable=... This cannot be done without converting the binary Excel data to a text format. So I tried BinaryEncode(binaryData,Hex). This gave me the binary data in Hexadecimal format. Then I translated the placeholder (e.g. name) to it's hex representation. Then translated the actual value (e.g. marc) to it's hex representation. Then I did a ReplaceNoCase(a,b,c) where a=the binarydata in HEX format, b=the place holder in hex format, c=the actual value in hex format Then I translated a back to binary using ToBinary() This didn't work since, as I found out, the hexadecimal value for the place holder was never found in the converted binary data (in ReplaceNoCase(a,b,c) ). Why is this approach not working? Is it possible at all to find and replace text values in an excel file this way - so without using things like POI utility? Btw Translating the file to xml is not an option since it contains graphics which are not supported in this format. I do this in CF 8 on WinXP Thanks, Marc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336606 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
WAY WAY OT: Book Readers, and your own words
This is way OT, won't blame anyone a bit if you want to tell me to go pound salt... but you're a creative bunch and we've struggled with this long enough. The situation: Rock band with over 4 hours of music... lots of lyrics. Frequent set changes, meaning that standard 3-ring-binder full of lyrics has to get re-arranged in order to step through a show. Lyrics MOSTLY memorized, but nice to have on stage as back-up for brainfart moments. The Idea: An eBook reader, like a Kindle or some such device, that can flip pages by touching the screen, placed on music stand. Lyrics all assembled in a Word doc, rendered in whatever format necessary to view on said device. Words appearing on screen large enough to be viewed without having to be too up-close-and-personal with the device. Anyone have experience with eBook readers like the Kindle, and is it possible to get your own file(s) onto such a device so that one could simply modify the files when the sets change, and place on the device for performances? Any other ideas? We continue to add songs and tweak the set list order, and it's making the vocalist insane having to keep her book up-to-date. Mine too. Fire up those creative minds and let me know what ideas you have! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336123 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
SOT: HTML spec for mobile devices
I'm looking for a basic web resource coover what would be considered best practices for building a website that will be viewed on mobile devices... a general reference guide/best practices document, that might cover (x)html, css, etc... I can't seem to find the right keywords to Google with. The last mobile xml/html spec I could find was from 2001. I knwo i could just wing it and use basic html and go from there, but I'd rather follow at least a proposed standard, if there is one. Thanks for any links you can provide! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335922 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: (ot) Mail servers
SmarterMail has been GREAT. I switched from a customized qmail solution, and smartermail can handle joe-jobs really well, has great anti-spam configuration and customization per-domain, and uses ClamAV for killing viruses dead. Outbound spam mitigation too. Combined with the ActiveSync license, it works flawlessly with my Droid/touchdown app as far as push technology goes. Can't recommend it enough, and no, I don't work for SmarterTools. For those out there who actually run e-mail servers for your clients, I'm curious what you're running and how happy you are with it. We're currently using modusMail for Windows here, but it's been years since I took a look at the e-mail server landscape. So what's hot right now? SmarterMail? MDaemon still around? Curious about current experiences with e-mail server software before I start looking around for better licensing terms. Thanks! -Justin Scott ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335137 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Seriously PO'd - cfqueryparam and/or struct dereference flakes out
Thanks everyone, You were all correct - god help me I was actually focusing on the error CF gave me, trusting that alone. Go figure. What a rotten thing to do! :) A different value was the culprit, and the suggestion below absolutely applies. Thank you all so much -- this is what happens when we get tired, and I always appreciate the fresh perspective of the community during such times! It's a bit more code, but if you switch to having a cfargument tag for each parameter and enforce the type there, you can pass in your struct as an argument collection. You'll get a more meaningful error that way. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334851 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Seriously PO'd - cfqueryparam and/or struct dereference flakes out
The function below was written literally MONTHS ago. Worked fine the whole time, even today... then suddenly it's throwing the error: Invalid data '' for CFSQLTYPE CF_SQL_INTEGER. The error points to the line in the WHERE clause, referencing a.articleId. Next, I purposely set the output=true on this function, and did a cfdump of #a.articleId# -- it's definitely a valid integer. but it's now choking on it for some reason. as a test, i hard coded an article id into the where clause, removing the cfqueryparam. with a hard coded number, it chokes on the next cfqueryparam up. if i reference #a.articleId# directly (outside of cfqueryparam), I also get the same error. how can a.articleId suddenly become '' right after dumping it and successfully showing it to be an integer?? I've restarted both the cf server and the database server, wondering if there was some sort of strange hangup there... no joy. I'm losing my mind... help!! cffunction name=updateArticle returntype=void access=private output=true cfargument name=structArticle required=true type=Struct hint=A structure containing all fields of an article, and the values to be saved. cfset var a = arguments.structArticle cfset var qUpdateArticle = !--- uncommenting this line gives me a valid integer on screen --- !--- cfdump var=#a.articleId#cfabort --- cfquery name=qUpdateArticle datasource=#request.dsn# UPDATE Article SET categoryId = cfqueryparam value=#a.categoryId# cfsqltype=cf_sql_integer /, title = cfqueryparam value=#a.title# cfsqltype=cf_sql_varchar /, byLine = cfqueryparam value=#a.byLine# cfsqltype=cf_sql_varchar /, imageId = cfqueryparam value=#a.imageId# cfsqltype=cf_sql_integer /, imageCaption = cfqueryparam value=#a.imageCaption# cfsqltype=cf_sql_varchar /, abstract = cfqueryparam value=#a.abstract# cfsqltype=cf_sql_varchar /, body = cfqueryparam value=#a.body# cfsqltype=cf_sql_varchar /, isLead = cfqueryparam value=#a.isLead# cfsqltype=cf_sql_bit /, publishDateTime = cfqueryparam value=#a.publishDateTime# cfsqltype=cf_sql_timestamp / WHERE articleId = cfqueryparam value=#a.articleId# cfsqltype=cf_sql_integer / /cfquery /cffunction ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334818 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: How to loop over a dataset twice.
I am trying to loop over a dataset twice. I am trying using CFLOOP but the 2nd CFLOOP will not process. And I'm willing to bet that whatever you're doing, you can do it in one loop, too :) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334403 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Mail Server Software
Does anybody know of a good mail server with some sort of SQL or CF integration? A few years back we were looking at IMS mail server. Not sure what type of integration you're looking to accomplish, but we have had a great experience with SmarterMail (http://www.smartertools.com) overall, and I know they have at least some sort of API. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333544 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Multi-axis charts in CF8?
Hi, Just wondering - I know that in Coldfusion 8 you can have a chart with multiple data series. BUT is it also possible to have multiple axes - so that each data serie can have it's own y-axis? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332973 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
onSessionEnd not firing
Hi, I can't see my sessionvariables change when the session is expired. This is what I try: 1 In /Application.cfc in the constructor area: cfset THIS.sessionTimeOut = #CreateTimeSpan(0, 0, 0, 10)# cfset THIS.sessionManagement = true 2 onRequestStart I do: cffile action=append file=#ExpandPath(/)#lablog.txt addnewline=true output=#TimeFormat(Now(),HH:mm:ss)#: This is the onRequestStart handler firing. onsessionStart I do: cffile action=append file=#ExpandPath(/)#lablog.txt addnewline=true output=#TimeFormat(Now(),HH:mm:ss)#: This is the onsessionStart handler firing [#session.sessionId#-#session.URLToken#] onsessionEnd I do: cffile action=append file=#ExpandPath(/)#lablog.txt addnewline=true output=This is the onsessionEnd handler firing [#arguments.sessionscope.sessionId#-#arguments.sessionscope.URLToken#] (The sessionScope and ApplictionScope are arguments passed to the onSessionEnd function) My output is 1 23:04:30: This is the onsessionStart handler firing [f03024bf2eba70764b56755b7b2255662cc7-CFID=11288CFTOKEN=78872746jsessionid=f03024bf2eba70764b56755b7b2255662cc7] 2 23:04:30: This is the onRequestStart handler firing. 3 23:04:40: This is the onRequestStart handler firing. 4 23:04:54: This is the onRequestStart handler firing. 5 23:05:11: This is the onsessionStart handler firing [f03024bf2eba70764b56755b7b2255662cc7-CFID=11288CFTOKEN=78872746jsessionid=f03024bf2eba70764b56755b7b2255662cc7] 6 23:05:11: This is the onRequestStart handler firing. (I put line numbers for clarity) After the sessionTimeout elapsed on line 5 (request is more than 10 seconds after previous request) the onSessionStart handler gets called. That's expected. But: Why are the values for cookies the same as before? I thought expired cookies don't get sent by the browser anymore. But maybe I am mistaken and the CF server checks if cookies are expired? Why is the onSessionEnd handler not called? If I remove the ## stuff in onSessionEnd() so there's just text logged, it also does not appear in my log, suggesting it does not fire. This is bad since I cannot rely on a sessionEnd e.g. handler to end a user session via cflogout Is the sessionmechanism in CF buggy? Marc I use CF 8,0,0,176276 on Win XP SP3 ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330843 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Charting in CF8
Hi, I am looking for a charting component that allows the user to 1 show multiple series in 1 chart 2 show a value scale for each series 3 toggle each serie on/off 4 zoom in an part of the chart Option 1 is possible with Coldfusion built-in cfchart, 2, 3 and 4 not - as far as I can see. I already checked Powercharts, FusionCharts and Webcharts 3d. None of these offer all features mentioned. Does anyone know of a solution that offers all of these features? Thanks ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330464 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: IE8 is killing my website
This seems to only be a problem on Windows XP. Myself nor my clients have problems with IE8 on Vista or Windows 7. I believe our problem involves XP, Vista, and 7, though I'll need to go back through some of the debug output that some of the problem users have sent. Are your users on a network on an Active Directory domain with a domain policy? If the Server hasn't been updated with the new IE8 policies, then it defaults to the IE7 policies which are different than IE8. No idea - these are all public visitors at various locations. In the Internet options, particularly the Privacy tab, the Medium setting restricts 1st party cookies that save information that can be used to contact you without consent. This setting is default in IE8. What do they classify as information that can be used to contact you without consent -- is there a specific list of things that the cookies are analyzed to contain, to meet that criteria? If you're using an older version of CF server than 8, it may be time to think about upgrading. I have not had any issues with IE8 on any Windows platform with 1st party cookies. We are on CF8. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330380 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: IE8 is killing my website
Are your users using the in private browsing feature? My understanding is it rejects cookies that look like tracking cookies. ~Brad Hi Brad, It's hard to tell for all of them, but the users I saw were not using InPrivate. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330345 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: IE8 is killing my website
Try setting this Meta tag in you document head: meta http-equiv=X-UA-Compatible content=IE=EmulateIE7 That may solve your issue. Robert B. Harrison This tag's been in place for a couple weeks; no effect. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330354 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: IE8 is killing my website
What security zone is your site in, in the affected browsers? Are the cookies the standard CF session tokens (CFID/CFTOKEN or JSESSIONID)? Or are you doing something else? Are you setting the cookies for the same host that the user is visiting? Dave Watts Security zone is usually the defaults from what i can tell. CFID/CFTOKEN are the tokens in use. I thought about switching to JSESSIONID, but I've never done it, and have no idea how it would affect the app or all the apps on the server. Advice on that is welcome, of course... it's it a transparent switch? I assume all existing cookie-holding users would be logged out... (that could be a show-stopper right now...) ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330355 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: IE8 is killing my website
If you can convince a gracious user to let you, maybe try debugging the cookie settings process on their machine? Might have to go so far as doing FF plugins and whatnot, but maybe something simple like having it prompt to set cookies will shed light on what's happening? FWIW, I've seen cookie setting problems when the cookiePath wasn't rewritten, if you're doing URL rewrites-- but you'd have been having problems before IE8 if that was the case. Here's to hoping the meta-tag fixes it! :den Did in fact observe two or three users. In all cases, the cookie simply wasn't being set (through observation of the Temporary Internet Files folder). In each case, eventually it just started working -- after trying several different things -- with no consistency as to which thing worked in any of the cases. I don't believe this is a CFLOCATION or URL rewrite issue... users are all at the correct domain from the start. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330356 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: IE8 is killing my website
There are very few transparent switches in any computing environment, unfortunately. AGREED!! The same goes for life, LOL :) I would recommend that you try to set CFID and CFTOKEN as non-persistent cookies, instead of just switching to JSESSIONID (although I'd recommend that also, in the long run). You can do that by writing the cookies yourself in Application.cfc/cfm. I think I know what you mean by writing these cookies myself... but can you show me via some code? Thanks Dave, much appreciated... ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330362 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: IE8 is killing my website
I have heard that if you replicate this tag as a cfheader tag, it works. (although I don't know why) The tag is in the HTML head, inserted via CFHTMLHEAD. is this what you mean? (meta tags belong in the document head anyway, per HTML 4.01 standard...?) ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330364 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: IE8 is killing my website
I have heard that if you replicate this tag as a cfheader tag, it works. (although I don't know why) This blog attempts to explain why: http://ilia.ws/archives/196-IE8-X-UA-Compatible-Rant.html Apparently it depends on your doc type. Some doc types ignore custom meta tags, rendering them useless. The HTTP header value overrides the doc type. ~Brad so is it safe to put it in both the HEAD block in the markup *and* in the header? Would this be the correct CFHEADER? [ cfheader name=X-UA-Compatible value=IE=EmulateIE7 ] ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330366 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Generating multiple pdf in a loop design problem
Hi, I have a client that wants to be able to print certificates (pdf's) for their clients. What I do is retrieving a query resultset. Then i use cfdocument: cfdocument format=PDF pageType=A4 margintop=0 marginbottom=0 marginright=0 marginleft=0 unit=cm backgroundvisible=no overwrite=no fontembed=yes scale=100 Then within a cfoutput tag I have html to position the dynamic content from myQueryResultset along with static content (texts and images). I use styles to position divs. I use an htmlvalidator to validate my html and it validated ok. This works fine when my query resultset contains 1 row: I get 1 pdf with all content in the correct position. But when myQueryResultset contains multiple rows I get multiple pdfs but the layout of the pdfs gets messed up: The first pdf is empty, on subsequesnt pdfs the position of the divs is changed and also their relative position changed. Excerpt of the stylesheet I use: style type=text/css body{ font-family: Arial, Helvetica, sans-serif; } ..Ondergetekenden { position: absolute; top: 114mm; left: 30mm; font-size: 13pt; } ..Cursist { position: absolute; top: 131mm; left: 30mm; font-size: 26pt; font-weight: bold; } ..Geboren { position: absolute; width: 20 cm; top: 153 mm; left: 30 mm; font-size: 13pt; } Some other things: HTML validates OK; Including the styles in a style block or including it as an external style sheet makes no difference. Do I have to use tables instead of divs? Do I have to use inches to position divs instead of mm? Inline styles? Also specify bottom attribute in the styles? I hope someone can point me in the right direction to render pdfs correctly. Thanks, Marc ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316176 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Internal Page Links with CF
sorry for the question as i know i have read it before but can't remember. in CF, when i want to have internal links - like a href=#name but name is a variable: a href=##name# how do i do without the ## that messes up the output? thanks ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315150 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Internal Page Links with CF
correct. thanks for the help. - Original Message - From: Charlie Griefer [EMAIL PROTECTED] To: cf-talk cf-talk@houseoffusion.com Sent: Wednesday, November 12, 2008 12:57 PM Subject: Re: Internal Page Links with CF Since #name# is a variable in this case, I'm assuming it's inside cfoutput tags. On Wed, Nov 12, 2008 at 9:52 AM, Wil Genovese [EMAIL PROTECTED] wrote: You only need to escape pound signs when inside CFOUTPUT tags. On Wed, Nov 12, 2008 at 11:41 AM, Marc Raber [EMAIL PROTECTED] wrote: sorry for the question as i know i have read it before but can't remember. in CF, when i want to have internal links - like a href=#name but name is a variable: a href=##name# how do i do without the ## that messes up the output? thanks ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315155 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Issue with XML
I am working on a project that needs to parse through and xml file and add new xml elements to specific child tags. I have been able to accomplish adding the elements in the positions that I need them, but when I re write them to a file the xml attributes show up as uppercase. Here is my example. Unfortunately, the application that reads the xml relies on the values to be be mixed case so I just can't lcase the output when writing the file. Any help is greatly appreciated. *This is the xml that is currently in the file* component articlenumber= description=Fan id=15 imagefile= name=Fan popuptext= type=CMC-TC FAN uniqueid=module(riwatchit_communication_module_urb1889)/snmp( 10.38.0.225)/PU(1)/CU(fan) location path=1/2/ technicalreference path=12/13/ variablereference eventfilterlevel=0 owner=true showfilterlevel=0 variableid=7/ variablereference eventfilterlevel=0 owner=true showfilterlevel=6 variableid=8/ variablereference eventfilterlevel=0 owner=true showfilterlevel=0 variableid=9/ variablereference eventfilterlevel=0 owner=true showfilterlevel=6 variableid=10/ variablereference eventfilterlevel=0 owner=true showfilterlevel=1 variableid=11/ variablereference eventfilterlevel=0 owner=true showfilterlevel=3 variableid=12/ variablereference eventfilterlevel=0 owner=true showfilterlevel=3 variableid=13/ variablereference eventfilterlevel=0 owner=true showfilterlevel=3 variableid=14/ right name=read role=default/ right name=settings role=default/ property editable=false name=Host type=IP-Address10.38.0.225 /property /component *This is the xml that I create and add* component ARTICLENUMBER=7320.240 DESCRIPTION=Rittal PDU ID=16 IMAGEFILE= NAME=Rittal PDU POPUPTEXT= TYPE=Rittal PDU UNIQUEID=module(riwatchit_communication_module_urb1889)/snmp( 99.99.99.99)/PU(1)/CU(fan)/varId(1.3.6.1.4.1.2606.100.1.2.5.1.10.1.2)location PATH=1/2/technicalreference PATH=3/14/right NAME=read ROLE=default/right NAME=settings ROLE=default/property EDITABLE=false NAME=Host TYPE=IP-Address99.99.99.99/propertyproperty EDITABLE=false NAME=Port TYPE=Integer5/propertyvariablereference EVENTFILTERLEVEL=0 OWNER=true SHOWFILTERLEVEL=0 VARIABLEID=15/variablereference EVENTFILTERLEVEL=0 OWNER=true SHOWFILTERLEVEL=0 VARIABLEID=16/variablereference EVENTFILTERLEVEL=0 OWNER=true SHOWFILTERLEVEL=0 VARIABLEID=17/variablereference EVENTFILTERLEVEL=0 OWNER=true SHOWFILTERLEVEL=0 VARIABLEID=18/variablereference EVENTFILTERLEVEL=0 OWNER=true SHOWFILTERLEVEL=0 VARIABLEID=19/variablereference EVENTFILTERLEVEL=0 OWNER=true SHOWFILTERLEVEL=0 VARIABLEID=20/variablereference EVENTFILTERLEVEL=0 OWNER=true SHOWFILTERLEVEL=0 VARIABLEID=21/variablereference EVENTFILTERLEVEL=0 OWNER=true SHOWFILTERLEVEL=0 VARIABLEID=22/variablereference EVENTFILTERLEVEL=0 OWNER=true SHOWFILTERLEVEL=0 VARIABLEID=23/variablereference EVENTFILTERLEVEL=0 OWNER=true SHOWFILTERLEVEL=0 VARIABLEID=24//component/project ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314400 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Help with cgi server
i've created a table in my db that allows the header and footer to adjust depending on the subdomain. basically the code calls: cfquery name=partner datasource=#dsn# SELECT * FROM Partners WHERE URL = '#cgi.server_name#' /cfquery it is recognizing the root domain (www.domain.com) but getting a page not found error when dealing with any of the subs. do i need my hosting company to make any adjustments to accommodate subdomains (#url#.domain.com) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314370 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Help with cgi server
i've created a table in my db that allows the header and footer to adjust depending on the subdomain. basically the code calls: cfquery name=partner datasource=#dsn# SELECT * FROM Partners WHERE URL = '#cgi.server_name#' /cfquery it is recognizing the root domain (www.domain.com) but getting a page not found error when dealing with any of the subs. do i need my hosting company to make any adjustments to accommodate subdomains (#url#.domain.com) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314371 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Clearing task queue for cfthreads
Hi guys, I have been working at learning to use the tag cfthread in order to update information from a large text file into a table. The text file is not formatted correctly to use a bulk insert process in SQL. Anyways, I have reached the maxxed capacity for the task queue and was wondering how I can clear the tasks out or do I have to wait for it to do it itself. Thanks Marc Edwards Rittal Corporation Springfield, OH ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313926 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
How to uninstall coldfusion on ubuntu 8.04
Hi, I am moving from Windows XP to Ubuntu 8.04 andstill have a few hurdles to take. I installed the multiuser version of Coldfusion 8.01 using an external webserver (Apache). This didn't work. Now I want to uninstall CF, reinstall CF using the built in webserver and then connect to Apache. However I can't see an option to uninstall CF and coming from windows I am used to uninstall software first before reinstallnig it. Do I have to uninstall CF first before reinstalling it or do I just install again? Thanks ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310450 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Application.names and sessions
Sounds plausible. I checked my session variables from the debugging window and I found values for CFID CFTOPKEN sessionId jsessionId the values of these variables do _not_ change when I go from Application A to Application B and vice versa. To check I do: in Application A: cfset session.test=test app a cfdump var=#session# label=#APPLICATION.applicationname# Here session.test show the value test Application a and in Application B cfdump var=#session# label=#APPLICATION.applicationname# cfabort When requesting a page in Application B there is no session.test So it looks like Coldfusion uses the same session variables (CFID,CFTOKEN,sessionId,JsessionId) for 2 different applications but underneath they are 2 different memory pools. Why I want to know this is because I want to retain some information when switching between Application A and Application B. In Application A I login, if I then request a page from Application B I want Application B to see I'm already logged in (sort of Single Sign on). So in App A I log in; I store the jsessionId along with a value 1 for login in a table users:login; I send id=#jsessionId# as a URL parameter to the request of a page in App B; in App B I lookup the value of login using the value of URL.id; If found I know I'm logged in and change users:login to the value of jsessionId in Application B. If I go back to app A I do the same check on table users:login so I don't lose my login status when I switch from App A to App B and vice versa, So this works event thouigh the ids for Application A and Application B are identical... Is this a failsafe approach? I don't knowe much about SSO so I am curious about your comments. Shoot at it ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308483 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Application.names and sessions
Just for my understanding about applicationname and sessions. If I have a file named /appA/index.cfm with an Application.cfc in the same folder and this Application.cfc specifies THIS.name=A in the constructor area and if I request a page from this directory for the 1st time, onSessionStart fires and sessioncookies are set with the client. From then on, whenever I request a page from the same domain that is preceded by this Application.cfc (with THIS.name=A in the constructor area) the same session gets used (until it times out). An applicationname is merely used to tag a set of variables to belong together. (What Is A ColdFusion Application? by Ben Nadel) Right? So what happens if I request a page on the same domain but in another folder (say /appA/appB that has its own Application.cfc in that same folder (/appA/appB) but this one specifies THIS.name=B in the constructor area? I thought: since the Application.cfc specifies another THIS.name, onsessionstart gets fired, new sessioncookies are sent in the response and as long as I request pages that are preceded by this Application.cfc I use this session. I had a setup like this but found out to my surprise that when I switch from the 1st to the 2nd scenario (using the application.cfc with THIS.name=B), the value for session.sessionId did not change. And all my sessionvariables were still there. Why is this? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308348 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
OT - Apache Mod Rewrite
Hello, This question is about an Apache configuration problem I have recently. I hope someone can help here! In order to view the websites I develop locally easily I set up Apache mod rewrite to map a url to a directory on the local filesystem. This way I do not have to make a Virtual directory for every project but the URL is being rewritten to map to a directory on the local system. Here's the setup: I set up an A record in the DNS of my domain to point back to the local machine wjenI use a special prefix in the URL: *.local 127.0.0.1 (saying every subdomain ending with .local is to be redirected to localhost) I set up Apache's httpd.config Mod Rewrite like this: LoadModule rewrite_module modules/mod_rewrite.so (remove the comment - # - sign) RewriteEngine on RewriteCond %{HTTP_HOST} (.*)\.local.mydomain.com RewriteRule (/.*) D:/www/wwwroot/%1/$1 (saying: every request ending on local.mydomain.com has to be rerouted to the directory D:/www/wwwroot/whatever preceded .local.mydomain.com/whatever followed.local.mydomain.com) This worked fine: if I had a directory d:/www/shipyards/q.cfm all I had to enter in my address bar was http://shipyards.local.mydomain.com/ q.cfm and q.cfm was served. Until yesterday, the same url (http://shipyards.local.mydomain.com/q.cfm) only gives me this response --- Bad Request Your browser sent a request that this server could not understand. --- Apache_error log gives this: [Sat Jun 14 13:29:10 2008] [error] [client 127.0.0.1] Invalid URI in request GET / HTTP/1.1 [Sat Jun 14 13:29:20 2008] [error] [client 127.0.0.1] Invalid URI in request GET /q.cfm HTTP/1.1 Apache access log gives this: --- 127.0.0.1 - - [14/Jun/2008:13:29:10 +0200] GET / HTTP/1.1 400 226 127.0.0.1 - - [14/Jun/2008:13:29:20 +0200] GET /q.cfm HTTP/1.1 400 226 --- I have no idea why the web browser doesn't recognize these requests anymore and there is nothing that comes to mind I might have changed that caused this behaviour. I tried setting up Virtual Hosts to circumevent the problemn but there Apache won't start for other errors in the config file. And actually I want the situations with Mod rewrite back as before. Can anyone here help me out? Thanks! Windows XP SP2 WAMP Server: Apache 2.2.8 FireFox 2.0.0.14 / IE 7.0.5730.13 ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307482 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: OT - Apache Mod Rewrite
Ok, I found it. Somehow the local system account was removed from the list of accounts having access to D:. After adding it everything worked as before. A clue was given by Perfectdisk who reported You appear to have lost a disk. Thanks ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307493 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Convrt Access to Excel via XML
Hello, I have an Access DB that has to be converted to a Excel spreadsheet. The spreadsheet contains formatting and formulas (it's used as an analysis tool). I have an example of the spreadsheet in XML format. So that example also contains the styling, formulas and data. What I need to make is a cf page that reads the db, converts it to XML so that it can be read by Excel. The formatting and formulas (as they are in the example) have to applied to it as well. Whats the best approach? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307322 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Convert Access to XML
Hi I have an access db with 162934 rows and some 30 columns. I need to convert it to XML. Does anyone have any tips/comments on the best approach? Thanks. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306023 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
onSessionend never fires
The subject says it all- I can't get my onSessionend to execute. For testing, all I do is a call to a log file. The sessionTimeout is 2 secs. I hit the page. Wait 2 secs. Hit the page again. Switch over to the Coldfusion administrator to the logging page. There is no log by the name of onSessionEnd as specified. What can be the reason? Here's the code. Application.cfc: cfcomponent extends components.ApplicationRoot cfcomponent ApplicationRoot: cfset THIS.applicationTimeOut=CreateTimeSpan(2,0,0,0)\ cfset THIS.sessionmanagement=true cfset THIS.setclientcookies=true cfset THIS.sessionTimeOut=CreateTimeSpan(0,0,0,2) cffunction name=onSessionEnd access=public description=perform actions on session end output=false cfargument name=sessionscope type=struct cfargument name=applicationscope type=struct cflog file=onSessionEnd application=true text=hello, this session has ended /cffunction You see I use a root Application.cfc that has all shared functionality. I only overide specific parts (like THIS.name) in the extending Application.cfc components Oh, if I explicitly call onSessionEnd in Application.cfc via createobject* the code executes correctly ansd a log by ythe name of onSessionEnd is created. Thanks for any tips. * from http://www.coldfusionmuse.com/index.cfm/2005/6/21/cfmx7_onsessionend ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304709 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Extending Application.cfc using a mapping question
Hello, I have a folder components off the webroot. I have 2 applications, A and B, both in their own webroot. I want both of them to extend the Application.cfc in the folder components. So: D:www/components/ApplicationRoot.cfc is extended by D:/www/wwwroot/ApplicationA/Application.cfc and D:/www/wwwroot/ApplicationB/Application.cfc. To get this working I put this in D:/www/wwwroot/ApplicationA/Application.cfc: cfcomponent extends=components.ApplicationRoot. output=false cfset THIS.name=#HTTP.REMOTE_HOST# cfset THIS.mappings={} cfset THIS.mappings[/components]=D:/www/components /cfcomponent But when I request /ApplicationA/nidex.cfm all I get is Could not find the ColdFusion Component or Interface components.ApplicationCMS. Am I doing somehing wrong here? Thanks, Marc ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304639 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Extending Application.cfc using mappings
Hello, I want to extend ApplicationCMS.cfc I have in an off-webroor folder. I am on a shared hosting environment so I want to create my mappings in Application.cfc, not in Cfadministrator. The mappings are not recognized this way. When I create a mapping in the administrator (locally) it works. Here is the setup: D:/www/components/ApplicationCMS.cfc will be extended by D:/www/wwwroot/ApplicationA/Application.cfc and D:/www/wwwroot/ApplicationB/Application.cfc In D:/www/wwwroot/ApplicationA/Application.cfc I put: cfcomponent extends=components.ApplicationCMS output=false cfset THIS.name=#HTTP.REMOTE_HOST# cfset THIS.local = CGI.REMOTE_HOST eq 127.0.0.1 cfset THIS.mappings={} cfset THIS.mappings[/components]=D:/www/components /cfcomponent If I request /ApplicationA/index.cfm I get Could not find the ColdFusion Component or Interface components.ApplicationCMS. Apparently the mappping is not working. Does anyone know how it can be fixed? Marc ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304640 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Extending Application.cfc using mappings
sorry for the double posting - it takes a while before posts get through here so I thought it got lost somehow (or I didn't post at all...). I googled and found this on http://groups.google.com/group/farcry-beta/browse_thread/thread/7ec1c03df22675af suggesting mappings don't work with the extend keyword. Application Specific Mappings are a furphy and do not work as advertised in CF8. It appears that cfimport and extends do not adhere to application specific mappings as defined in Application.cfc in the same way they do to CFIDE based cf mappings. The two types of mapping despite having the same name are very different in practice. As we use inheritance and cfimport a great deal in FarCry this makes using this feature near impossible. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304645 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Retrieve the auto generated key from a MySQL resultset
From the docs @ cfquery - The cfquery tag also returns the following result variables in a structure. You can access these variables with a prefix of the name you specified in the result attribute.[...] result_name.GENERATED_KEY MySQL only. The ID of an inserted row. MySQL 3 does not support this feature. - So I try this in MySQL client version: 5.0.45: cfquery name=qInsertAuthors datasource=cms username=www password=gHe6i2Gyi INSERT INTO authors( firstname, lastname, title, gender, pseudonym, notes) VALUES( '', '', '', '', '', ''); /cfquery cfdump var=#qInsertAuthors# I get Variable QINSERTAUTHORS is undefined. Also after I add AlwaysReportTriggerResults=true to the connection string of the dsn (mentioned in the comments section of the page). As far as I can see this feature works not as advertised. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304654 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Session variables expiration issue
Hello, Just a basic question about session variables.I can't get them to 100% work as I want. Maybe I don't understand so that's when it's time to turn to the list :) I want to use session variables that expire a) when the user closes the browser OR b) when a session times out,whatever comes first. For a) I do (all in Application.cfc): cfset THIS.sessionmanagement=yes cfset THIS.sessiontimeout=#CreateTimeSpan(0,0,0,10)# cfset THIS.setclientcookies=false and cffunction name=onSessionStart access=public description=initialize session parameters output=false returntype=void cfcookie name=CFID value=#SESSION.CFID# cfcookie name=CFTOKEN value=#SESSION.CFTOKEN# cfreturn / /cffunction This makes that sessions expire when user closes browser. For b) add the expires tag to CFCOOKIE with the value specified in THIS.sessiontimeout: if the user does a request _after_the specified timeout period, the CFID/CFTOKEN cookies are not valid anymore (expires has a datetime value that is in the past) so coldfusion will create new values for SESSION.CFID and SESSION.CFTOKEN and call onSessionStart. Setting 2 new cookies with new values for value and expires. cffunction name=onSessionStart access=public description=initialize session parameters output=false returntype=void cfcookie name=CFID value=#SESSION.CFID# expires=#THIS.sessiontimeout# cfcookie name=CFTOKEN value=#SESSION.CFTOKEN# expires=#THIS.sessiontimeout# cfreturn / /cffunction To test this I added cfdump var=#SESSION# to the onRequest() function. It turned out that the values displayed in the dump did never change after a 2nd whether that request was within the timespan OR after. That's strange. I thought that if the 2nd request is after the timepout period new values for CFID/CFTOKEn are generated. Am I wrong? And if so, is it possible what I want? Marc ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304687 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Session variables expireation issue
Hello, Just a basic question about session variables.I can't get them to 100% work as I want. Maybe I don't understand so that's when it's time to turn to the list :) I want to use session variables that expire a) when the user closes the browser OR b) when a session times out,whatever comes first. For a) I do (all in Application.cfc): cfset THIS.sessionmanagement=yes cfset THIS.sessiontimeout=#CreateTimeSpan(0,0,0,10)# cfset THIS.setclientcookies=false and cffunction name=onSessionStart access=public description=initialize session parameters output=false returntype=void cfcookie name=CFID value=#SESSION.CFID# cfcookie name=CFTOKEN value=#SESSION.CFTOKEN# cfreturn / /cffunction This makes that sessions expire when user closes browser. For b) add the expires tag to CFCOOKIE with the value specified in THIS.sessiontimeout: if the user does a request _after_the specified timeout period, the CFID/CFTOKEN cookies are not valid anymore (expires has a datetime value that is in the past) so coldfusion will create new values for SESSION.CFID and SESSION.CFTOKEN and call onSessionStart. Setting 2 new cookies with new values for value and expires. cffunction name=onSessionStart access=public description=initialize session parameters output=false returntype=void cfcookie name=CFID value=#SESSION.CFID# expires=#THIS.sessiontimeout# cfcookie name=CFTOKEN value=#SESSION.CFTOKEN# expires=#THIS.sessiontimeout# cfreturn / /cffunction To test this I added cfdump var=#SESSION# to the onRequest() function. It turned out that the values displayed in the dump did never change after a 2nd whether that request was within the timespan OR after. That's strange. I thought that if the 2nd request is after the timepout period new values for CFID/CFTOKEn are generated. Am I wrong? And if so, is it possible what I want? Marc ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304686 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Session variables expireation issue
Ok, I found the cause: onSessionStart() cfset THIS.sessionTimeout = #CreateTimeSpan(0,0,0,10)# cfoutput#THIS.sessionTimeout #/cfoutput outputs 10. Which means 10 days since the createTimespan() function returns units of days (eg CreateTimespan(1,0,0,0)eq 1 and CreateTimespan(0,12,0,0) eq 0.5) onApplicationStart() THIS.sessiontimeout=CreateTimeSpan(0,0,0,10) cfoutput#THIS.sessiontimeout#/cfoutput outputs 0.000115740740741 which equals 10 secs. Why the same variable (THIS.sessiontimeout) gives a different value in the onApplicationStart() and onSessionStart() handler is beyound me. If I cfdump the THIS scope in both handlers they are identical except for the value of sessiontimeout and applicationtimeout. Marc ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304693 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Application scope not recognized in onError()
Hello, In Application.cfc I have this cffunction name=onApplicationStart access=public description=initialize application parameters output=false returntype=boolean [...do stuff...] cfset APPLICATION.localIps=127.0.0.1,62.194.197.93 cfreturn true /cffunction and cffunction name=onError access=public output=true returntype=void cfargument name=exception type=Any required=true cfargument name=eventName type=string required=false default= cfif ListFind(APPLICATION.localIps,CGI.REMOTE_ADDR) cfoutputError on event: [#arguments.eventname#]/cfoutput cfdump var=#arguments.exception# cfelse cfinclude template=/includes/error.cfm /cfif /cffunction When I call a page it gives me this error: Element LOCALIPS is undefined in APPLICATION. 107 : cfif ListFind(THIS.localIps,CGI.REMOTE_ADDR) Why doesn't Coldfusion recognize this key in the Application scope? I set it allright. Also, if I change APPLICATION to THIS in both onApplicationStart and onError it cannot find localIps in THIS. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304528 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Application scope not recognized in onError()
Is it possible that the error happens during application startup? In this case, the application scoped variable would not be defined yet. -- Josh Yes I figured already out that was the problem. If I look at the processed templates in the executiontab of the debugwindow I see that only Application.cfc:onapplicationStart() was processed before the onerror method gets called. Dump te error gave me te erro cause Solved! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304534 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
APPLICATION scope unknown in Application.cfc
Hi, I have this in my Application.cfc: cffunction name=onApplicationStart access=public hint=Initialize application parameters cfset basepath = #Left(ExpandPath('.'),FindNoCase(wwwroot,#ExpandPath('.')#)-1)# cfset APPLICATION.mappings={} cfset APPLICATION.mappings[/components]=D:\home\mydomain\components cfset APPLICATION.mappings[/includes]=D:\home\mydomain\includes cfset APPLICATION.localIps=127.0.0.1 cfset DBData={} cfset DBData.dsn_cms=cms cfset DBData.dsn_users=users cfset DBData.dsn_guestbook=guestbook cfset DBData.dsn_username=www cfset DBData.dsn_password=[EMAIL PROTECTED] cfset DBData.maxStringLength=25 cfset APPLICATION.objects = {} cfset APPLICATION.objects.security = CreateObject('component','components.security').init(authorization='public',language=Left(CGI.HTTP_ACCEPT_LANGUAGE,2)) cfset APPLICATION.objects.util = CreateObject('component','components.util') cfset APPLICATION.objects.db = CreateObject('component','components.db').init(DBData=dbData) cfset APPLICATION.objects.cms = CreateObject('component','components.cms').init() cfset APPLICATION.objects.json= CreateObject('component','components.json') /cffunction and cffunction name=OnError access=public output=true returntype=void cfargument name =exception required=true cfargument name =eventName required=true cfif ListFind(APPLICATION.localIps,CGI.REMOTE_ADDR) cfdump var=#arguments# cfelse cfinclude template=/includes/error.cfm /cfif /cffunction This gives me an error onRequestStart: Could not find the ColdFusion Component or Interface components.security. D:\www\wwwroot\cms\Application.cfc:28 (Line 28 = cfset APPLICATION.objects.security = CreateObject('component','components.security').init(authorization='public',language=Left(CGI.HTTP_ACCEPT_LANGUAGE,2)) in onApplicationStart) I have no clue why the onError method doesn't have access to the Application scope. Can anyone clarify this? Thanks, Marc ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304356 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: APPLICATION scope unknown in Application.cfc
Hi Brian, You're right, I put the question wrong. Sorry about that. The issue is this: if I define 2 mappings like this cfset THIS.mappings={} cfset THIS.mappings[/components]=D:\www\components cfset THIS.mappings[/includes]=D:\www\includes outside onApplicationstart() but inside the constructor area and I later use them with CreateObject() the components are instantiated correctly. But if I put those 3 lines inside the onApplicationStart() and use APPLICATION.mappings instead of THIS.mappings like this: cffunction name=onApplicationStart cfset APPLICATION.mappings={} cfset APPLICATION.mappings[/components]=D:\www\components cfset APPLICATION.mappings[/includes]=D:\www\includes cfset APPLICATION.objects = {} cfset APPLICATION.objects.security = CreateObject('component','components.security') I get the errormessage Could not find the ColdFusion Component or Interface components.security. when the line with CreateObject() is read. That line processed OK when using the 1st method. I wonder why this is. Do mappings have to be stored in the THIS scope of Application.cfc? Marc ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304362 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Element DSN.USERS is undefined in THIS
Hello, I have this call: cfset APPLICATION.objects.db = CreateObject('component','components.db').init(dsn_users='users',dsn_guestbook=guestbook,dsn_irama=irama,maxStringLength=25) This is the method definition: cffunction name=init access=public output=no returntype=any cfargument name=dsn_users required=false default=users cfargument name=dsn_guestbook required=false default=guestbook cfargument name=dsn_irama required=false default=irama cfargument name=maxStringLength required=false default=25 cfset this.dsn.users=#arguments.dsn_users# cfset this.dsn.guestbook=#arguments.dsn_guestbook# cfset this.dsn.irama=#arguments.dsn_irama# cfset this.maxStringLength=#arguments.maxStringLength# cfreturn this /cffunction When later I call another method in this cfc and refer to the value of this.dsn.users I get the errormessage: Element DSN.USERS is undefined in THIS Strange because: a) I set the value of this.dns. in the init method _and_ return it; b) the init method has a returnvalue of any (path.of.component or this gives same result); c) when cfdumping the variable that holds the reference to the cfc it is not empty - all the methods are there. Seems like it's lost it's instance data... Does anybody know whats wrong here? Thanks, Marc ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303813 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Element DSN.USERS is undefined in THIS
If that was the problem an error would be thrown at the line where THIS.DSN.USERS is set... Anyway, I tried it and it's not making a difference. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303816 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Element DSN.USERS is undefined in THIS
If that was the problem an error would be thrown at the line where THIS.DSN.USERS is set... Anyway, I tried it and it's not making a difference. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303817 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Element DSN.USERS is undefined in THIS
Oops, sorry for the doubleposting... I thought I'd add the line that produces the actual error: cffunction name=getRequests access=public returntype=struct cfargument name=orderby required=false default=dateaccess cfargument name=orderdir required=false default=DESC cfquery name=qLog datasource=#VARIABLES.dsn.users# /cffunction ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303821 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Element DSN.USERS is undefined in THIS
Ok, that was the problem! Just before where I do a call to the function in the cfc I did a cfinvoke and called on the resultvar of that operation. The init() method had not been invoked. I did this because Godaddy is not supporting Createobject() so I had to rewrite parts of the app and obviously didn't bother to rewrite all... :S Anyway thanks for pointing me to this! Marc ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303823 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
cfcontent gives my domainname instead of jpeg
Hi, If I do this: cfhttp method=get url=http://images.realworks.nl/servlets/images/media.objectmedia/3803552?width=161height=121; getasbinary=auto result=result/ cfcontent type=image/jpg cfoutput#result.Filecontent#/cfoutput I should get a picture of a house for sale.Instead I get a picture with this text; http//marc.local.realworks.nl If I do this: cfhttp method=get url=http://images.realworks.nl/servlets/images/media.objectmedia/3803552?width=161height=121; getasbinary=auto output=result.FileContent/ I get what I expected. Can anyone explain this??? CFMX 8 Win XP SP2 Apache 2.059 Firefox 2.0.0.13 ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302928 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfcontent gives my domainname instead of jpeg
Hi Adrian, that (ToString) works. With it I get the picture, without it I get my domainname as a pict. Is there some logic behind this? If I save the result.FileContent (a binary stream) to a txt file there is all kind of text but not the domainname. Somehow it is there so that it gets displayed in the browser. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302932 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
some issue while increment/decrement value of product in a shopping cart
Hi, I'm having a strange issue and I need some help resolving it I have design a complete CFM shopping cart with auto generate discount coupon and lots of other features however a small thing still generate a major issue using + / - sign the customer can increase or decrease the ordered quantity of a particular item it is working fine when only 1 item is on the shopping cart if several item are in it increasing or decreasing the value of 1 of them will effect the all product quantity in the cart where am I wrong cfelseif Isdefined ('FORM.plus_button.y') cfloop from=1 to=#ArrayLen(SESSION.cart)# index=i cfset SESSION.cart[i].quantite = #IncrementValue(#SESSION.cart[i].quantite#)# / /cfloop cflocation url=contenu_commande.cfm cfelseif Isdefined ('FORM.moins_button.y') cfloop from=1 to=#ArrayLen(SESSION.cart)# index=i cfset SESSION.cart[i].quantite = #decrementValue(#SESSION.cart[i].quantite#)# / cfif SESSION.cart[i].quantite LTE 1 cfset SESSION.cart[i].quantite = 1 / /cfif /cfloop cflocation url=contenu_commande.cfm Thank you for your help Marc ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302712 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: some issue while increment/decrement value of product in a shopping cart
Hi Bob, Thank you for your prompt answer , In deed I do loop in to all the Session content, but how can I provent that before I did add that increase / decrease feature , customers add to manualy change the quantity field value to upgrade it and it was working and not affecting the all session content the code was cfelseif Isdefined ('FORM.update_button.y') cfloop from=1 to=#ArrayLen(SESSION.cart)# index=i cfset SESSION.cart[i].quantite = FORM[quantite_ i] / /cfloop cflocation url=contenu_commande.cfm the only thing I did is to duplicate the fucntion and add the increase / decrease build in function to it. thank you for your help Marc ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302725 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Entry level CF programmer/Customer Support Rep in DC
Bridgeline Software has an immediate opening for a Customer Support Representative in our Washington, D.C. office. Our office has a strong focus on the philanthropic and nonprofit sectors, and an excellent reputation in this niche target market. The Customer Support Representative will be the first point of contact for existing customers who have questions about how to manage their web sites or use related tools developed by our firm. This individual will also create testing plans and work with other team members to implement those plans and ensure that sites meet Bridgeline's standards. Responsibilities include updating the ColdFusion code base in Orgitecture, our content server; serving as a primary point of contact for Bridgeline clients on general questions about their web sites, HitBox Professional and/or Google web analytics, Lyris listserves, basic HTML and other technical questions; investigating bugs and working with Bridgeline developers and IT staff to resolve technical problems; working with Bridgeline Project Managers to train new customers on how to use their web sites and related tools; managing DNS records for customer accounts; creating detailed testing plans for new web sites and ensuring that the sites are adequately tested before release to the customer; tracking the type and resolution of Help Desk calls in Mantis; registering web sites with search engines, launching static HTML pages for customers, and assisting Project Managers with customer support issues. The ideal candidate will have excellent communication skills; advanced HTML skills and knowledge of the Internet; basic ColdFusion and SQL database knowledge; understanding of domain registration and DNS transfer related issues. This individual will also have an undergraduate degree, excellent communication and customer-facing skills, and a keen ability to work effectively with a wide range of people under pressure. Creative problem-solving skills, attention to detail and a commitment to meeting deadlines are very important. Internet development experience is a plus. Our development team has over 30 years combined ColdFusion experience! We're looking for a self starter to come learn from and grow with us. Please email your cover letter and resume to [EMAIL PROTECTED] -- Marc A. Garrett Senior Architect Bridgeline Software, Inc. web: www.bridgelinesw.com ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Jobs-Talk/message.cfm/messageid:3515 Subscription: http://www.houseoffusion.com/groups/CF-Jobs-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.11
CFPARAM doesn't work as expected
In Applicationb.cfm I have these lines: cfparam name=APPLICATION.objects.security default=#CreateObject('component','components.security').init(authorization='public',language=Left(CGI.HTTP_ACCEPT_LANGUAGE,2))# cfparam name=APPLICATION.objects.util default=#CreateObject('component','components.util')# cfparam name=APPLICATION.objects.db default=#CreateObject('component','components.db').init(dsn='irama',maxStringLength=25)# cfparam name=APPLICATION.objects.cms default=#CreateObject('component','components.cms').init()# First time the page gets requested, there's nothing in the APPLICATION scope so the lines CreateObject().init*() are executed. On subsequent calls the APPLICATION scope contains all the objects so I expect that the default values (CreateObject().init()) don't get assigned. But they do! I put a cfdump in the init handler and _every_ time a page gets requested it gets executed. So every time my objects get initialized and previous data is lost. I thought cfparam only assigns the default value if the variable doesn't exist but here it executes it every time. Is this a bug or as designed? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295336 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFPARAM doesn't work as expected
Thanks Isaac, I didn't know cfparam executed the default value anayway and _then_ looks if it is needed... this explanation makes sense. I used the StrutKeyExists() function. Marc ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295346 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Apache Derby support in Eclipse
Has anybody tried this? I downloaded DTP tools as describeds in CFsilence and installed it as a local site (wiuth archived eclipse complained it didn't contain an update site) Then I should have a 'connectivity' item in the preferences window after restart. No such thing. Who tried this and succeeded? TIA,Marc Eclipse 3.3.1.1 on XP/sp2 ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294137 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
The required parameter APPLICATION.objects.db was not provided. IS!
Hi, Because I want to speed up access to calls to a component I put it in the application scope. First I have to be sure it's there and if not, put it there. So in application.cfm I do this: cfparam name=APPLICATION.objects.db default=#CreateObject('component','components.db').init(dns='myDNS')# But then I get an erromessage: The required parameter APPLICATION.objects.db was not provided. This page uses the cfparam tag to declare the parameter APPLICATION.objects.db as required for this template. The parameter is not available. Ensure that you have passed or initialized the parameter correctly. To set a default value for the parameter, use the default attribute of the cfparam tag. pointing to thei piece of code. Anybody knows whats wrong here??? ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294148 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFFILE error:formfield File does not contain a file
Here's the solution: Use cffile action=upload destination=#dir# filefield=FORM.file1 nameconflict=makeunique NOT cffile action=upload destination=#dir# filefield=FORM['file1'] nameconflict=makeunique For some reason CF doesn't see an uploaded file if u use the string notation FORM['file1'] to reference the file upload field instead of dot notation FORM.file1 This occurred on CFMX 8 (and Apache 2.0.59, WinXP SP2 fwiw0) Marc ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293860 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Fixed!
Here's the solution: Use cffile action=upload destination=#dir# filefield=FORM.file1 nameconflict=makeunique NOT cffile action=upload destination=#dir# filefield=FORM['file1'] nameconflict=makeunique For some reason CF doesn't see an uploaded file if u use the string notation FORM['file1'] to reference the file upload field instead of dot notation FORM.file1 This occurred on CFMX 8 (and Apache 2.0.59, WinXP SP2 fwiw) Marc ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293861 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
CFEclipse - ftp CFMX8 autocomplete
Does anyone know: Can CFEclipse already autocomplete new CFMX8 tags? Is it possible to ftp with Eclipse? Thanks, ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293686 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Simple AJAX request in Prototype gives bad result
Hi, I installed the prototype (v1.5.1). With body onload=... it calls a function that looks up 2 parameters in a db and returns true/false if found/not found This is the Ajax request: function doAjax(){ var url = 'modules/login.cfc?method=logincheck'; var pars = 'username=marcpassword=123'; var myAjax = new Ajax.Request( url, { method: 'get', parameters: pars, onComplete: showResponse }); } function showResponse(originalRequest){ alert(originalRequest.responseText); } It gives me a huge alert that is empty but too big to fit on the screen. So I did this: alert(originalRequest.responseText.replace( ,)):made no diffrence. Maybe the cfc gave an error or something? To check I typed this in the browser: http://irama.local/modules/login.cfc?method=logincheckusername=marcpassword=123 gave 'true' To check extra I typed http://irama.local/modules/login.cfc?method=logincheckusername=marcpassword=1233 gave 'false' (is not in db) I put cfsilesnt around method logincheck(): no difference I put cfsetting enablecfoutputonly=yes: no difference The page from which the call is made is /index.cfm The cfc that is called in the Ajax request is located in: /modules/login.cfc I'm out of options here. What am I overlooking? Thanks, Marc CFMX 7 apacha 2.059 MySQL Firefox 2.0.0.8 ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292609 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Query with dynamic criterias?
Hi, I have the following problem that I can't solve: A customer can view deliveries from/to multiple companies. I have set up the system to get all the companies this customer is allowed to see delivery from/to. !--- get the customer companies query --- cfquery name=custCompanies datasource=CATS_BE_SQL SELECT Supplier FROM calmweb_CustFinal WHERE CC_CustID = #CustId#; /cfquery I have a query that retrieve all the deliveries: cfquery name=getDeliveries datasource=CATS_BE_SQL SELECT * FROM calmweb_NextDeliveries WHERE (Cust LIKE '#custCompanies.Supplier#%') ORDER BY ETA ASC /cfquery At this stage, the system only retrieves the deliveries for the first(top 1) record on getDeliveries. It doesn't go to the next Supplier name. I tried to put the getDeliveries query inside a loop for the custCompanies, but it then only retrieves the deliveries for the last record (if no ORDER BY is given). I tried to put a WHERE (cfloop..) but of course, coldfusion rejected it. How can I fix this? I tried to put the getDeliveries query inside a loop for the custCompanies, but it then only retrieves the deliveries for the last record (if no ORDER BY is given). Thanks for all the help some of you can provide. ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285646 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Query with dynamic criterias?
Hi Charlie, Thanks for the help. Coldfusion doesn't complain, but I have all the result coming up, not just the ones from my criterias. I should have a total of 4 results and I have the entire 22 records coming up. When I do a filter directly in SQL with the criterias, I have only 4 coming up, which are correct. Something isn't exactly right. I effectively need the wildcard on the Supplier%... I tried also to create a whereclause string, but in this case I have either no single quotes or two single quotes showing... very frustrating. If you have an idea why I get all the records, I would love to know. Thanks a lot for a so quick response. Cheers, Marc -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Wednesday, 8 August 2007 11:31 To: CF-Talk Subject: Re: Query with dynamic criterias? Cust IN (#listQualify(valueList(custCompanies.Supplier), ')# (the last param of the listQualify there is a single quote between two double quotes) doing this however, you lose the wildcard in the supplier... if you really need that, you'll have to loop: WHERE cfloop query=custCompanies CUST like '#supplier#%' OR /cfloop 1 = 1 -- Charlie Griefer ...All the world shall be your enemy, Prince with a Thousand Enemies, and whenever they catch you, they will kill you. But first they must catch you, digger, listener, runner, prince with a swift warning. Be cunning and full of tricks and your people shall never be destroyed. ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285651 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Query with dynamic criterias?
Hi Charlie, The problem seems to be with the OR 1=1 statement. It should read AND 1=1. It accept always True otherwise and all records have this. Thanks. Marc -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Wednesday, 8 August 2007 11:31 To: CF-Talk Subject: Re: Query with dynamic criterias? Cust IN (#listQualify(valueList(custCompanies.Supplier), ')# (the last param of the listQualify there is a single quote between two double quotes) doing this however, you lose the wildcard in the supplier... if you really need that, you'll have to loop: WHERE cfloop query=custCompanies CUST like '#supplier#%' OR /cfloop 1 = 1 -- Charlie Griefer ...All the world shall be your enemy, Prince with a Thousand Enemies, and whenever they catch you, they will kill you. But first they must catch you, digger, listener, runner, prince with a swift warning. Be cunning and full of tricks and your people shall never be destroyed. ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285653 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Query with dynamic criterias?
Hi Brian, First is that I have no idea how to do that. The solution has been found anyway. But I would like to know how to achieve this with only one query. Thanks for the reply. Marc -Original Message- From: Brian Kotek [mailto:[EMAIL PROTECTED] Sent: Wednesday, 8 August 2007 13:13 To: CF-Talk Subject: Re: Query with dynamic criterias? Is there a reason why you are doing this in two queries instead of one query with a join? On 8/7/07, Marc Quattrini [EMAIL PROTECTED] wrote: Hi Charlie, The problem seems to be with the OR 1=1 statement. It should read AND 1=1. It accept always True otherwise and all records have this. Thanks. Marc -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Wednesday, 8 August 2007 11:31 To: CF-Talk Subject: Re: Query with dynamic criterias? Cust IN (#listQualify(valueList(custCompanies.Supplier), ')# (the last param of the listQualify there is a single quote between two double quotes) doing this however, you lose the wildcard in the supplier... if you really need that, you'll have to loop: WHERE cfloop query=custCompanies CUST like '#supplier#%' OR /cfloop 1 = 1 -- Charlie Griefer ...All the world shall be your enemy, Prince with a Thousand Enemies, and whenever they catch you, they will kill you. But first they must catch you, digger, listener, runner, prince with a swift warning. Be cunning and full of tricks and your people shall never be destroyed. ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285656 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Convert a mapping to a full path
Hi, Is it possible to take a CFMX mapping (say /external to c:/datafiles/word/external) and use this in the cfile action=read file=fullPath tag? The mapping should be converted to a full path but since CFMX already knows this, it should be possible right? Thanks ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284731 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Either the Macromedia application server is unreachable or it does not have a mapping to process this request.
Hi, I installed scorpio on JRun4 on win2k3 next to an existing CFM7 JRun server. I am unable to serve .cfm pages - I get this error message instead. Either the Macromedia application server is unreachable or it does not have a mapping to process this request. I use IIS 6.0; made an application mapping to C:\JRun4\lib\wsconfig\jrun_iis6.dll -the .dll that maps IIs to the JRun server with scorpio; I can see the dierctorylisting (directory browsing is on) so it's not a webserver problem. The application mapping for the IIS virtual webserver points to the newly installed server (proxy port of the JRun server); in the JRun admin console I see the server is up and running. This is as far as my JRun knowledge goes. Is there any other reason why the app server is unreachable? Thanks! Marc ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279938 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Either the Macromedia application server is unreachable or it does not have a mapping to process this request.
Did you have another server installed? Ii.e. Did you have CF7 on it before? What http port is CF8 listening on? cf8 listens on port 51000 cfm702 is already installed and listens on port 51020 ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279940 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Either the Macromedia application server is unreachable or it does not have a mapping to process this request.
Which http port does it's listen on? 8301 ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279943 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
why do you suppose
Hi, what would be the reason a very basic cold fusion page loads correctly in most browsers except when it is loaded in explorer it has to be refreshed to scroll the whole page? Thanks-MSH ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275757 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: why do you suppose
Brad, no scroll bars but the pages are quite long. There is no JS here is a example. try in fire fox and then in explorer. If you can not get it to scrol in explorer refresh the page it works fine. Thanks to help I got here once bfore I did find a extra div but that is gone. Http://www.bambu-u.com/mountain_boo.cfm I don't quite understand either. But is it also you're just not waiting long enough for the page to load and render. -Original Message- From: Brad Wood [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 18, 2007 3:38 PM To: CF-Talk Subject: RE: why do you suppose Are you sure it is a CF problem at all and not a JS problem perhaps. What exactly do you mean by scroll the whole page? Are the scroll bars simply not present? ~Brad -Original Message- From: Marc Hilt [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 18, 2007 3:19 PM To: CF-Talk Subject: why do you suppose Hi, what would be the reason a very basic cold fusion page loads correctly in most browsers except when it is loaded in explorer it has to be refreshed to scroll the whole page? Thanks-MSH ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275771 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: why do you suppose
Brad, There are no scroll bars for sure. When the page loads in any browser except explorer they are there, one has to refresh to get them in explorer. There is no JS. I went though the validator there are no extra divs or anything. Look at this example: http://www.bambu-u.com/mountain_boo.cfm T I don't quite understand either. But is it also you're just not waiting long enough for the page to load and render. -Original Message- From: Brad Wood [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 18, 2007 3:38 PM To: CF-Talk Subject: RE: why do you suppose Are you sure it is a CF problem at all and not a JS problem perhaps. What exactly do you mean by scroll the whole page? Are the scroll bars simply not present? ~Brad -Original Message- From: Marc Hilt [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 18, 2007 3:19 PM To: CF-Talk Subject: why do you suppose Hi, what would be the reason a very basic cold fusion page loads correctly in most browsers except when it is loaded in explorer it has to be refreshed to scroll the whole page? Thanks-MSH ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275773 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4