Cannot declare local variable cfcatch twice

2009-08-19 Thread SANJEEV SINGLA

Hi All,


I migrated my CFMX6.1 application to CF8 on my local dev machine and getting 
the following error.


Cannot declare local variable cfcatch twice. Local variables cannot have the 
same names as parameters or other local variables. 

Please let me know how it can be resolved.

Thanks!
Sanjeev 

~|
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:325536
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Cannot declare local variable cfcatch twice

2009-08-19 Thread Adrian Lynch

Can we see your code?

 -Original Message-
 From: SANJEEV SINGLA [mailto:planetsanj...@gmail.com]
 Sent: 19 August 2009 07:43
 To: cf-talk
 Subject: Cannot declare local variable cfcatch twice
 
 
 Hi All,
 
 
 I migrated my CFMX6.1 application to CF8 on my local dev machine and
 getting the following error.
 
 
 Cannot declare local variable cfcatch twice. Local variables cannot
 have the same names as parameters or other local variables.
 
 Please let me know how it can be resolved.
 
 Thanks!
 Sanjeev


~|
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:325537
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: returning all table records ColdBox ColdSpring via an object?

2009-08-19 Thread Glyn Jackson

Thanks for the reply. reading my question back it did not make much sense, so 
you did well to work out what I was on about lol!
 
I'd go with a query unless you have a particular reason not to.

no reason, that would be the way I would normally do it, however if I wanted to 
try and keep this strict OO like I was wondering how this would play out. I can 
still access the service layer first(not server layer above lol) and the query 
directly but it seems to brake the rules of OO some what and I wondered how 
others do it. 

thanks for the link the site is down but will look at it when its back up.

Glyn 

~|
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:325538
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


ColdFusion Web Service question

2009-08-19 Thread Rin C.

Hi all,

I have a few questions about an issue that is occuring at my office. We have 
several ColdFusion boxes and we often invoke web services. It has been my 
experience that ColdFusion 8 generates stub class files when a web service is 
invoked. However, we just recently began running into a problem where one of 
our ColdFusion instances will generate a folder in the stubs directory, and 
then generate all of the subfolders, but it will not actually generate a stub 
class file.

Does anyone know why the stub class file would not be getting generated? Is 
there a setting that someone may have changed that would cause this?

I can't replicate this on any of our other ColdFusion boxes. I even tried to 
replicate it on a clean install of ColdFusion, but (as expected) - on a clean 
install, everything worked perfectly.

Also, the only error we're getting from the box is the 
java.lang.ClassNotFoundException: ... , and again, the reason for this seems 
to be that the stub class isn't getting generated on the box (folders are being 
generated, class files aren't).


As always, thanks in advance for your help.



Keywords: java.lang.ClassNotFoundException, web service, ColdFusion not 
generating stubs, ColdFusion 8 

~|
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:325539
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: ColdFusion Web Service question

2009-08-19 Thread Mark Kruger

I would suspect the WSDL file and examine it first. If the WSDL file is
missing some node then perhaps the compiler is creating path information but
has not methods to stub out.

-mark
 


Mark A. Kruger, CFG, MCSE
(402) 408-3733 ext 105
www.cfwebtools.com
www.coldfusionmuse.com
www.necfug.com

-Original Message-
From: Rin C. [mailto:pager...@gmail.com] 
Sent: Wednesday, August 19, 2009 8:58 AM
To: cf-talk
Subject: ColdFusion Web Service question


Hi all,

I have a few questions about an issue that is occuring at my office. We have
several ColdFusion boxes and we often invoke web services. It has been my
experience that ColdFusion 8 generates stub class files when a web service
is invoked. However, we just recently began running into a problem where one
of our ColdFusion instances will generate a folder in the stubs directory,
and then generate all of the subfolders, but it will not actually generate a
stub class file.

Does anyone know why the stub class file would not be getting generated? Is
there a setting that someone may have changed that would cause this?

I can't replicate this on any of our other ColdFusion boxes. I even tried to
replicate it on a clean install of ColdFusion, but (as expected) - on a
clean install, everything worked perfectly.

Also, the only error we're getting from the box is the
java.lang.ClassNotFoundException: ... , and again, the reason for this
seems to be that the stub class isn't getting generated on the box (folders
are being generated, class files aren't).


As always, thanks in advance for your help.



Keywords: java.lang.ClassNotFoundException, web service, ColdFusion not
generating stubs, ColdFusion 8 



~|
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:325540
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: returning all table records ColdBox ColdSpring via an object?

2009-08-19 Thread Judah McAuley

Using a query doesn't mean you aren't programming in an OO fashion.
You can keep your encapsulation while still returning a query or you
could turn the query into an array of objects as you desire.

In your adminUserService you could have a method called
GetAllAdminUsers  that calls GetAllAdminUsers in your DAO. That query
does a SELECT (your columns) FROM adminusertbl  and returns that query
result set to the Service. Now in your service you have a choice of
how you want to return the data. You could return that query itself or
you could return an array of objects. I tend to favor a method that
will let you do either. You can pass in a returndatatype variable that
says I want a query or I want an array of objects. If the handler
wants a query, just return that query (you can use a return type of
Any on your GetAllAdminUsers method) or if it wants an array of
objects, then you can loop over the query in your Service method and
convert each query row to a struct (search for the UDF
QueryRowToStruct) that you can then pass in to your adminUser bean to
populate it. Then append it to your array and return it to the
handler.

What type of data structure you return is going to depend largely on
what you are using it for. Some purists might argue that you should
always return an array of objects because those objects have behavior
associated with them. This is true in some cases. If you have helper
methods on the objects that are useful in your application (like
getName that concatenates the adminUser's first name and last name)
then you should use the array of objects. If you are just going to
return a simple list of records and only use it for displaying the
information from the query, then you will likely be better off
returning a query and using that.

Either way, you are keeping most of your encapsulation in place and
allow yourself a lot of flexibility to change how you get the admin
users in the future without having to rewrite all of your app.

Hope that helps,
Judah

On Wed, Aug 19, 2009 at 5:27 AM, Glyn Jacksonglyn.jack...@newebia.co.uk wrote:

 Thanks for the reply. reading my question back it did not make much sense, so 
 you did well to work out what I was on about lol!

I'd go with a query unless you have a particular reason not to.

 no reason, that would be the way I would normally do it, however if I wanted 
 to try and keep this strict OO like I was wondering how this would play out. 
 I can still access the service layer first(not server layer above lol) and 
 the query directly but it seems to brake the rules of OO some what and I 
 wondered how others do it.

 thanks for the link the site is down but will look at it when its back up.

 Glyn

~|
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:325541
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: returning all table records ColdBox ColdSpring via an object?

2009-08-19 Thread Dominic Watson

Agreed. Indeed, a cfquery object *is* an object. I find the cfquery object
is particular perfect for views because it is read-only in terms of
interacting with the source of the data.

I personally use the IBO approach and release the query object when ready to
output the data - but that's just me.

Dominic

2009/8/19 Judah McAuley ju...@wiredotter.com

 What type of data structure you return is going to depend largely on
 what you are using it for. Some purists might argue that you should
 always return an array of objects because those objects have behavior
 associated with them. This is true in some cases. If you have helper
 methods on the objects that are useful in your application (like
 getName that concatenates the adminUser's first name and last name)
 then you should use the array of objects. If you are just going to
 return a simple list of records and only use it for displaying the
 information from the query, then you will likely be better off
 returning a query and using that.



~|
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:325542
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Cannot declare local variable cfcatch twice

2009-08-19 Thread Matt Quackenbush

The code would certainly help pinpoint exactly where the issue lies, but as
the error message indicates, it is caused by the fact that somewhere in your
code a variable is declared twice within a function.  This can be caused by
several factors.  Here are a couple of examples that will do it.

Ex. 1
cffunction name=foo
cfargument name=bar /

cfset var bar =  /
/cffunction


Ex. 2
cffunction name=foo
  cfscript
var err = ;

try {
   // code here
} catch (any err) {
}
  /cfscript
/cffunction


~|
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:325543
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Cannot declare local variable cfcatch twice

2009-08-19 Thread Kevin Pepperman

This question was cross posted at the same time and answered on cfaussies'
group almost immediately.
But was not followed through with.

On Wed, Aug 19, 2009 at 3:04 PM, Matt Quackenbush quackfu...@gmail.comwrote:


 The code would certainly help pinpoint exactly where the issue lies, but as
 the error message indicates, it is caused by the fact that somewhere in
 your
 code a variable is declared twice within a function.  This can be caused by
 several factors.  Here are a couple of examples that will do it.

 Ex. 1
 cffunction name=foo
cfargument name=bar /

cfset var bar =  /
 /cffunction


 Ex. 2
 cffunction name=foo
  cfscript
var err = ;

try {
   // code here
} catch (any err) {
}
  /cfscript
 /cffunction


 

~|
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:325544
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Replacing characters in a string

2009-08-19 Thread Rick Sanders

Hey all,

 

I'm trying to replace a hyperlink and just display the text. I need to
remove the a href=http://www.google.ca;www.google.ca
http://www.google.ca%3c/a /a from text within fckeditor and just display
the text www.google.ca I tried finding a setting for the editor so it
doesn't automatically create hyperlinks when you type www. Or http:// but
didn't see such a setting.

 

Here's what I have so far:

cfset ad = Replace(#form.addesc#, http://,;)

cfset ad2 = Replace(#ad#, a href=#chr(34)#,)

cfset ad3 = Replace(#ad2#, #chr(34)#,)

cfset ad4 = Replace(#ad3#, /a,)

cfoutput#ad4#/cfoutput

 

It works, but it duplicates the link. How can I remove the duplicate?

 

Thanks,

 

Rick Sanders

Webenergy

Canada: 902-431-7279

USA:   919-799-9076

Canada: www.webenergy.ca

USA:   www.webenergyusa.com

 





~|
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:325545
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


re: Replacing characters in a string

2009-08-19 Thread Jason Fisher

Try this:

cfset ad = reReplace(form.addesc, (/?a[^]*), , all) /
 


~|
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:325546
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Inserting NULL between characers using CFFILE

2009-08-19 Thread Jason Neidert

Leigh,

Thanks for that information. Exactly what I needed!!!

I had got it working in the meantime by doing this:

1. creating a small file from Winhex that only contained 1 NULL character.
2. Using CFFILE to read this into a variable
3. Replacing all occurrences from the Hex data with that variable containing
the NULL character.

BUT, now that I have this it works great, thanks!




-Original Message-
From: Leigh [mailto:cfsearch...@yahoo.com] 
Sent: Tuesday, August 18, 2009 4:07 PM
To: cf-talk
Subject: Re: Inserting NULL between characers using CFFILE


 Does anyone know how to get CFFILE to insert NULL chars
 into a file?

I have not tried it with cffile specifically, but here is one way to create
a null character

http://www.coldfusiondeveloper.com.au/go/blog/2007/05/06/null-character/




  




~|
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:325547
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Replacing characters in a string

2009-08-19 Thread Andy Matthews

Just so you know, this is what that expression is doing:

/ - literal string
? - zero or one
a - literal string
[^] - character set which says everything BUT 
* - zero or more times
 - literal string

So the expression says
1) Look for a 
2) With zero or one /
3) Followed by a
4) Any character (but ) any number of times
5) Followed by a 

This wouldn't match anchor tags with upper case, but could be changed like
so:

/?[a|A][^]*

And I think it might be best to use a lazy match:

/?[a|A][^]+

The plus says one or more rather than zero or more like the kleene star.


Andy matthews


 

-Original Message-
From: Jason Fisher [mailto:ja...@wanax.com] 
Sent: Wednesday, August 19, 2009 2:38 PM
To: cf-talk
Subject: re: Replacing characters in a string


Try this:

cfset ad = reReplace(form.addesc, (/?a[^]*), , all) /
 




~|
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:325548
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


ajax cfc not working for Access DB -- odd stuff

2009-08-19 Thread Don L

I've moved on to an open source cfml engine, don't know what caused the 
following odd behavior, that is, my cfajaxproxy tag no longer works for an 
inline data editing function (meaning, it does not do database update for a set 
of data) while the same code works for ms sql server 2005 express (db syntax 
are exactly same for such a simple query) and since I'm using sync mode I 
can't use the setCallbackHandler method to do debugging.  Thought, could use 
more heads here... 

caller line
cfajaxproxy cfc=myCFC4inlineEdit jsclassname=UpdateObj2 /

cfc code and js code below,

cfcomponent output=false
cfset THIS.dsn=myDS

cffunction name=doUpdate access=remote

cfloop item=i collection=#arguments#
   cfif Left(i,6) IS someID
   cfset someid = arguments.#i#
 /cfif
 cfif Left(i,4) IS uaid
   cfset uaid = arguments.#i#
 /cfif
 cfif Left(i,5) IS whats
   cfset whats = arguments.#i#
 /cfif  
/cfloop

cfif not isdefined(arguments.userID)
   cfset arguments.someID = 'dummyID728932'
/cfif

cfset fmtwhats = REreplace(Evaluate(whats),','',ALL)
cfset fmwhats = REreplace(fmtwhats,'','',ALL)

cfparam name=result default=success
cftry
cfquery datasource=#THIS.dsn#
  update blablaTBL
set whats = '#fmwhats#'
where uaid = cfqueryPARAM value = #Evaluate(uaid)#
 
cfsqltype=CF_SQL_INTEGER
and sid = cfqueryPARAM value = 
#Evaluate(someid)#
 
cfsqltype=CF_SQL_VARCHAR 
 maxlength=128;  
/cfquery
cfcatch type=databasecfset result=failed
/cfcatch
/cftry

!---cfreturn #fmWhats#---
cfreturn #result#

/cffunction
/cfcomponent


// much credit goes to Sam Farmer for getting me started on this (JSON) approach
function callUpdateJS2(frm,row) {
rowUpdate(frm,row);
}

function handleResult(r) {
 console.log(r);
}

function rowUpdate(frm,row){
// var d = new DraftObj();
var d = new UpdateObj2();
d.setSyncMode(true);
d.setForm(frm);
d.setHTTPMethod('POST'); 
  // d.doUpdate();

// expect  d.doUpdate() to return failed or success string
// BUT it doesn't!
 
// update {notes} field; 05/28/2008
document.getElementById(row).innerHTML = d.doUpdate();
}


Forgive me about the formatting and typo if any.

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:325549
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: ajax cfc not working for Access DB -- odd stuff

2009-08-19 Thread Adrian Lynch

Railo or OpenBD? Do they support cfajaxproxy yet?

 -Original Message-
 From: Don L [mailto:do...@yahoo.com]
 Sent: 19 August 2009 22:42
 To: cf-talk
 Subject: ajax cfc not working for Access DB -- odd stuff
 
 
 I've moved on to an open source cfml engine, don't know what caused the
 following odd behavior, that is, my cfajaxproxy tag no longer works for
 an inline data editing function (meaning, it does not do database
 update for a set of data) while the same code works for ms sql server
 2005 express (db syntax are exactly same for such a simple query) and
 since I'm using sync mode I can't use the setCallbackHandler method
 to do debugging.  Thought, could use more heads here...
 
 caller line
 cfajaxproxy cfc=myCFC4inlineEdit jsclassname=UpdateObj2 /
 
 cfc code and js code below,
 
 cfcomponent output=false
 cfset THIS.dsn=myDS
 
   cffunction name=doUpdate access=remote
 
   cfloop item=i collection=#arguments#
  cfif Left(i,6) IS someID
  cfset someid = arguments.#i#
/cfif
cfif Left(i,4) IS uaid
  cfset uaid = arguments.#i#
/cfif
cfif Left(i,5) IS whats
  cfset whats = arguments.#i#
/cfif
   /cfloop
 
   cfif not isdefined(arguments.userID)
  cfset arguments.someID = 'dummyID728932'
   /cfif
 
   cfset fmtwhats = REreplace(Evaluate(whats),','',ALL)
   cfset fmwhats = REreplace(fmtwhats,'','',ALL)
 
   cfparam name=result default=success
   cftry
   cfquery datasource=#THIS.dsn#
 update blablaTBL
   set whats = '#fmwhats#'
   where uaid = cfqueryPARAM value =
#Evaluate(uaid)#
 
 cfsqltype=CF_SQL_INTEGER
   and sid = cfqueryPARAM
value =
 #Evaluate(someid)#
 
 cfsqltype=CF_SQL_VARCHAR
maxlength=128;
   /cfquery
   cfcatch type=databasecfset result=failed
   /cfcatch
   /cftry
 
   !---cfreturn #fmWhats#---
   cfreturn #result#
 
   /cffunction
 /cfcomponent
 
 
 // much credit goes to Sam Farmer for getting me started on this (JSON)
 approach
 function callUpdateJS2(frm,row) {
   rowUpdate(frm,row);
 }
 
 function handleResult(r) {
console.log(r);
 }
 
 function rowUpdate(frm,row){
   // var d = new DraftObj();
   var d = new UpdateObj2();
   d.setSyncMode(true);
   d.setForm(frm);
   d.setHTTPMethod('POST');
   // d.doUpdate();
 
   // expect  d.doUpdate() to return failed or success string
   // BUT it doesn't!
 
   // update {notes} field; 05/28/2008
   document.getElementById(row).innerHTML = d.doUpdate();
 }
 
 
 Forgive me about the formatting and typo if any.
 
 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:325550
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: ajax cfc not working for Access DB -- odd stuff

2009-08-19 Thread Dominic Watson

  I've moved on to an open source cfml engine
Don't ever do that.

But seriously. First step of debugging ajax: install Firebug for Firefox if
you haven't already. Next, enable all the firebug console options for your
page and while viewing the console tab you should see your http post request
made by your proxy js object (when you fire that event). You will then be
able to examine the the data sent to your cfc and also the response.

If there is no http request sent then the problem may well be with the
cfajaxproxy code - if a request *is* sent, then we can safely move on from
the client side code.

With any luck, examining the http response will tell you exactly what's
going wrong and will be a cf / railo error page.

HTH

Dominic


~|
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:325551
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: ajax cfc not working for Access DB -- odd stuff

2009-08-19 Thread Don L

 I've moved on to an open source cfml engine
Don't ever do that.

But seriously. First step of debugging ajax: install Firebug for Firefox if
you haven't already. Next, enable all the firebug console options for your
page and while viewing the console tab you should see your http post request
made by your proxy js object (when you fire that event). You will then be
able to examine the the data sent to your cfc and also the response.

If there is no http request sent then the problem may well be with the
cfajaxproxy code - if a request *is* sent, then we can safely move on from
the client side code.

With any luck, examining the http response will tell you exactly what's
going wrong and will be a cf / railo error page.

HTH

Dominic

Sorry, Dominic, I wasn't clear about the browser, the inline editing feature is 
IE specific, that is, Firefox has a hell time with it, hence, it's IE only, 
yes, I like Firefox's firebug and find it very helpful but not for this case.  
I have firebug lite set up for the IE7, but it didn't show http call etc. from 
cfajaxproxy as in FF/FB... more thoughts? 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:325552
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Replacing characters in a string

2009-08-19 Thread Rick Sanders

Hello Andy  Jason,

Thank you so much, this worked well. I wasn't sure of the syntax so this
really helped.

Kind regards,

Rick

-Original Message-
From: Andy Matthews [mailto:li...@commadelimited.com] 
Sent: August-19-09 6:19 PM
To: cf-talk
Subject: RE: Replacing characters in a string


Just so you know, this is what that expression is doing:

/ - literal string
? - zero or one
a - literal string
[^] - character set which says everything BUT 
* - zero or more times
 - literal string

So the expression says
1) Look for a 
2) With zero or one /
3) Followed by a
4) Any character (but ) any number of times
5) Followed by a 

This wouldn't match anchor tags with upper case, but could be changed like
so:

/?[a|A][^]*

And I think it might be best to use a lazy match:

/?[a|A][^]+

The plus says one or more rather than zero or more like the kleene star.


Andy matthews


 

-Original Message-
From: Jason Fisher [mailto:ja...@wanax.com] 
Sent: Wednesday, August 19, 2009 2:38 PM
To: cf-talk
Subject: re: Replacing characters in a string


Try this:

cfset ad = reReplace(form.addesc, (/?a[^]*), , all) /
 






~|
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:325553
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


AW: ajax cfc not working for Access DB -- odd stuff

2009-08-19 Thread Gert Franz

Railo does... It's written by the community. Andrea Campolonghi writes the
AJAX stuff for Railo. Don't know about OpenBD though...

Gert

-Ursprüngliche Nachricht-
Von: Adrian Lynch [mailto:cont...@adrianlynch.co.uk] 
Gesendet: Donnerstag, 20. August 2009 00:07
An: cf-talk
Betreff: RE: ajax cfc not working for Access DB -- odd stuff


Railo or OpenBD? Do they support cfajaxproxy yet?

 -Original Message-
 From: Don L [mailto:do...@yahoo.com]
 Sent: 19 August 2009 22:42
 To: cf-talk
 Subject: ajax cfc not working for Access DB -- odd stuff
 
 
 I've moved on to an open source cfml engine, don't know what caused the
 following odd behavior, that is, my cfajaxproxy tag no longer works for
 an inline data editing function (meaning, it does not do database
 update for a set of data) while the same code works for ms sql server
 2005 express (db syntax are exactly same for such a simple query) and
 since I'm using sync mode I can't use the setCallbackHandler method
 to do debugging.  Thought, could use more heads here...
 
 caller line
 cfajaxproxy cfc=myCFC4inlineEdit jsclassname=UpdateObj2 /
 
 cfc code and js code below,
 
 cfcomponent output=false
 cfset THIS.dsn=myDS
 
   cffunction name=doUpdate access=remote
 
   cfloop item=i collection=#arguments#
  cfif Left(i,6) IS someID
  cfset someid = arguments.#i#
/cfif
cfif Left(i,4) IS uaid
  cfset uaid = arguments.#i#
/cfif
cfif Left(i,5) IS whats
  cfset whats = arguments.#i#
/cfif
   /cfloop
 
   cfif not isdefined(arguments.userID)
  cfset arguments.someID = 'dummyID728932'
   /cfif
 
   cfset fmtwhats = REreplace(Evaluate(whats),','',ALL)
   cfset fmwhats = REreplace(fmtwhats,'','',ALL)
 
   cfparam name=result default=success
   cftry
   cfquery datasource=#THIS.dsn#
 update blablaTBL
   set whats = '#fmwhats#'
   where uaid = cfqueryPARAM value =
#Evaluate(uaid)#
 
 cfsqltype=CF_SQL_INTEGER
   and sid = cfqueryPARAM
value =
 #Evaluate(someid)#
 
 cfsqltype=CF_SQL_VARCHAR
maxlength=128;
   /cfquery
   cfcatch type=databasecfset result=failed
   /cfcatch
   /cftry
 
   !---cfreturn #fmWhats#---
   cfreturn #result#
 
   /cffunction
 /cfcomponent
 
 
 // much credit goes to Sam Farmer for getting me started on this (JSON)
 approach
 function callUpdateJS2(frm,row) {
   rowUpdate(frm,row);
 }
 
 function handleResult(r) {
console.log(r);
 }
 
 function rowUpdate(frm,row){
   // var d = new DraftObj();
   var d = new UpdateObj2();
   d.setSyncMode(true);
   d.setForm(frm);
   d.setHTTPMethod('POST');
   // d.doUpdate();
 
   // expect  d.doUpdate() to return failed or success string
   // BUT it doesn't!
 
   // update {notes} field; 05/28/2008
   document.getElementById(row).innerHTML = d.doUpdate();
 }
 
 
 Forgive me about the formatting and typo if any.
 
 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:325554
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: ajax cfc not working for Access DB -- odd stuff

2009-08-19 Thread Emmit Larson

  I've moved on to an open source cfml engine
 Don't ever do that.
Shirley, you jest?

Kind Regards,
Emmit

On Wed, Aug 19, 2009 at 6:29 PM, Dominic Watson 
watson.domi...@googlemail.com wrote:


   I've moved on to an open source cfml engine
 Don't ever do that.

 But seriously. First step of debugging ajax: install Firebug for Firefox if
 you haven't already. Next, enable all the firebug console options for your
 page and while viewing the console tab you should see your http post
 request
 made by your proxy js object (when you fire that event). You will then be
 able to examine the the data sent to your cfc and also the response.

 If there is no http request sent then the problem may well be with the
 cfajaxproxy code - if a request *is* sent, then we can safely move on from
 the client side code.

 With any luck, examining the http response will tell you exactly what's
 going wrong and will be a cf / railo error page.

 HTH

 Dominic


 

~|
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:32
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: ajax cfc not working for Access DB -- odd stuff

2009-08-19 Thread Don L

 I've moved on to an open source cfml engine
Don't ever do that.

But seriously. First step of debugging ajax: install Firebug for Firefox if
you haven't already. Next, enable all the firebug console options for your
page and while viewing the console tab you should see your http post request
made by your proxy js object (when you fire that event). You will then be
able to examine the the data sent to your cfc and also the response.

If there is no http request sent then the problem may well be with the
cfajaxproxy code - if a request *is* sent, then we can safely move on from
the client side code.

With any luck, examining the http response will tell you exactly what's
going wrong and will be a cf / railo error page.

HTH

Dominic

Very ODD.

The line of cfreturn #result# in the cfc should have been 
cfreturn true since we don't need data back from the cfc.

and was previously cfreturn true.  I've enabled the feature in FF.

case A, cfreturn true
ajax http post succeeds, RESPONSE: the {data} instead of TRUE ?

case B, in the cfc, cfset result=fielda, #fa#; fieldb, #fb#; memofield,#mf#
cfreturn #result#
(just for the heck of it),
ajax http post succeeds, RESPONSE: just the #mf# instead of fielda, #fa#; 
fieldb, #fb#; memofield,#mf# ?


FYI, the computer is totally offline and wireless device driver was turned off 
as well.



~|
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:325556
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Coldfusion9 ORM

2009-08-19 Thread Manjukiran Pacchhipulusu

Hi Gavin,

I tried this and it works for me.  Can you try a couple of things:
- Set ormsettings.logSQL=true in this scope of Application.cfc.  Check if the 
SQLs are getting generated fine.
- You need not do but still try calling ormflush() after EntitySave() in 
postinsert method.
If you still cannot find out the problem, please post a repro case of the issue.

Thanx
-Manjukiran (www.manjukiran.net)
ColdFusion Product Team 

~|
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:325557
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: ajax cfc not working for Access DB -- odd stuff

2009-08-19 Thread Dave l

After looking at this code I am suddenly hungry for pound cake... dunno why???


~|
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:325558
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4