Re: Exchange 2010 and cfexchange - has anyone been able to get it to work?

2011-04-26 Thread Steve 'Cutter' Blades

 From a comment during last weeks ColdFusion Builder 2 User Group Tour, 
the slide deck had some info on the next version of CF, and one item was 
Exchange 2010 support.

Steve 'Cutter' Blades
Adobe Community Professional
Adobe Certified Expert
Advanced Macromedia ColdFusion MX 7 Developer

http://blog.cutterscrossing.com


Co-Author Learning Ext JS 3.2 Packt Publishing 2010
https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book

The best way to predict the future is to help create it


On 4/25/2011 7:35 PM, Michael Anderson wrote:
 Has anyone found a way to get cfexchange working with Exchange 2010?  After a 
 few days of digging around, I finally came across this bug on Adobe's site 
 (http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=82576)
  but there's no mention of a fix... just people piling on that they have the 
 same problem.

 

~|
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:343989
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: htaccess - 301 - wildcard and remove query string.

2011-04-26 Thread Michael Grant

you==star

thanks!

On Tue, Apr 26, 2011 at 1:40 AM, Wil Genovese jugg...@trunkful.com wrote:


 Michael,

 Try this

 RewriteRule ^([^\/]*)/sales/([0-9]){1}/(122)  mysite.com/sales/$2/$3/

 Also, get the Regular Expressions Tester plugin for FireFox. It works
 great!




 Wil Genovese
 Sr. Web Application Developer/
 Systems Administrator
 CF Webtools
 www.cfwebtools.com

 wilg...@trunkful.com
 www.trunkful.com

 On Apr 16, 2011, at 1:24 PM, Michael Grant wrote:

 
  I so suck at regex and redirects. I suck at lots of other stuff to, but
  that's irrelevant to this post.
 
  The simple explanation of what I want is a url like :
  mysite.com/sales/1/122/?key=valuekey2=value2 to redirect to just
  mysite.com/sales/1/122.
 
  The ideal situation is anything that ends in /122 (mysite.com/*/122/) to
  redirect to mysite.com/sales/1/122/.
 
  So first, strip the query string, second if it's /122 go to sales/1/122.
 
  Any help would be greatly appreciated.
 
  -Michael
 
 
 

 

~|
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:343990
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: htaccess - 301 - wildcard and remove query string.

2011-04-26 Thread Wil Genovese

But did it work?


Wil Genovese
Sr. Web Application Developer/
Systems Administrator
CF Webtools
www.cfwebtools.com

wilg...@trunkful.com
www.trunkful.com

On Apr 26, 2011, at 6:24 AM, Michael Grant wrote:

 
 you==star
 
 thanks!
 
 On Tue, Apr 26, 2011 at 1:40 AM, Wil Genovese jugg...@trunkful.com wrote:
 
 
 Michael,
 
 Try this
 
 RewriteRule ^([^\/]*)/sales/([0-9]){1}/(122)  mysite.com/sales/$2/$3/
 
 Also, get the Regular Expressions Tester plugin for FireFox. It works
 great!
 
 
 
 
 Wil Genovese
 Sr. Web Application Developer/
 Systems Administrator
 CF Webtools
 www.cfwebtools.com
 
 wilg...@trunkful.com
 www.trunkful.com
 
 On Apr 16, 2011, at 1:24 PM, Michael Grant wrote:
 
 
 I so suck at regex and redirects. I suck at lots of other stuff to, but
 that's irrelevant to this post.
 
 The simple explanation of what I want is a url like :
 mysite.com/sales/1/122/?key=valuekey2=value2 to redirect to just
 mysite.com/sales/1/122.
 
 The ideal situation is anything that ends in /122 (mysite.com/*/122/) to
 redirect to mysite.com/sales/1/122/.
 
 So first, strip the query string, second if it's /122 go to sales/1/122.
 
 Any help would be greatly appreciated.
 
 -Michael
 
 
 
 
 
 
 

~|
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:343991
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: htaccess - 301 - wildcard and remove query string.

2011-04-26 Thread Michael Grant

I dunno yet. I won't be able to test for a bit. However you're a star just
for replying.


On Tue, Apr 26, 2011 at 11:07 AM, Wil Genovese jugg...@trunkful.com wrote:


 But did it work?


 Wil Genovese
 Sr. Web Application Developer/
 Systems Administrator
 CF Webtools
 www.cfwebtools.com

 wilg...@trunkful.com
 www.trunkful.com

 On Apr 26, 2011, at 6:24 AM, Michael Grant wrote:

 
  you==star
 
  thanks!
 
  On Tue, Apr 26, 2011 at 1:40 AM, Wil Genovese jugg...@trunkful.com
 wrote:
 
 
  Michael,
 
  Try this
 
  RewriteRule ^([^\/]*)/sales/([0-9]){1}/(122)  mysite.com/sales/$2/$3/
 
  Also, get the Regular Expressions Tester plugin for FireFox. It works
  great!
 
 
 
 
  Wil Genovese
  Sr. Web Application Developer/
  Systems Administrator
  CF Webtools
  www.cfwebtools.com
 
  wilg...@trunkful.com
  www.trunkful.com
 
  On Apr 16, 2011, at 1:24 PM, Michael Grant wrote:
 
 
  I so suck at regex and redirects. I suck at lots of other stuff to, but
  that's irrelevant to this post.
 
  The simple explanation of what I want is a url like :
  mysite.com/sales/1/122/?key=valuekey2=value2 to redirect to just
  mysite.com/sales/1/122.
 
  The ideal situation is anything that ends in /122 (mysite.com/*/122/)
 to
  redirect to mysite.com/sales/1/122/.
 
  So first, strip the query string, second if it's /122 go to
 sales/1/122.
 
  Any help would be greatly appreciated.
 
  -Michael
 
 
 
 
 
 
 

 

~|
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:343992
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


serializeJson() oddity

2011-04-26 Thread Tony

hi there.

i have a weird issue with cf and json.  when i have a number like
4104227536, cf and its implementation
of json are making it 4.104227536E9  i have googled a bit, and i
have looked through bugs, and stuff
but none seem to explain this... i can prepend a space, and all is
well, otherwise, i cannot get it to return correctly.

anyone?

thanks!!
tony

Tony Weeg
Sr. Web Applications Architect  Developer
Navtrak, Inc.
Smart Companies Drive Navtrak
www.navtrakgps.com
800.787.2337

~|
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:343993
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: serializeJson() oddity

2011-04-26 Thread Mark Drew

I think this is a bug with CF9, there is an updater (I think) that fixes this 
issue?

Regards

Mark Drew

On 26 Apr 2011, at 16:45, Tony wrote:

 
 hi there.
 
 i have a weird issue with cf and json.  when i have a number like
 4104227536, cf and its implementation
 of json are making it 4.104227536E9  i have googled a bit, and i
 have looked through bugs, and stuff
 but none seem to explain this... i can prepend a space, and all is
 well, otherwise, i cannot get it to return correctly.
 
 anyone?
 
 thanks!!
 tony
 
 Tony Weeg
 Sr. Web Applications Architect  Developer
 Navtrak, Inc.
 Smart Companies Drive Navtrak
 www.navtrakgps.com
 800.787.2337
 
 

~|
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:343994
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: serializeJson() oddity

2011-04-26 Thread Russ Michaels

http://kb2.adobe.com/cps/862/cpsid_86263.html

There are a couple of JSON related bugs here. Do you have this update
installed ?



--

Russ Michaels

www.bluethunderinternet.com  : Business hosting services  solutions
www.cfmldeveloper.com: ColdFusion developer community
www.michaels.me.uk   : my blog
www.cfsearch.com : ColdFusion search engine
**
*skype me* : russmichaels


~|
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:343995
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: serializeJson() oddity

2011-04-26 Thread Patrick Santora

I ran into this problem myself and ended up building my own cfc to help
handle this. It's a mix of other fixes that I've found. Maybe it will help
you.

   cfcomponent displayname=JSON output=No

 cffunction name=decode access=public returntype=any output=no

 cfargument name=data type=any

 cfreturn DeserializeJson(arguments.data)

/cffunction

 cffunction name=encode access=public returntype=any output=no

 cfargument name=data type=any

  cfset var key =  /

 cfset var json =  /

 cfset var keysWithLeadingZeros =  /

  !--- serialize json ---

 cfset json = SerializeJson(arguments.data) /

  !--- need to search for values that are numeric and have leading zeros
---

 cfif isStruct( arguments.data )

   cfloop collection=#data# item=key

  cfif isDefined( arguments.data.#key# ) AND IsNumeric( data[ key ] )

  cfset json = forceJSONStrings( json, key, data[ key ]) /

  /cfif

 /cfloop

 /cfif

  cfreturn json

/cffunction

 cffunction name=forceJSONStrings output=false access=private
returntype=string hint=Forces JSON to output string values

 cfargument name=serializedJSON type=string required=true/

cfargument name=propName type=string required=true /

cfargument name=propVal type=string required=true /

cfscript

 var ret = ;

 var key = Trim(arguments.propName);

 var value = Trim(arguments.propVal);

 ret = ReReplaceNoCase(Trim(arguments.serializedJSON),
'#key#:[0-9A-Za-z]*\.[0-9A-Za-z]*','#key#:#value#',ALL);

/cfscript

cfreturn ret /

/cffunction

 /cfcomponent

On Tue, Apr 26, 2011 at 9:24 AM, Russ Michaels r...@michaels.me.uk wrote:


 http://kb2.adobe.com/cps/862/cpsid_86263.html

 There are a couple of JSON related bugs here. Do you have this update
 installed ?



 --

 Russ Michaels

 www.bluethunderinternet.com  : Business hosting services  solutions
 www.cfmldeveloper.com: ColdFusion developer community
 www.michaels.me.uk   : my blog
 www.cfsearch.com : ColdFusion search engine
 **
 *skype me* : russmichaels


 

~|
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:343996
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: serializeJson() oddity

2011-04-26 Thread Patrick Santora

Sorry for the ugly format. I can send the file to you directly if you'd
like.

On Tue, Apr 26, 2011 at 9:28 AM, Patrick Santora patwe...@gmail.com wrote:

 I ran into this problem myself and ended up building my own cfc to help
 handle this. It's a mix of other fixes that I've found. Maybe it will help
 you.

 cfcomponent displayname=JSON output=No

  cffunction name=decode access=public returntype=any output=no

  cfargument name=data type=any

  cfreturn DeserializeJson(arguments.data)

 /cffunction

  cffunction name=encode access=public returntype=any output=no

  cfargument name=data type=any

   cfset var key =  /

  cfset var json =  /

  cfset var keysWithLeadingZeros =  /

   !--- serialize json ---

  cfset json = SerializeJson(arguments.data) /

   !--- need to search for values that are numeric and have leading zeros
 ---

  cfif isStruct( arguments.data )

cfloop collection=#data# item=key

   cfif isDefined( arguments.data.#key# ) AND IsNumeric( data[ key ] )

   cfset json = forceJSONStrings( json, key, data[ key ]) /

   /cfif

  /cfloop

  /cfif

   cfreturn json

 /cffunction

  cffunction name=forceJSONStrings output=false access=private
 returntype=string hint=Forces JSON to output string values

  cfargument name=serializedJSON type=string required=true/

 cfargument name=propName type=string required=true /

 cfargument name=propVal type=string required=true /

 cfscript

  var ret = ;

  var key = Trim(arguments.propName);

  var value = Trim(arguments.propVal);

  ret = ReReplaceNoCase(Trim(arguments.serializedJSON),
 '#key#:[0-9A-Za-z]*\.[0-9A-Za-z]*','#key#:#value#',ALL);

 /cfscript

 cfreturn ret /

 /cffunction

  /cfcomponent

 On Tue, Apr 26, 2011 at 9:24 AM, Russ Michaels r...@michaels.me.ukwrote:


 http://kb2.adobe.com/cps/862/cpsid_86263.html

 There are a couple of JSON related bugs here. Do you have this update
 installed ?



 --

 Russ Michaels

 www.bluethunderinternet.com  : Business hosting services  solutions
 www.cfmldeveloper.com: ColdFusion developer community
 www.michaels.me.uk   : my blog
 www.cfsearch.com : ColdFusion search engine
 **
 *skype me* : russmichaels


 

~|
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:343997
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: serializeJson() oddity

2011-04-26 Thread Patrick Santora

looks like the post was just too large. I've went ahead and emailed you the
cfc file i use.

On Tue, Apr 26, 2011 at 9:28 AM, Patrick Santora patwe...@gmail.com wrote:

 Sorry for the ugly format. I can send the file to you directly if you'd
 like.


 On Tue, Apr 26, 2011 at 9:28 AM, Patrick Santora patwe...@gmail.comwrote:

 I ran into this problem myself and ended up building my own cfc to help
 handle this. It's a mix of other fixes that I've found. Maybe it will help
 you.

 cfcomponent displayname=JSON output=No

  cffunction name=decode access=public returntype=any output=no

  cfargument name=data type=any

  cfreturn DeserializeJson(arguments.data)

 /cffunction

  cffunction name=encode access=public returntype=any output=no

  cfargument name=data type=any

   cfset var key =  /

  cfset var json =  /

  cfset var keysWithLeadingZeros =  /

   !--- serialize json ---

  cfset json = SerializeJson(arguments.data) /

   !--- need to search for values that are numeric and have leading zeros
 ---

  cfif isStruct( arguments.data )

cfloop collection=#data# item=key

   cfif isDefined( arguments.data.#key# ) AND IsNumeric( data[ key ] )

   cfset json = forceJSONStrings( json, key, data[ key ]) /

   /cfif

  /cfloop

  /cfif

   cfreturn json

 /cffunction

  cffunction name=forceJSONStrings output=false access=private
 returntype=string hint=Forces JSON to output string values

  cfargument name=serializedJSON type=string required=true/

 cfargument name=propName type=string required=true /

 cfargument name=propVal type=string required=true /

 cfscript

  var ret = ;

  var key = Trim(arguments.propName);

  var value = Trim(arguments.propVal);

  ret = ReReplaceNoCase(Trim(arguments.serializedJSON),
 '#key#:[0-9A-Za-z]*\.[0-9A-Za-z]*','#key#:#value#',ALL);

 /cfscript

 cfreturn ret /

 /cffunction

  /cfcomponent

 On Tue, Apr 26, 2011 at 9:24 AM, Russ Michaels r...@michaels.me.ukwrote:


 http://kb2.adobe.com/cps/862/cpsid_86263.html

 There are a couple of JSON related bugs here. Do you have this update
 installed ?



 --

 Russ Michaels

 www.bluethunderinternet.com  : Business hosting services  solutions
 www.cfmldeveloper.com: ColdFusion developer community
 www.michaels.me.uk   : my blog
 www.cfsearch.com : ColdFusion search engine
 **
 *skype me* : russmichaels


 

~|
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:343998
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


More work than we can handle

2011-04-26 Thread Robert Harrison

Not sure if I'm posting this to the right place in the CFLIST or not, but the 
bottom line is we are swamped with more work than we can handle. 

I need a very reliable CF programmer or CF consulting group who can take at 
least one, maybe two projects and in the next few months.  These are not small 
projects. The involve building CMS and maybe front end. May build CMS and apply 
the CF to a front end we build.

Anyone interested in discussing/quoting projects please call me or email me and 
we'll talk. An independent or a company is fine. Just need to get the work done.

Thanks,
Robert

Robert B. Harrison
Director of Interactive Services
Austin  Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be .

Plug in to our blog: AW Unplugged
http://www.austin-williams.com/unplugged


~|
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:343999
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: serializeJson() oddity

2011-04-26 Thread Ras Tafari

doing that later today.
thanks russ.

tw

On Tue, Apr 26, 2011 at 12:24 PM, Russ Michaels r...@michaels.me.uk wrote:

 http://kb2.adobe.com/cps/862/cpsid_86263.html

 There are a couple of JSON related bugs here. Do you have this update
 installed ?



 --

 Russ Michaels

 www.bluethunderinternet.com  : Business hosting services  solutions
 www.cfmldeveloper.com        : ColdFusion developer community
 www.michaels.me.uk           : my blog
 www.cfsearch.com             : ColdFusion search engine
 **
 *skype me*                     : russmichaels


 

~|
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:344000
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: serializeJson() oddity

2011-04-26 Thread Ras Tafari

i think so too, mark.
testing that later today.

On Tue, Apr 26, 2011 at 12:20 PM, Mark Drew mark.d...@gmail.com wrote:

 I think this is a bug with CF9, there is an updater (I think) that fixes this 
 issue?

 Regards

 Mark Drew

 On 26 Apr 2011, at 16:45, Tony wrote:


 hi there.

 i have a weird issue with cf and json.  when i have a number like
 4104227536, cf and its implementation
 of json are making it 4.104227536E9  i have googled a bit, and i
 have looked through bugs, and stuff
 but none seem to explain this... i can prepend a space, and all is
 well, otherwise, i cannot get it to return correctly.

 anyone?

 thanks!!
 tony

 Tony Weeg
 Sr. Web Applications Architect  Developer
 Navtrak, Inc.
 Smart Companies Drive Navtrak
 www.navtrakgps.com
 800.787.2337



 

~|
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:344001
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Dynamic SQL in CFScript

2011-04-26 Thread Kyle McLean

I've been working on a CF9 project, and I'm trying to take full advantage of 
the cfscript syntax for my components. I have many cases where I'm using 
dynamic SQL based on the existence of an optional argument in a function. In 
CF8 and below it'd look something like this:

cffunction name=testFunc returntype=query
cfargument name=testArg type=string required=false /

cfquery name=testQuery datasource=testDSN
SELECT
*
FROM
TBL
cfif structKeyExists(arguments.testArg)
WHERE
COL = '#arguments.testArg#'
/cfif
/cfquery

cfreturn testQuery /
/cffunction

Is there an elegant way to do the same thing using cfscript? I haven't had any 
luck with string concatenation in the setSQL method of the query object (and 
it's kind of clunky to boot). I'd also hate to have to write two 
almost-identical blocks of code one with the where clause and one without and 
then apply the correct string to setSQL at runtime, although I assume that 
would solve my problem.

I'd also like to use query binding, just to make things more complicated. Is 
there some sort of cleaner approach that I'm missing, or is this just one of 
the downsides to using cfscript?

Thanks in advance! 

~|
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:344002
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Dynamic SQL in CFScript

2011-04-26 Thread Jeffrey Battershall

Do you have the option of moving your query logic into a stored proc?
It would be more secure.

Jeff

On Tue, Apr 26, 2011 at 2:32 PM, Kyle McLean kmclea...@gmail.com wrote:

 I've been working on a CF9 project, and I'm trying to take full advantage of 
 the cfscript syntax for my components. I have many cases where I'm using 
 dynamic SQL based on the existence of an optional argument in a function. In 
 CF8 and below it'd look something like this:

 cffunction name=testFunc returntype=query
 cfargument name=testArg type=string required=false /

 cfquery name=testQuery datasource=testDSN
 SELECT
 *
 FROM
 TBL
 cfif structKeyExists(arguments.testArg)
 WHERE
 COL = '#arguments.testArg#'
 /cfif
 /cfquery

 cfreturn testQuery /
 /cffunction

 Is there an elegant way to do the same thing using cfscript? I haven't had 
 any luck with string concatenation in the setSQL method of the query object 
 (and it's kind of clunky to boot). I'd also hate to have to write two 
 almost-identical blocks of code one with the where clause and one without and 
 then apply the correct string to setSQL at runtime, although I assume that 
 would solve my problem.

 I'd also like to use query binding, just to make things more complicated. Is 
 there some sort of cleaner approach that I'm missing, or is this just one of 
 the downsides to using cfscript?

 Thanks in advance!

 

~|
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:344003
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Dynamic SQL in CFScript

2011-04-26 Thread Raymond Camden

var q = new com.adobe.coldfusion.query();
q.setDatasource(cfartgallery);
var sql = select mediatype from media;
if(structKeyExists(arguments, something)) {
 sql =  where media like :search;
 q.addParam(name=search,value=%#arguments.str#%,cfsqltype=cf_sql_varchar);
}
q.setSQL(sql);
var results = q.execute().getResult();

Does that make sense?
On Tue, Apr 26, 2011 at 1:32 PM, Kyle McLean kmclea...@gmail.com wrote:

 I've been working on a CF9 project, and I'm trying to take full advantage of 
 the cfscript syntax for my components. I have many cases where I'm using 
 dynamic SQL based on the existence of an optional argument in a function. In 
 CF8 and below it'd look something like this:

 cffunction name=testFunc returntype=query
 cfargument name=testArg type=string required=false /

 cfquery name=testQuery datasource=testDSN
 SELECT
 *
 FROM
 TBL
 cfif structKeyExists(arguments.testArg)
 WHERE
 COL = '#arguments.testArg#'
 /cfif
 /cfquery

 cfreturn testQuery /
 /cffunction

 Is there an elegant way to do the same thing using cfscript? I haven't had 
 any luck with string concatenation in the setSQL method of the query object 
 (and it's kind of clunky to boot). I'd also hate to have to write two 
 almost-identical blocks of code one with the where clause and one without and 
 then apply the correct string to setSQL at runtime, although I assume that 
 would solve my problem.

 I'd also like to use query binding, just to make things more complicated. Is 
 there some sort of cleaner approach that I'm missing, or is this just one of 
 the downsides to using cfscript?

 Thanks in advance!

 

~|
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:344004
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: More work than we can handle

2011-04-26 Thread Sebastiaan GMC van Dijk

Remote working is also fine?We live and work in the Netherlands, have used ACF 
for 11 years and now Railo for two years.Timedifference might be a challenge, 
and hourly rates are a bit higher here in Europe than at your side of the 
pond.Anyways, love to hear what, where and how if you are interested.

Sebastiaan Naafs - van Dijk
=So long and thanx 4 all the fish== 
Onlinebase.nl

 To: cf-talk@houseoffusion.com
 Subject: More work than we can handle
 Date: Tue, 26 Apr 2011 12:43:54 -0400
 From: rob...@austin-williams.com
 
 
 Not sure if I'm posting this to the right place in the CFLIST or not, but the 
 bottom line is we are swamped with more work than we can handle. 
 
 I need a very reliable CF programmer or CF consulting group who can take at 
 least one, maybe two projects and in the next few months.  These are not 
 small projects. The involve building CMS and maybe front end. May build CMS 
 and apply the CF to a front end we build.
 
 Anyone interested in discussing/quoting projects please call me or email me 
 and we'll talk. An independent or a company is fine. Just need to get the 
 work done.
 
 Thanks,
 Robert
 
 Robert B. Harrison
 Director of Interactive Services
 Austin  Williams
 125 Kennedy Drive, Suite 100 
 Hauppauge NY 11788
 P : 631.231.6600 Ext. 119 
 F : 631.434.7022
 http://www.austin-williams.com 
 
 Great advertising can't be either/or.  It must be .
 
 Plug in to our blog: AW Unplugged
 http://www.austin-williams.com/unplugged
 
 
 

~|
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:344005
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Dynamic SQL in CFScript

2011-04-26 Thread Kyle McLean

It does, but it still looks like it's a little more clunky (in my opinion at 
least :)) than the tag-based alternative. Bummer, since I much prefer the 
succinct style of CFSCRIPT for writing pretty much everything else in a 
component.

Thanks for your help everyone!

var q = new com.adobe.coldfusion.query();
q.setDatasource(cfartgallery);
var sql = select mediatype from media;
if(structKeyExists(arguments, something)) {
 sql =  where media like :search;
 q.addParam(name=search,value=%#arguments.str#%,cfsqltype=cf_sql_varchar);
}
q.setSQL(sql);
var results = q.execute().getResult();

Does that make sense?

 

~|
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:344006
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: serializeJson() oddity

2011-04-26 Thread Brook Davies

Adobe fixed the JSON numeric encoding bug in the CF 9 9.01 updater
(http://kb2.adobe.com/cps/862/cpsid_86263.html)  but there is still a bug
that encodes 'yes' or 'no' strings to true / false. Adobe really needs to
fix this, its been outstanding for a long time. Yes, you can append a
character or a space (which is what I do), but that can complicate some
things when your doing a lot of ajax and back and forth with the data...

Brook

-Original Message-
From: Russ Michaels [mailto:r...@michaels.me.uk] 
Sent: April-26-11 9:24 AM
To: cf-talk
Subject: Re: serializeJson() oddity


http://kb2.adobe.com/cps/862/cpsid_86263.html

There are a couple of JSON related bugs here. Do you have this update
installed ?



--

Russ Michaels

www.bluethunderinternet.com  : Business hosting services  solutions
www.cfmldeveloper.com: ColdFusion developer community
www.michaels.me.uk   : my blog
www.cfsearch.com : ColdFusion search engine
**
*skype me* : russmichaels




~|
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:344007
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


cffileupload and makeUnique

2011-04-26 Thread Matt Williams

I'm using cffileupload to allow users to upload multiple photos into a
gallery. For each photo, there is additional processing including
resizing, cropping, writing to DB, etc. At the end four new photo
files are written. At first I tried doing all of that when the image
was uploaded, but that seemed too slow and the user does not need to
wait for this processing to happen before continuing.

I tried cfthread but for some reason it did not work, plus I'm dealing
with CF Standard and the limitations there probably wouldn't help
enough.

Round three, I created a javascript function to make an ajax call
after each photo is uploaded, using the oncomplete attribute of
cffileupload. This works. The photo is uploaded quickly, the ajax call
happens and users are happy.

My problem happens when a file is renamed via the
overwrite=makeUnique setting of cffile. The function called
oncomplete includes the FILENAME as part of the js object, but only
the original filename and not the new/unique one. I need the unique
filename in order to perform the additional processing.

Any ideas on how to make this happen better?

Thanks,

-Matt W

~|
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:344008
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cffileupload and makeUnique

2011-04-26 Thread Russ Michaels

sounds like you may have found a bug in cffileupload then, as you don't have
any control over which filename is passed with oncomplete as far as I can
see.
You may have to resort to the old fashioned cffile upload instead, then you
can use the following attribute.

serverFile

Filename of the file saved on the server

for details on all the cffile attributes returned after AN UPLOAD SEE HERE
http://cfquickdocs.com/cf9/#cffile.upload

If you want to allow multiple file uploads, you could use the flash uploader
at www.asfusion.com

On Wed, Apr 27, 2011 at 12:58 AM, Matt Williams mgw...@gmail.com wrote:


 I'm using cffileupload to allow users to upload multiple photos into a
 gallery. For each photo, there is additional processing including
 resizing, cropping, writing to DB, etc. At the end four new photo
 files are written. At first I tried doing all of that when the image
 was uploaded, but that seemed too slow and the user does not need to
 wait for this processing to happen before continuing.

 I tried cfthread but for some reason it did not work, plus I'm dealing
 with CF Standard and the limitations there probably wouldn't help
 enough.

 Round three, I created a javascript function to make an ajax call
 after each photo is uploaded, using the oncomplete attribute of
 cffileupload. This works. The photo is uploaded quickly, the ajax call
 happens and users are happy.

 My problem happens when a file is renamed via the
 overwrite=makeUnique setting of cffile. The function called
 oncomplete includes the FILENAME as part of the js object, but only
 the original filename and not the new/unique one. I need the unique
 filename in order to perform the additional processing.

 Any ideas on how to make this happen better?

 Thanks,

 -Matt W

 

~|
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:344009
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cffileupload and makeUnique

2011-04-26 Thread Matt Williams

Thanks Russ,

Lucky me!  sounds like you may have found a bug in cffileupload
I'm looking to replace an existing page that simply puts 5 input
type=file tags on one page.

I just downloaded and was checking out Dan Vega's CFMU on riaforge.
The demo didn't work perfectly for me right away so I'm not sure if it
returns the unique name or not.

I'll take a look at the upload on asfusion too.

-Matt

On Tue, Apr 26, 2011 at 8:12 PM, Russ Michaels r...@michaels.me.uk wrote:

 sounds like you may have found a bug in cffileupload then, as you don't have
 any control over which filename is passed with oncomplete as far as I can
 see.
 You may have to resort to the old fashioned cffile upload instead, then you
 can use the following attribute.

 serverFile

 Filename of the file saved on the server

 for details on all the cffile attributes returned after AN UPLOAD SEE HERE
 http://cfquickdocs.com/cf9/#cffile.upload

 If you want to allow multiple file uploads, you could use the flash uploader
 at www.asfusion.com

 On Wed, Apr 27, 2011 at 12:58 AM, Matt Williams mgw...@gmail.com wrote:


 I'm using cffileupload to allow users to upload multiple photos into a
 gallery. For each photo, there is additional processing including
 resizing, cropping, writing to DB, etc. At the end four new photo
 files are written. At first I tried doing all of that when the image
 was uploaded, but that seemed too slow and the user does not need to
 wait for this processing to happen before continuing.

 I tried cfthread but for some reason it did not work, plus I'm dealing
 with CF Standard and the limitations there probably wouldn't help
 enough.

 Round three, I created a javascript function to make an ajax call
 after each photo is uploaded, using the oncomplete attribute of
 cffileupload. This works. The photo is uploaded quickly, the ajax call
 happens and users are happy.

 My problem happens when a file is renamed via the
 overwrite=makeUnique setting of cffile. The function called
 oncomplete includes the FILENAME as part of the js object, but only
 the original filename and not the new/unique one. I need the unique
 filename in order to perform the additional processing.

 Any ideas on how to make this happen better?

 Thanks,

 -Matt W



 

~|
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:344010
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Dynamic SQL in CFScript

2011-04-26 Thread Sean Corfield

On Tue, Apr 26, 2011 at 11:32 AM, Kyle McLean kmclea...@gmail.com wrote:
 cfquery name=testQuery datasource=testDSN
 SELECT
 *
 FROM
 TBL
 cfif structKeyExists(arguments.testArg)
 WHERE
 COL = '#arguments.testArg#'
 /cfif
 /cfquery

I know this doesn't help you, since you're on CF9, but I just wanted
to note that Railo also supports an alternative syntax that was
discussed by the CFML Advisory Committee - although, unfortunately, we
couldn't reach consensus on any proposed syntax (although we were all
in agreement that adding CFCs was... less than ideal):

query name=testQuery datasource=testDSN {
writeOutput( SELECT
  *
  FROM
  TBL );
if ( structKeyExists(arguments.testArg) ) {
writeOutput( WHERE
  COL = '#arguments.testArg#' );
}
}

Of course, it would be be better to use (cf)queryparam here, like this:

query name=testQuery datasource=testDSN {
writeOutput( SELECT
  *
  FROM
  TBL );
if ( structKeyExists(arguments.testArg) ) {
writeOutput( WHERE
  COL = ); queryparam value=#arguments.testArg# cfsqltype=varchar;
}
}

and I'd write that like this:

query name=testQuery datasource=testDSN {
  writeOutput( SELECT * FROM TBL );
  if ( structKeyExists(arguments.testArg) ) {
writeOutput( WHERE COL = );
queryparam value=#arguments.testArg# cfsqltype=varchar;
  }
}

Still a bit ugly with the writeOutput() calls but a lot cleaner than
using the CFC, IMO.
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

Perfection is the enemy of the good.
-- Gustave Flaubert, French realist novelist (1821-1880)

~|
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:344011
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: cffileupload and makeUnique

2011-04-26 Thread Bobby Hartsfield

You might check into an event gateway. Ray Camden had an example online for
a directory watcher that basically just monitored a directory for new files
to do stuff with.

It shouldn't be too hard to find but if he sees this, I'm sure he will share
it again.

.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com


-Original Message-
From: Matt Williams [mailto:mgw...@gmail.com] 
Sent: Tuesday, April 26, 2011 7:58 PM
To: cf-talk
Subject: cffileupload and makeUnique


I'm using cffileupload to allow users to upload multiple photos into a
gallery. For each photo, there is additional processing including
resizing, cropping, writing to DB, etc. At the end four new photo
files are written. At first I tried doing all of that when the image
was uploaded, but that seemed too slow and the user does not need to
wait for this processing to happen before continuing.

I tried cfthread but for some reason it did not work, plus I'm dealing
with CF Standard and the limitations there probably wouldn't help
enough.

Round three, I created a javascript function to make an ajax call
after each photo is uploaded, using the oncomplete attribute of
cffileupload. This works. The photo is uploaded quickly, the ajax call
happens and users are happy.

My problem happens when a file is renamed via the
overwrite=makeUnique setting of cffile. The function called
oncomplete includes the FILENAME as part of the js object, but only
the original filename and not the new/unique one. I need the unique
filename in order to perform the additional processing.

Any ideas on how to make this happen better?

Thanks,

-Matt W



~|
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:344012
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cffileupload and makeUnique

2011-04-26 Thread Matt Williams

I thought about that, but is that still and Enterprise only deal? I'm
on CF Standard for this.

-Matt

On Tue, Apr 26, 2011 at 10:10 PM, Bobby Hartsfield
bo...@acoderslife.com wrote:

 You might check into an event gateway. Ray Camden had an example online for
 a directory watcher that basically just monitored a directory for new files
 to do stuff with.

 It shouldn't be too hard to find but if he sees this, I'm sure he will share
 it again.

 .:.:.:.:.:.:.:.:.:.:.:.:.:.
 Bobby Hartsfield
 http://acoderslife.com
 http://cf4em.com


 -Original Message-
 From: Matt Williams [mailto:mgw...@gmail.com]
 Sent: Tuesday, April 26, 2011 7:58 PM
 To: cf-talk
 Subject: cffileupload and makeUnique


 I'm using cffileupload to allow users to upload multiple photos into a
 gallery. For each photo, there is additional processing including
 resizing, cropping, writing to DB, etc. At the end four new photo
 files are written. At first I tried doing all of that when the image
 was uploaded, but that seemed too slow and the user does not need to
 wait for this processing to happen before continuing.

 I tried cfthread but for some reason it did not work, plus I'm dealing
 with CF Standard and the limitations there probably wouldn't help
 enough.

 Round three, I created a javascript function to make an ajax call
 after each photo is uploaded, using the oncomplete attribute of
 cffileupload. This works. The photo is uploaded quickly, the ajax call
 happens and users are happy.

 My problem happens when a file is renamed via the
 overwrite=makeUnique setting of cffile. The function called
 oncomplete includes the FILENAME as part of the js object, but only
 the original filename and not the new/unique one. I need the unique
 filename in order to perform the additional processing.

 Any ideas on how to make this happen better?

 Thanks,

 -Matt W



 

~|
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:344013
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm